From a9cf695786e4bb7e1055e6b4af1965feda8c7440 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Wed, 28 Dec 2022 12:29:02 -0600 Subject: [PATCH] Limit submissions view in ioi16 --- judge/views/submission.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/judge/views/submission.py b/judge/views/submission.py index 5b539df..44ce7a8 100644 --- a/judge/views/submission.py +++ b/judge/views/submission.py @@ -345,9 +345,12 @@ class SubmissionsListBase(DiggPaginatorMixin, TitleMixin, ListView): queryset = queryset.filter(contest_object=self.contest) if not self.contest.can_see_full_scoreboard(self.request.user): queryset = queryset.filter(user=self.request.profile) + if self.contest.format_name == "ioi16": + queryset = queryset.filter(user=self.request.profile) if self.contest.freeze_after and not self.include_frozen: queryset = queryset.exclude( - date__gte=self.contest.freeze_after + self.contest.start_time + ~Q(user=self.request.profile), + date__gte=self.contest.freeze_after + self.contest.start_time, ) else: queryset = queryset.select_related("contest_object").defer( @@ -861,7 +864,10 @@ class UserContestSubmissionsAjax(UserContestSubmissions): subtask = 0 problem_points = pp submission = Submission.objects.get(id=sub_id) - if subtask in frozen_subtasks.get(str(problem_id), set()): + if ( + subtask in frozen_subtasks.get(str(problem_id), set()) + and not self.include_frozen + ): best_subtasks[subtask] = { "submission": submission, "contest_time": nice_repr(