-
Notifications
You must be signed in to change notification settings - Fork 400
Add a Score counter to task overview #1476
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: main
Are you sure you want to change the base?
Conversation
Add a Score counter to task overview
|
I have some comments about the code, but i'm wondering if this is the UI we want in the first place... I saw some browser extension that showed the task scores on the sidebar next to the task links, maybe that would be better. Does anyone else have any thoughts? |
I don't see any issues if both of these ways where implemented, but if it was in the task overview it would be better in case of onsite competitions and you don't want others to look into your score :) |
Added an option to toggle this in AWS (: |
|
Should be fixed! (According to my testing) |
|
Sorry, I just looked at the rest of cws_style.css, and now I think your original approach was the best... I thought the places you changed were the only places that defined these colors, but looks like there are quite a few other places that use slightly different colors, so explicitly defining that these colors are in the task overview table and in the submission list table is fine. After reverting that it should be good to merge. |
Looks cursed having it not in order
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1476 +/- ##
==========================================
- Coverage 54.67% 54.64% -0.04%
==========================================
Files 335 335
Lines 27361 27381 +20
==========================================
+ Hits 14960 14962 +2
- Misses 12401 12419 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 pull request adds a configurable score counter display to the task overview page in the Contest Web Server (CWS). The feature is controlled by a new boolean field show_task_scores_in_overview that can be configured per contest.
- Adds database column
show_task_scores_in_overviewto the contests table with default value oftrue - Implements score calculation and display in the task overview table
- Extends CSS styling to apply score coloring (red/yellow/green) to the task overview scores
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| cmscontrib/updaters/update_from_1.5.sql | Adds database migration to create the show_task_scores_in_overview column in the contests table |
| cms/server/contest/templates/overview.html | Adds conditional score column header and data cells to the task overview table |
| cms/server/contest/static/cws_style.css | Extends existing score styling classes to also apply to the main task list |
| cms/server/contest/handlers/main.py | Implements score calculation logic in MainHandler.render_params() and adds necessary imports |
| cms/server/admin/templates/contest.html | Adds checkbox UI element for the new setting in the contest configuration page |
| cms/server/admin/handlers/contest.py | Adds form processing for the new show_task_scores_in_overview field |
| cms/db/contest.py | Adds the show_task_scores_in_overview boolean column definition to the Contest model |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add a Score counter to task overview
