feat(reading): add server-owned quiz star rewards
Author: evan188199-techCreated Sep 29, 2026Updated Sep 29, 2026
Problem
Immersive Reading quizzes now persist server-graded answers, but younger readers get no durable, kid-friendly sense of progress after finishing a chapter quiz.
Proposal
- Add a server-owned star reward watermark for each reading material and locator.
- Award one star when every question in the current server-generated quiz has a graded submission, and add one star for each correctly answered question (for a three-question quiz: 1, 2, or 3 stars).
- Keep the highest watermark across retries and regenerated quizzes; incorrect or partial attempts never remove stars.
- Return the reward summary to the reader UI and show it after quiz results, with localized copy.
Non-goals
- No client-trusted score or client-generated award.
- No blocking modal that infers chapter completion from page scrolling.
- No replacement for the existing immutable assessment records.
Implementation notes
The existing POST /api/reading/materials/{material_id}/extensions/quiz/answers already validates the server answer key and records durable assessment evidence. The reward should be derived and persisted from that same server flow rather than introducing a separate learner-writeable attempt API.
Source: HKUDS/DeepTutor