Hide submissions for ioi16
This commit is contained in:
parent
9522e17acd
commit
56a9b5d6a0
2 changed files with 23 additions and 14 deletions
|
@ -907,19 +907,26 @@ 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 = []
|
||||||
for s in context["submissions"]:
|
|
||||||
if not hasattr(s, "contest"):
|
# Only show this for some users when using ioi16
|
||||||
continue
|
if self.contest.format_name != "ioi16" or self.include_frozen:
|
||||||
contest_time = self.contest_time(s)
|
for s in context["submissions"]:
|
||||||
if contest_time:
|
if not hasattr(s, "contest"):
|
||||||
s.contest_time = nice_repr(contest_time, "noday")
|
continue
|
||||||
else:
|
contest_time = self.contest_time(s)
|
||||||
s.contest_time = None
|
if contest_time:
|
||||||
total = floatformat(contest_problem.points, -self.contest.points_precision)
|
s.contest_time = nice_repr(contest_time, "noday")
|
||||||
points = floatformat(s.contest.points, -self.contest.points_precision)
|
else:
|
||||||
s.display_point = f"{points} / {total}"
|
s.contest_time = None
|
||||||
filtered_submissions.append(s)
|
total = floatformat(
|
||||||
context["submissions"] = filtered_submissions
|
contest_problem.points, -self.contest.points_precision
|
||||||
|
)
|
||||||
|
points = floatformat(s.contest.points, -self.contest.points_precision)
|
||||||
|
s.display_point = f"{points} / {total}"
|
||||||
|
filtered_submissions.append(s)
|
||||||
|
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>
|
||||||
|
@ -64,4 +65,5 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue