# 3. Leaderboards & Challenges

User Type: **Student**
Source: *Mi Digital Academy - Education CRM Features Document*

---

## 3. Leaderboards & Challenges

### 3.1 Leaderboards
**What it does:** Shows the Student their standing on leaderboards: by class, by subject, and overall. The Student sees their rank, the top performers, and how they compare. Leaderboards are updated on a schedule and can be filtered by period. They motivate the Student through healthy competition.

**Sub-features:**
- Leaderboard by class
- Leaderboard by subject
- Overall leaderboard
- Student's rank highlighted
- Top performers listed
- Filter by period (week, month, term)
- Leaderboard updated on a schedule
- Leaderboard available on web and mobile
- Leaderboard event logging (viewed)
- Audit logging of the leaderboards

**Student User Journey:**
1. Student opens "Gamification" → "Leaderboards" and sees the class leaderboard.
2. The Student's rank is highlighted (5th of 30).
3. The top performers are listed.
4. Student switches to the subject leaderboard for Mathematics.
5. Student filters to the current month.
6. The leaderboard updates on the schedule.
7. Student opens Profile → "Activity" and confirms the leaderboard events are recorded.

**Rules & Edge Cases:**
- Leaderboards are by class, subject, or overall.
- The Student's rank is highlighted.
- The period filter changes the ranking window.
- Leaderboards are updated on a schedule, not in real time.
- Leaderboard events (viewed) are logged with the leaderboard and the timestamp.
- The leaderboards is audit-logged with the account, the leaderboard, and the timestamp.

### 3.2 Challenges
**What it does:** Offers the Student challenges to complete: daily challenges, weekly challenges, and special event challenges. Completing a challenge earns points and sometimes a badge. The Student sees active challenges, their progress, and the reward. Challenges keep the Student engaged between study sessions.

**Sub-features:**
- Daily challenges
- Weekly challenges
- Special event challenges
- Challenge progress tracking
- Reward for completing a challenge (points, badge)
- Active challenges list
- Challenge deadline shown
- Challenge event logging (started, completed)
- Audit logging of the challenges

**Student User Journey:**
1. Student opens "Gamification" → "Challenges" and sees the active challenges.
2. The daily challenge is "Study for 30 minutes".
3. Student completes the challenge; the progress updates.
4. On completion, the Student earns points.
5. A weekly challenge ("Pass 3 quizzes") is in progress.
6. The challenge deadline is shown.
7. Student opens Profile → "Activity" and confirms the challenge events are recorded.

**Rules & Edge Cases:**
- A challenge has a defined goal, a deadline, and a reward.
- Challenge progress is tracked toward the goal.
- A reward is awarded on completion.
- A challenge expires at its deadline.
- Challenge events (started, completed) are logged with the challenge and the timestamp.
- The challenges is audit-logged with the account, the challenge, and the timestamp.

### 3.3 Goals and Milestones
**What it does:** Lets the Student set personal study goals and track milestones toward them. The Student defines a goal (e.g., "Study 20 hours this month"), sees progress, and is celebrated at milestones. Goals are the Student's own targets, distinct from the platform's challenges.

**Sub-features:**
- Set a personal study goal
- Goal progress tracking
- Milestones within a goal
- Milestone celebration
- Goal list (active and completed)
- Goal deadline
- Goal event logging (set, milestone reached, completed)
- Audit logging of the goals and milestones

**Student User Journey:**
1. Student opens "Gamification" → "Goals" and sets a goal: "Study 20 hours this month".
2. The goal progress updates as the Student studies.
3. A milestone is celebrated at 10 hours.
4. The goal list shows active and completed goals.
5. The goal deadline is shown.
6. On reaching 20 hours, the goal is completed and celebrated.
7. Student opens Profile → "Activity" and confirms the goal events are recorded.

**Rules & Edge Cases:**
- A goal has a defined target and a deadline.
- Goal progress is tracked toward the target.
- Milestones are celebrated at defined fractions of the goal.
- A goal is completed when the target is met by the deadline.
- Goal events (set, milestone reached, completed) are logged with the goal and the timestamp.
- The goals and milestones is audit-logged with the account, the goal, and the timestamp.
