We are expanding the gamification system on user profiles! We need to implement a new "HARD_CARRY" badge that unlocks dynamically based on a user's progress.
Badge Name: [HARD_CARRY]
Unlock Condition: Over the past 7 days (the last 8 snapshots in their history array), the user solved 5 or more Hard problems, but exactly 0 Easy problems.
Implementation Steps
This is a purely frontend feature. All logic belongs in frontend/js/user/badges.js and CSS styling in frontend/user.html.
- Add the badge object to the
ALL_BADGES array.
- Write the evaluation logic inside the
loadBadges() function to check the user's history data. If the condition is met, add the ID to the earnedSet.
- Add a visually distinct CSS class (e.g. aggressive crimson/red theme) for the badge in
frontend/user.html.
We are expanding the gamification system on user profiles! We need to implement a new "HARD_CARRY" badge that unlocks dynamically based on a user's progress.
Badge Name:
[HARD_CARRY]Unlock Condition: Over the past 7 days (the last 8 snapshots in their history array), the user solved 5 or more Hard problems, but exactly 0 Easy problems.
Implementation Steps
This is a purely frontend feature. All logic belongs in
frontend/js/user/badges.jsand CSS styling infrontend/user.html.ALL_BADGESarray.loadBadges()function to check the user'shistorydata. If the condition is met, add the ID to theearnedSet.frontend/user.html.