Skip to content

Commit eb920d8

Browse files
Do not show total scores when they convey the same information as public
1 parent 449b22d commit eb920d8

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

cms/server/templates/contest/submission_row.html

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
{% if score_type is not None and score_type.max_public_score != 0 %}
1313
<td class="public_score undefined">{{ _("N/A") }}</td>
1414
{% end %}
15+
{% if score_type is not None and score_type.max_public_score != score_type.max_score %}
1516
<td class="total_score undefined">{{ _("N/A") }}</td>
17+
{% end %}
1618
{% elif sr.compilation_outcome == "fail" %}
1719
<tr data-submission="{{ s_idx }}" data-status="2">
1820
{% raw col1 %}
@@ -23,7 +25,9 @@
2325
{% if score_type is not None and score_type.max_public_score != 0 %}
2426
<td class="public_score undefined">{{ _("N/A") }}</td>
2527
{% end %}
28+
{% if score_type is not None and score_type.max_public_score != score_type.max_score %}
2629
<td class="total_score undefined">{{ _("N/A") }}</td>
30+
{% end %}
2731
{% elif not sr.evaluated() %}
2832
<tr data-submission="{{ s_idx }}" data-status="3">
2933
{% raw col1 %}
@@ -33,7 +37,9 @@
3337
{% if score_type is not None and score_type.max_public_score != 0 %}
3438
<td class="public_score undefined">{{ _("N/A") }}</td>
3539
{% end %}
40+
{% if score_type is not None and score_type.max_public_score != score_type.max_score %}
3641
<td class="total_score undefined">{{ _("N/A") }}</td>
42+
{% end %}
3743
{% elif not sr.scored() %}
3844
<tr data-submission="{{ s_idx }}" data-status="4">
3945
{% raw col1 %}
@@ -43,7 +49,9 @@
4349
{% if score_type is not None and score_type.max_public_score != 0 %}
4450
<td class="public_score undefined">{{ _("N/A") }}</td>
4551
{% end %}
52+
{% if score_type is not None and score_type.max_public_score != score_type.max_score %}
4653
<td class="total_score undefined">{{ _("N/A") }}</td>
54+
{% end %}
4755
{% else %}
4856
<tr data-submission="{{ s_idx }}" data-status="5">
4957
{% raw col1 %}
@@ -58,20 +66,22 @@
5866
</td>
5967
{% end %}
6068

61-
{% if s.token is not None %}
62-
{% if score_type is not None and score_type.max_score != 0 %}
69+
{% if score_type is not None and score_type.max_public_score != score_type.max_score %}
70+
{% if s.token is not None %}
71+
{% if score_type.max_score != 0 %}
6372
<td class="total_score {{ get_score_class(sr.score, score_type.max_score) }}">
64-
{{ "%g" % round(sr.score, task.score_precision) }} / {{ "%g" % round(score_type.max_score, task.score_precision) }}
73+
{{ "%g" % round(sr.score, task.score_precision) }} / {{ "%g" % round(score_type.max_score, task.score_precision) }}
6574
</td>
66-
{% else %}
75+
{% else %}
6776
<td class="total_score">
68-
{{ "%g" % round(sr.score, task.score_precision) }}
77+
{{ "%g" % round(sr.score, task.score_precision) }}
6978
</td>
70-
{% end %}
71-
{% else %}
79+
{% end %}
80+
{% else %}
7281
<td class="total_score undefined">
7382
{{ _("N/A") }}
7483
</td>
84+
{% end %}
7585
{% end %}
7686
{% end %}
7787
<td class="files">

cms/server/templates/contest/task_submissions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ <h2 style="margin: 40px 0 10px">{{ _("Previous submissions") }}</h2>
224224
<th class="time">{{ _("Time") }}</th>
225225
{% end %}
226226
<th class="status">{{ _("Status") }}</th>
227-
{% if score_type is not None and score_type.max_public_score != 0 %}
227+
{% if score_type is not None and score_type.max_public_score != 0 and score_type.max_public_score != score_type.max_score %}
228228
<th class="public_score">{{ _("Public score") }}</th>
229229
<th class="total_score">{{ _("Total score") }}</th>
230230
{% else %}

0 commit comments

Comments
 (0)