Skip to content

Let the host download the final leaderboard as CSV - #239

Merged
TheCodeHeist-Coder merged 2 commits into
TheCodeHeist-Coder:mainfrom
harshvardhan60792:leaderboard-csv-download
Nov 18, 2026
Merged

TheCodeHeist-Coder merged 2 commits into
TheCodeHeist-Coder:mainfrom
harshvardhan60792:leaderboard-csv-download

Conversation

@harshvardhan60792

Copy link
Copy Markdown
Contributor

Part of #201. CSV only, the PDF export is not included.

  • Adds a Download CSV button on the final results screen, shown to the host only.
  • Columns are Rank, Name, Score, Time (s), taken from the already sorted leaderboard, so the time column explains tie order.
  • Names with commas, quotes or line breaks are quoted. Names starting with = + - or @ get a leading apostrophe so Excel and Sheets do not run them as formulas. A UTF-8 BOM is added so non-ASCII names open correctly in Excel. No new dependency.
  • Filename is rexial-leaderboard--.csv. The lobby does not have the quiz title in state, so the session id stands in for it.

Tests: new leaderboardCsv.test.ts (5 cases) passes, and tsc is clean.

@TheCodeHeist-Coder TheCodeHeist-Coder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@harshvardhan60792 Thankyou for showing interest in this. This looks good.

@TheCodeHeist-Coder
TheCodeHeist-Coder merged commit e59d40f into TheCodeHeist-Coder:main Nov 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request level2 nsoc26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants