[Bugfix:Submission] Fix leaderboard tie ranking#12524
Conversation
JManion32
left a comment
There was a problem hiding this comment.
Great work with this, the leaderboard no longer ranks ties sequentially. A small Cypress test to accompany this would be the cherry on top, but it's not super necessary.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12524 +/- ##
=========================================
Coverage 21.66% 21.66%
Complexity 9638 9638
=========================================
Files 268 268
Lines 36233 36233
Branches 486 486
=========================================
Hits 7849 7849
Misses 27902 27902
Partials 482 482
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
I think adding a cypress test to ensure functionality would be incredibly beneficial. This is something that is easily broken if not tested. Also, I may be missing something, but is there a reason there is a gap between 4 and 5? |
Teaching staff is not ranked. Certain rows are highlighted in blue to indicate teaching staff, but not all of them. This seems to be an unrelated issue. |
IDzyre
left a comment
There was a problem hiding this comment.
Code looks good, and seems to work. As i stated in a previous comment, this is something that can easily break if not tested. If you could add a simple Cypress test that checks the ranking works, that would make this change more effective.
QuackHonk
left a comment
There was a problem hiding this comment.
Looks pretty good! As said by others a cypress test would be nice but looks effective and hasn't bugged out yet on my computer
|
Closed due to inactivity. |
Why is this Change Important & Necessary?
Fixes #11040
Students with identical scores on a leaderboard are assigned sequential ranks (1, 2, 3) instead of sharing the same rank. This is misleading as it implies one student performed better than another when they achieved the same result.
What is the New Behavior?
Tied students now share the same rank using standard competition ranking (e.g., 1, 1, 3). The next rank after a tie skips ahead by the number of tied entries.

What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information