Learn Home class practice quiz cards read "0 questions left" until the lesson is opened
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: release-v0.20.x
Observed behavior
On Learn > Home, a practice quiz under "Continue learning from your classes" reads "0 questions left" however many questions the learner has answered. /api/content/contentnodeprogress/ returns the right counts, e.g. num_question_answered: 2, total_questions: 3.
- The Home page fills the progress store from
homehydrate, whose class lesson resources carry onlyprogress;resumable_resources_progressis empty whenever a class resource is in progress. _cacheLessonResourcespasses onlycontent_idandprogresstosetContentNodeProgress, so the store has nototal_questionsfor the node.- With
total_questionsmissing,ProgressBar.vueshows "0 questions left". - Opening the lesson fetches the counts; back on Home the card then reads correctly until the next reload.
Expected behavior
The Home card shows the same remaining-questions count as the lesson page.
User-facing consequences
A learner with unanswered questions is told none are left.
Steps to reproduce
- As a learner in a class, open a lesson with a practice quiz of 3 questions.
- Answer Question 1 and click Next; click Go back.
- Open Home and reload. The "Continue learning from your classes" card reads "0 questions left".
- Open the lesson: its card reads "2 questions left". Click Home: the Home card now reads "2 questions left". Reload: "0 questions left" again.
Context
Kolibri release-v0.20.x at 9bec30782b, dev server, Chromium.
Acceptance Criteria
- [ ] After a reload of Learn > Home, a class practice quiz card with 1 of 3 questions answered reads "2 questions left".
- [ ] Jest or API tests cover the counts reaching the Home card.
AI usage
Claude Code found this during browser QA of #16030, traced the data path and drafted this issue.