Implement priority-based scoring system with streaks and monthly leaderboards#5
Draft
Implement priority-based scoring system with streaks and monthly leaderboards#5
Conversation
…ards Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Co-authored-by: kushb007 <26575576+kushb007@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve leaderboard and scoring system for students
Implement priority-based scoring system with streaks and monthly leaderboards
Dec 31, 2025
kushb007
reviewed
Dec 31, 2025
Owner
kushb007
left a comment
There was a problem hiding this comment.
The scoring system should only apply to the first submission of an open time complexity. Once a time complexity is solves, it and all easier complexities are closed from scoring.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Students are rewarded based on priority: (1) first to solve a problem, (2) optimal solution [reserved for future], (3) daily solve streaks, (4) monthly top 3 rankings.
Scoring Formula
Examples: 1000-rated problem = 100 pts base, 200 pts if first solve. 7-day streak = 175 pts bonus, 14-day = 560 pts.
Database Changes
current_streak,longest_streak,last_solve_date,monthly_score,last_monthly_resetsolved_attimestamp for streak calculationImplementation
bemo/scoring.py: Centralized scoring logic (update_user_streak,calculate_problem_score,update_monthly_score)routes.py: Integrated into submission flow at line 540-569, added/leaderboardrouteUI
Home page - Three-column layout: All-Time, Monthly (with 🥇🥈🥉), Contributors
Leaderboard page - Tabbed view (Monthly/All-Time/Streaks) with scoring documentation
Dashboard - Added current streak (🔥), longest streak, monthly score cards
Migration
Run
migrate_scoring_system.pyto add new columns and MonthlyLeaderboard table. Idempotent and backward compatible.Future Work
Time complexity analysis (priority #2) requires Judge0 execution metrics integration - infrastructure prepared in scoring module for cascading rewards (O(n) earns O(n²) points but not O(1)).
See
SCORING_SYSTEM.mdfor API documentation andIMPLEMENTATION_SUMMARY.mdfor deployment checklist.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.