kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Learn Home class practice quiz cards read "0 questions left" until the lesson is opened

Open rtibblesbot opened this issue 1 week ago • 0 comments

❌ 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 only progress; resumable_resources_progress is empty whenever a class resource is in progress.
  • _cacheLessonResources passes only content_id and progress to setContentNodeProgress, so the store has no total_questions for the node.
  • With total_questions missing, ProgressBar.vue shows "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

  1. As a learner in a class, open a lesson with a practice quiz of 3 questions.
  2. Answer Question 1 and click Next; click Go back.
  3. Open Home and reload. The "Continue learning from your classes" card reads "0 questions left".
  4. 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.

rtibblesbot avatar Nov 25 '26 05:11 rtibblesbot