Limit submissions view in ioi16
This commit is contained in:
parent
6746d5769a
commit
a9cf695786
1 changed files with 8 additions and 2 deletions
|
@ -345,9 +345,12 @@ class SubmissionsListBase(DiggPaginatorMixin, TitleMixin, ListView):
|
||||||
queryset = queryset.filter(contest_object=self.contest)
|
queryset = queryset.filter(contest_object=self.contest)
|
||||||
if not self.contest.can_see_full_scoreboard(self.request.user):
|
if not self.contest.can_see_full_scoreboard(self.request.user):
|
||||||
queryset = queryset.filter(user=self.request.profile)
|
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:
|
if self.contest.freeze_after and not self.include_frozen:
|
||||||
queryset = queryset.exclude(
|
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:
|
else:
|
||||||
queryset = queryset.select_related("contest_object").defer(
|
queryset = queryset.select_related("contest_object").defer(
|
||||||
|
@ -861,7 +864,10 @@ class UserContestSubmissionsAjax(UserContestSubmissions):
|
||||||
subtask = 0
|
subtask = 0
|
||||||
problem_points = pp
|
problem_points = pp
|
||||||
submission = Submission.objects.get(id=sub_id)
|
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] = {
|
best_subtasks[subtask] = {
|
||||||
"submission": submission,
|
"submission": submission,
|
||||||
"contest_time": nice_repr(
|
"contest_time": nice_repr(
|
||||||
|
|
Loading…
Reference in a new issue