@@ -264,7 +264,9 @@ def get(self, task_name, submission_num):
264264 sr .public_score , score_type .max_public_score ,
265265 sr .public_score_details , task .score_precision ,
266266 translation = self .translation )
267- if submission .token is not None :
267+ if score_type .max_public_score < score_type .max_score \
268+ and (submission .token is not None
269+ or self .r_params ["actual_phase" ] == 3 ):
268270 data ["max_score" ] = \
269271 round (score_type .max_score , task .score_precision )
270272 data ["score" ] = \
@@ -297,22 +299,22 @@ def get(self, task_name, submission_num):
297299 score_type = task .active_dataset .score_type_object
298300
299301 details = None
300- if sr is not None :
301- if submission .tokened ():
302- details = sr .score_details
302+ if sr is not None and sr .scored ():
303+ # During analysis mode we show the full feedback regardless of
304+ # what the task says.
305+ is_analysis_mode = self .r_params ["actual_phase" ] == 3
306+ if submission .tokened () or is_analysis_mode :
307+ raw_details = sr .score_details
303308 else :
304- details = sr .public_score_details
309+ raw_details = sr .public_score_details
305310
306- if sr .scored ():
307- feedback_level = task .feedback_level
308- # During analysis mode we show the full feedback regardless of
309- # what the task says.
310- if self .r_params ["actual_phase" ] == 3 :
311- feedback_level = FEEDBACK_LEVEL_FULL
312- details = score_type .get_html_details (
313- details , feedback_level , translation = self .translation )
311+ if is_analysis_mode :
312+ feedback_level = FEEDBACK_LEVEL_FULL
314313 else :
315- details = None
314+ feedback_level = task .feedback_level
315+
316+ details = score_type .get_html_details (
317+ raw_details , feedback_level , translation = self .translation )
316318
317319 self .render ("submission_details.html" , sr = sr , details = details ,
318320 ** self .r_params )
0 commit comments