Skip to content

[Bugfix:Submission] Fix leaderboard tie ranking#12524

Closed
sushen123 wants to merge 2 commits into
Submitty:mainfrom
sushen123:fix/leaderboard-tie-ranking
Closed

[Bugfix:Submission] Fix leaderboard tie ranking#12524
sushen123 wants to merge 2 commits into
Submitty:mainfrom
sushen123:fix/leaderboard-tie-ranking

Conversation

@sushen123

Copy link
Copy Markdown
Contributor

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.
Screenshot from 2026-03-03 21-26-27

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. Navigate to a gradeable with a leaderboard
  2. Ensure two or more students have identical points, time, and memory
  3. Visit the leaderboard page and verify tied students share the same rank
  4. Verify the rank after the tie skips correctly

Automated Testing & Documentation

Other information

@JManion32 JManion32 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Mar 3, 2026
@codecov

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.66%. Comparing base (2049e38) to head (17b7335).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@IDzyre

IDzyre commented Mar 4, 2026

Copy link
Copy Markdown
Member

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?

@JManion32

Copy link
Copy Markdown
Contributor

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 IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Mar 5, 2026
@QuackHonk QuackHonk self-assigned this Mar 17, 2026
@QuackHonk
QuackHonk self-requested a review March 20, 2026 20:52
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 20, 2026

@QuackHonk QuackHonk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@JManion32

Copy link
Copy Markdown
Contributor

Closed due to inactivity.

@JManion32 JManion32 closed this Mar 31, 2026
@github-project-automation github-project-automation Bot moved this from In Review to Done in Submitty Development Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Leaderboard Ties have Sequential Ranks

4 participants