Skip to content

Add a Score counter to task overview and sidebar - #1476

Open
pxsit wants to merge 59 commits into
cms-dev:mainfrom
pxsit:add-counter
Open

pxsit wants to merge 59 commits into
cms-dev:mainfrom
pxsit:add-counter

Conversation

@pxsit

@pxsit pxsit commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Add a Score counter to task overview
image

@prandla

prandla commented Jul 23, 2025

Copy link
Copy Markdown
Member

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?

@Muaath5

Muaath5 commented Jul 28, 2025

Copy link
Copy Markdown

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 :)

@pxsit

pxsit commented Aug 1, 2025

Copy link
Copy Markdown
Contributor Author

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 (:

Comment thread cms/server/contest/handlers/main.py Resolved
Comment thread cms/server/contest/handlers/main.py Resolved
Comment thread cms/server/contest/handlers/main.py Resolved
Comment thread cms/server/contest/static/cws_style.css Resolved
Comment thread cmscontrib/updaters/update_from_1.5.sql Resolved
Reformat, Fix Updaters, more
Comment thread cms/server/contest/static/cws_style.css Resolved
Comment thread cms/server/contest/handlers/main.py Resolved
@pxsit

pxsit commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author
image Im still getting this bug, let me try fix it

@pxsit

pxsit commented Aug 4, 2025

Copy link
Copy Markdown
Contributor Author

Should be fixed! (According to my testing)

@prandla

prandla commented Aug 4, 2025

Copy link
Copy Markdown
Member

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.

pxsit added 5 commits April 6, 2026 02:25
Avoid a duplicate DB query by reusing a participation object that ContestHandler may have preloaded for sidebar scores; only call _load_participation_for_scores when necessary. Compute task scores conditionally as before. UI fixes: display "N/A" for undefined task scores in the contest sidebar, add CSS for the undefined badge state, and ensure task submission badges remove the undefined class and are shown after updating the score.
Add an option to display task scores in the contest sidebar and for both the overview and the sidebard task scores, when a tokened score is availble it will use that score, if not it will use the public score, if there is no public score it will show 0/0 (considering to change to N/A)
@pxsit
pxsit requested a review from prandla April 5, 2026 18:36
@pxsit

pxsit commented Apr 6, 2026

Copy link
Copy Markdown
Contributor Author
image this is the new look

@pxsit pxsit changed the title Add a Score counter to task overview Add a Score counter to task overview and sidebar Apr 8, 2026
@pxsit
pxsit requested a review from Copilot April 8, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown

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 11 out of 11 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

cms/server/admin/templates/contest.html:113

  • The new “Show task scores in sidebar” row appears to break the table structure: after closing the checkbox , the Timezone label starts without opening a new /, and there is an extra closing . This will likely render the form misaligned and may make the timezone field uneditable. Please close the sidebar row properly and restore the Timezone row as its own with two cells (label + input).
      </td>
        <span class="info" title="Timezone of the server, used to display start, end times and the current server time to contestants.
                                  Example: 'Europe/Rome', 'America/New_York', ..."></span>
        Timezone
      </td>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cms/server/contest/handlers/main.py Resolved
@pxsit

pxsit commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author
image I'm considering to move the score column to the last column and adding a total score (inspired by Malaysia's CMS). What do you guys think

- Batch-load official submissions (tokens, results) to avoid N+1 queries
- Respect disabled tokens; isolate per-task score failures
- Show pending spinner in sidebar and overview; add overview total score
- Replace node JS test with Python tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants