Skip to content

Commit

Permalink
[no-ticket] Fixed the way sio filters hidden submissions with no cont…
Browse files Browse the repository at this point in the history
…est.

Before, the way was hardcoded,
now it uses problem_controller for the given problem.

Change-Id: Ibe9735bbb226ce1bcc9c80bb9e4688386d545161
  • Loading branch information
stasio6 committed Mar 27, 2020
1 parent 78288a1 commit bac4510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions oioioi/programs/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ def render_submission_footer(self, request, submission):
cc = request.contest.controller
queryset = cc.filter_my_visible_submissions(request, queryset)
elif not request.contest and not is_contest_basicadmin(request):
queryset = queryset.filter(user=request.user, date__lte=request.timestamp) \
.exclude(kind='IGNORED_HIDDEN')
pc = submission.problem_instance.controller
queryset = pc.filter_my_visible_submissions(request, queryset)
show_scores = bool(queryset.filter(score__isnull=False))

can_admin = \
Expand Down
4 changes: 2 additions & 2 deletions oioioi/quizzes/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ def render_submission_footer(self, request, submission):
cc = request.contest.controller
queryset = cc.filter_my_visible_submissions(request, queryset)
elif not request.contest and not is_contest_basicadmin(request):
queryset = queryset.filter(user=request.user, date__lte=request.timestamp) \
.exclude(kind='IGNORED_HIDDEN')
pc = submission.problem_instance.controller
queryset = pc.filter_my_visible_submissions(request, queryset)
show_scores = bool(queryset.filter(score__isnull=False))

can_admin = \
Expand Down

0 comments on commit bac4510

Please sign in to comment.