Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add view_contest_submissions field #1860

Merged
merged 1 commit into from
Feb 26, 2022
Merged

Conversation

Riolku
Copy link
Contributor

@Riolku Riolku commented Feb 24, 2022

Overrides and closes #1695. It is likely better to have a dedicated field for this instead of reusing an existing field.

@Riolku Riolku force-pushed the see-scoreboard-subs branch from d31f8f4 to e815210 Compare February 26, 2022 05:21
@Riolku
Copy link
Contributor Author

Riolku commented Feb 26, 2022

Updated: also adds a toggle for testers to see in-contest submissions, and renamed migration to be more useful.

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2022

Codecov Report

Merging #1860 (b082f22) into master (bfac8d4) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1860      +/-   ##
==========================================
+ Coverage   46.16%   46.18%   +0.02%     
==========================================
  Files         228      229       +1     
  Lines       13011    13018       +7     
==========================================
+ Hits         6006     6013       +7     
  Misses       7005     7005              
Impacted Files Coverage Δ
judge/admin/contest.py 43.45% <ø> (ø)
judge/views/submission.py 32.21% <ø> (ø)
judge/migrations/0129_see_scoreboard_subs.py 100.00% <100.00%> (ø)
judge/models/contest.py 96.12% <100.00%> (+0.02%) ⬆️
judge/models/submission.py 90.32% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfac8d4...b082f22. Read the comment docs.

@Riolku Riolku force-pushed the see-scoreboard-subs branch from e815210 to c3e46eb Compare February 26, 2022 05:23
@Riolku
Copy link
Contributor Author

Riolku commented Feb 26, 2022

Re-ordered query parameters in submission queryset, unsure if it matters.

@Riolku Riolku force-pushed the see-scoreboard-subs branch 2 times, most recently from 7bc8084 to 936ffa3 Compare February 26, 2022 08:28
Overrides and closes DMOJ#1695. It is likely better to have a dedicated
field for this instead of reusing an existing field.

Also, in a similar spirit to DMOJ#1871, add a toggle for testers to see
in-contest subs.
@Riolku Riolku force-pushed the see-scoreboard-subs branch from 936ffa3 to b082f22 Compare February 26, 2022 08:32
@quantum5 quantum5 merged commit bbe3dc6 into DMOJ:master Feb 26, 2022
@Riolku Riolku deleted the see-scoreboard-subs branch February 26, 2022 08:39
@@ -91,6 +93,10 @@ class Contest(models.Model):
view_contest_scoreboard = models.ManyToManyField(Profile, verbose_name=_('view contest scoreboard'), blank=True,
related_name='view_contest_scoreboard',
help_text=_('These users will be able to view the scoreboard.'))
view_contest_submissions = models.ManyToManyField(Profile, verbose_name=('can see contest submissions'), blank=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the _?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend can_see_scoreboard to also see in-contest submissions
4 participants