Hide submissions for ioi16
This commit is contained in:
parent
9522e17acd
commit
56a9b5d6a0
2 changed files with 23 additions and 14 deletions
|
@ -907,6 +907,9 @@ class UserContestSubmissionsAjax(UserContestSubmissions):
|
||||||
|
|
||||||
contest_problem = self.contest.contest_problems.get(problem=self.problem)
|
contest_problem = self.contest.contest_problems.get(problem=self.problem)
|
||||||
filtered_submissions = []
|
filtered_submissions = []
|
||||||
|
|
||||||
|
# Only show this for some users when using ioi16
|
||||||
|
if self.contest.format_name != "ioi16" or self.include_frozen:
|
||||||
for s in context["submissions"]:
|
for s in context["submissions"]:
|
||||||
if not hasattr(s, "contest"):
|
if not hasattr(s, "contest"):
|
||||||
continue
|
continue
|
||||||
|
@ -915,11 +918,15 @@ class UserContestSubmissionsAjax(UserContestSubmissions):
|
||||||
s.contest_time = nice_repr(contest_time, "noday")
|
s.contest_time = nice_repr(contest_time, "noday")
|
||||||
else:
|
else:
|
||||||
s.contest_time = None
|
s.contest_time = None
|
||||||
total = floatformat(contest_problem.points, -self.contest.points_precision)
|
total = floatformat(
|
||||||
|
contest_problem.points, -self.contest.points_precision
|
||||||
|
)
|
||||||
points = floatformat(s.contest.points, -self.contest.points_precision)
|
points = floatformat(s.contest.points, -self.contest.points_precision)
|
||||||
s.display_point = f"{points} / {total}"
|
s.display_point = f"{points} / {total}"
|
||||||
filtered_submissions.append(s)
|
filtered_submissions.append(s)
|
||||||
context["submissions"] = filtered_submissions
|
context["submissions"] = filtered_submissions
|
||||||
|
else:
|
||||||
|
context["submissions"] = None
|
||||||
|
|
||||||
best_subtasks = self.get_best_subtask_points()
|
best_subtasks = self.get_best_subtask_points()
|
||||||
if best_subtasks:
|
if best_subtasks:
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
<hr>
|
<hr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if submissions %}
|
||||||
<table class="lightbox-submissions"><tbody>
|
<table class="lightbox-submissions"><tbody>
|
||||||
{% for submission in submissions %}
|
{% for submission in submissions %}
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -65,3 +66,4 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue