Skip to content

Commit a4f06f2

Browse files
authored
Always return max_score in submission data when terminal (#1317)
1 parent 77915d4 commit a4f06f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cms/server/contest/handlers/tasksubmission.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ def get(self, task_name, submission_num):
267267
sr.public_score, score_type.max_public_score,
268268
sr.public_score_details, task.score_precision,
269269
translation=self.translation)
270-
if score_type.max_public_score < score_type.max_score \
271-
and (submission.token is not None
272-
or self.r_params["actual_phase"] == 3):
270+
if score_type.max_public_score < score_type.max_score:
273271
data["max_score"] = \
274272
round(score_type.max_score, task.score_precision)
275-
if data["status"] == SubmissionResult.SCORED:
273+
if data["status"] == SubmissionResult.SCORED \
274+
and (submission.token is not None
275+
or self.r_params["actual_phase"] == 3):
276276
data["score"] = \
277277
round(sr.score, task.score_precision)
278278
data["score_message"] = score_type.format_score(

0 commit comments

Comments
 (0)