Skip to content

feat: add gamified, level-aware practice mode for students - #147

Open
Ritwij07 wants to merge 1 commit into
vicharanashala:mainfrom
Ritwij07:feat/gamified-practice-mode
Open

feat: add gamified, level-aware practice mode for students#147
Ritwij07 wants to merge 1 commit into
vicharanashala:mainfrom
Ritwij07:feat/gamified-practice-mode

Conversation

@Ritwij07

@Ritwij07 Ritwij07 commented Aug 1, 2026

Copy link
Copy Markdown

Backend:

  • New GET /api/students/:id/practice endpoint. Reuses the existing generateQuestionsForLevel() level generator (the same one that powers real worksheet PDFs) so practice questions always match the student's real currentLevel/currentSubLevel — never a generic or hardcoded set.
  • Skips the Puppeteer/PDF pipeline entirely for speed, since this is a fast in-class activity, not an official exam paper.
  • Optional ?topic= query param to target one weak area at a time.
  • Deliberately does NOT mutate the official student.streak or levelHistory fields used by the assessment-cycle/evaluation pipeline — practice-session state stays session-local so this can't interfere with the official 3x/year assessment cycle logic other in-flight PRs are working on.
  • Uses the same getAuthUser/canAccessStudent auth pattern as the existing diagnostic endpoint.

Frontend:

  • New PracticeMode.tsx: an interactive practice session — one question at a time, immediate correct/incorrect feedback, a live streak counter, a progress bar, and an end-of-session summary. Supports the existing number/text/choice question types.
  • Wired into PanelViews.tsx's 'Recommended Focus Areas' panel, which previously only showed static text ('Additional practice recommended for X') with no action attached to it. Added a 'Start Practice' button plus a per-topic 'Practice this ->' button so a teacher can launch a session targeted at a specific weak area directly from the student profile.

This turns currentLevel/currentSubLevel/streak — fields that already existed in the data model and were only ever displayed as static numbers — into an actual interactive learning activity, which the project's own README describes as the goal ('gradual, fun activities') but nothing in the codebase implemented yet.

Backend:
- New GET /api/students/:id/practice endpoint. Reuses the existing
  generateQuestionsForLevel() level generator (the same one that
  powers real worksheet PDFs) so practice questions always match the
  student's real currentLevel/currentSubLevel — never a generic or
  hardcoded set.
- Skips the Puppeteer/PDF pipeline entirely for speed, since this is
  a fast in-class activity, not an official exam paper.
- Optional ?topic= query param to target one weak area at a time.
- Deliberately does NOT mutate the official student.streak or
  levelHistory fields used by the assessment-cycle/evaluation
  pipeline — practice-session state stays session-local so this
  can't interfere with the official 3x/year assessment cycle logic
  other in-flight PRs are working on.
- Uses the same getAuthUser/canAccessStudent auth pattern as the
  existing diagnostic endpoint.

Frontend:
- New PracticeMode.tsx: an interactive practice session — one
  question at a time, immediate correct/incorrect feedback, a live
  streak counter, a progress bar, and an end-of-session summary.
  Supports the existing number/text/choice question types.
- Wired into PanelViews.tsx's 'Recommended Focus Areas' panel, which
  previously only showed static text ('Additional practice
  recommended for X') with no action attached to it. Added a
  'Start Practice' button plus a per-topic 'Practice this ->' button
  so a teacher can launch a session targeted at a specific weak area
  directly from the student profile.

This turns currentLevel/currentSubLevel/streak — fields that already
existed in the data model and were only ever displayed as static
numbers — into an actual interactive learning activity, which the
project's own README describes as the goal ('gradual, fun
activities') but nothing in the codebase implemented yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant