- Notifications
You must be signed in to change notification settings - Fork 432
Add support for archiving a submission #2411
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
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.94% ========================================== Files 251 261 +10 Lines 13317 13769 +452 ========================================== + Hits 6228 6570 +342 - Misses 7089 7199 +110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ef08bbc to 0c16d2d Compare 4307253 to 89cdf39 Compare 9f55d23 to 553f75e Compare | Overall ty for working on this, it looks great :) |
6142a3d to 692f0f3 Compare
Ninjaclasher left a comment
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.
|
a2dbc14 to 3e796de Compare
Ninjaclasher left a comment
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.
LGTM, but given the complexity of this PR, will wait for another reviewer to approve before merging.
quantum5 left a comment
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.
No issue with the code, but I don't like the overloading rejudge to also mark as archived. Why not make it a separate option?
| I remember the reason we wanted "rejudge" to be "rejudge and archive" was because in most cases, you'd want to do both simultaneously. Thoughts? @int-y1 @quantum5 @Ninjaclasher |
| changes:
i didn't add a button for only "mark archived" because it's not needed yet |
fixes #1767
an admin needs
judge.archive_submissionto 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.judgesetis_archivedto 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