-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for archiving a submission #2411
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2411 +/- ##
==========================================
+ Coverage 46.76% 47.71% +0.95%
==========================================
Files 251 260 +9
Lines 13317 13747 +430
==========================================
+ Hits 6228 6560 +332
- Misses 7089 7187 +98 ☔ View full report in Codecov by Sentry. |
ef08bbc
to
0c16d2d
Compare
4307253
to
89cdf39
Compare
9f55d23
to
553f75e
Compare
Overall ty for working on this, it looks great :) |
'verbose_name': 'submission', | ||
'verbose_name_plural': 'submissions', | ||
}, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, what does this part of the migration do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed so that the permission archive_submission
appears under /admin/auth/user/<id>/change/ > Available user permissions
6142a3d
to
692f0f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if, in the places where we currently show locked
instead of Rejudge
, we give the option of Archive
. Off the top of my head, this is currently in judge/admin/submission.py
's judge_column
, the submission row (templates/submission/row.html
), and submission status/source (templates/submission/(status|source).html
).
This would match the behaviour in other places (e.g. contest problem rejudge) where there is no check for is_locked
and thus we go to Submission.judge
and automatically archive.
Otherwise LGTM.
|
b49ce8e
to
a2dbc14
Compare
fixes #1767
an admin needs
judge.archive_submission
to archive submissions. there are 2 ways to archive a submission:/problem/<code>/manage/submission
, turn on "Archive locked submissions", and click "Rejudge selected submissions"Submissions.judge
setis_archived
to true/admin/judge/submission/<code>/change/
and toggle "Is archived"user-facing changes when a submission is archived:
/admin/judge/profile/ > Action > Recalculate scores
): submission is not considered when recalculating points, problems solved, and pp/user/<name>/solved
: submission no longer appears in "Points breakdown" and in the problems solved table/problem/<code>/rank/
: submission no longer appears as a best solution/submissions/
and/problem/<code>/submissions/
: submission becomes partly transparent and gets an archive icon. see screenshot.there are no admin-facing changes when a submission is archived