kolibri
kolibri copied to clipboard
Next stays enabled in a learner quiz with no questions
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: develop
Observed behavior
- Next is disabled by
questionNumber === questionsTotal - 1. With an emptyassessment_item_ids,questionsTotal - 1is-1, so Next stays enabled at question 0. - Pressing it moves to question index 1, which has no item.
- Sites:
- https://github.com/learningequality/kolibri/blob/886a0c9f24da6f6d5163d2879826170fcd2bbf00/kolibri/plugins/learn/frontend/views/QuizRenderer/index.vue#L77
- https://github.com/learningequality/kolibri/blob/886a0c9f24da6f6d5163d2879826170fcd2bbf00/kolibri/plugins/learn/frontend/views/courses/QuizRenderer/index.vue#L78
- https://github.com/learningequality/kolibri/blob/886a0c9f24da6f6d5163d2879826170fcd2bbf00/kolibri/plugins/learn/frontend/views/courses/PrePostTestRenderer/index.vue#L84
Expected behavior
- Next is disabled when there is no later question, including when there are no questions.
Steps to reproduce
- Render
QuizRendererwithassessmentmetadata: { assessment_item_ids: [] }. - Next is enabled.
Context
- develop at
886a0c9f24.
Acceptance Criteria
- [ ] In practice quizzes, surveys, course quizzes and course pre/post tests, Next is disabled when the item list is empty.
- [ ] Specs cover the empty case in each renderer.
AI usage
Claude Code found this while working on #15980 and drafted the issue; rtibbles assigned that task.