What: Add a per-course leaderboard showing top performers by quiz score.
Why: Course-level competition drives engagement. Users want to see how they rank against others taking the same course.
Scope: Create endpoint that queries quiz submissions for a specific course, aggregates scores per user, and returns top 20 with rank, displayName, and average score.
Acceptance criteria:
- Returns top 20 users for a specific course
- Sorted by average quiz score
- Includes number of quizzes taken
- Cached for 5 minutes
Technical context: src/modules/quizzes/quiz.service.ts — quiz queries. src/database/schema.ts:113-142 — quizSubmissions.
What: Add a per-course leaderboard showing top performers by quiz score.
Why: Course-level competition drives engagement. Users want to see how they rank against others taking the same course.
Scope: Create endpoint that queries quiz submissions for a specific course, aggregates scores per user, and returns top 20 with rank, displayName, and average score.
Acceptance criteria:
Technical context:
src/modules/quizzes/quiz.service.ts— quiz queries.src/database/schema.ts:113-142— quizSubmissions.