-
Notifications
You must be signed in to change notification settings - Fork 8
feat(contest): add random-set proset and scoreboard #208
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: tnfsh
Are you sure you want to change the base?
Conversation
Only Support IOI2013.
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.
Pull request overview
This PR adds scoreboard and proset (problem set) functionality for the Random-Set contest mode introduced in PR #197. The Random-Set mode assigns different problems to adjacent contestants to prevent cheating in exam scenarios.
Changes:
- Implemented random-set specific scoreboard with IOI 2013 scoring rules and first-kill tracking
- Added random-set proset page showing user-specific problem assignments
- Integrated scoreboard updates with the judge service
- Added access control checks to prevent users from viewing/submitting problems not in their assigned set
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/static/templ/contests/scoreboard.html | Adds JavaScript rendering for random-set scoreboard with sorting logic and refactors IOI scoreboard |
| src/static/templ/contests/proset.html | Updates template to use dynamic problem index mapping for random-set contests |
| src/services/judge.py | Integrates scoreboard update callback when challenges complete |
| src/services/contests.py | Implements update_randomset_scoreboard method to track best scores per problem |
| src/handlers/pro.py | Adds access control to prevent users from viewing problems outside their assigned set |
| src/handlers/contests/scoreboard.py | Adds random_set_scoreboard API endpoint to retrieve scores |
| src/handlers/contests/proset.py | Adds randomset_proset handler to display user-specific problem list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5799405 to
bc55409
Compare
In this PR, we complete the peripheral features of the Random-Set PR, including the scoreboard and proset.
Currently, the random set scoreboard only supports the IOI 2013 rule, which also appears to be the only rule used by schools.
Since integration tests cannot simulate clients with different IP addresses, the related tests are deferred to the E2E stage.