Skip to content

Let competition admins see hidden leaderboard columns - #2748

Merged
Didayolo merged 4 commits into
developfrom
admin-hidden-scores
Nov 21, 2026
Merged

Didayolo merged 4 commits into
developfrom
admin-hidden-scores

Conversation

@Didayolo

@Didayolo Didayolo commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Original PR: #2709

Description

Hidden leaderboard columns are private to the competition admins (creator,
collaborators, superusers): participants still never see them, and the
admins now do. The organizers can then monitor the private test set during
the challenge, without downloading the scoring output of every submission.

  • Submission API (/api/submissions/, list and detail): admins get the
    hidden scores. Each score now says whether its column is hidden. The
    permission check is cached per competition, so a list view adds a couple of queries
    per competition, not per submission.
  • Leaderboards (/api/phases/<id>/get_leaderboard/ and
    /api/leaderboards/<id>/): admins get the hidden columns and their scores.
    The ranking still uses the visible columns only, so it is the same for
    admins and participants.
  • Results export (/api/competitions/<id>/results.<json|csv|zip>):
    all_submissions=true exports every finished submission of the phase, on
    the leaderboard or not, with created_when and on_leaderboard. The
    export already included hidden columns. It now does so on purpose, and a
    test covers it.
  • Interface: the leaderboard marks hidden columns with an icon, and its
    download menu has an "All finished submissions (CSV)" entry. The
    submissions panel has a "Hidden scores" column, shown only when the API
    sent hidden scores, so only to admins.

This reverses part of #2526, which hid these scores from everyone "for
consistency with the columns metadata". Admins could already get them from
the results export and from the scoring output, so this change exposes
nothing new. It makes them usable.

/api/leaderboards/<id>/ orders its entries by every column, hidden ones
included, for everyone. This PR does not change it.

Issues this PR resolves

A checklist for hand testing

  • As the competition creator (or co-organizer), the Results tab shows the hidden columns with the eye-slash icon, and the row order is the same as for a participant.
  • As a participant, the Results tab shows no hidden column.
  • As the creator, the submissions panel shows the "Hidden scores" column. As a participant, it does not.
  • The download menu's "All finished submissions (CSV)" entry lists finished submissions that are not on the leaderboard, with their hidden scores.
  • As a participant, /api/submissions/?phase=<id> returns no hidden score.

Any relevant files for testing

Any competition with a hidden: true column in its leaderboard.

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo

Didayolo commented Nov 17, 2026 •

Copy link
Copy Markdown
Member Author

Test failure:

FAILED src/apps/api/tests/test_leaderboards.py::HiddenColumnScoreTests::test_hidden_column_does_not_change_ranking - assert [155, 154] == [154, 155]
====== 1 failed, 563 passed, 2 skipped, 25 warnings in 503.36s (0:08:23) =======

EDIT: this test was introduced by the PR. The problem is that the date of submission are randomly attributed, so the order is random, and the test can fail. I fixed this by fixing the creation date of the later submission in this test.

@Didayolo

Didayolo commented Nov 21, 2026 •

Copy link
Copy Markdown
Member Author

Organizer view

Capture d’écran 2026-11-21 à 05 28 58 Capture d’écran 2026-11-21 à 05 31 18

Participant view

Capture d’écran 2026-11-21 à 05 29 22

@Didayolo
Didayolo merged commit 00c2781 into develop Nov 21, 2026
3 checks passed
@Didayolo
Didayolo deleted the admin-hidden-scores branch November 21, 2026 04:33
@tomMoral

Copy link
Copy Markdown
Contributor

Yeah!! Thanks for the feature, super helpful

@Didayolo

Copy link
Copy Markdown
Member Author

Yeah!! Thanks for the feature, super helpful

Thank YOU, you initiated this PR! You contribution is greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let competition admins monitor hidden leaderboard columns

2 participants