You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Older-Kolibri Perseus export of QTI text-entry items keeps only the first accepted answer #6221
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Target branch: unstable
Observed behavior
perseus_derive._derive_text (contentcuration/utils/assessment/qti/perseus_derive.py) builds the Perseus answers from <qti-correct-response> only and ignores <qti-mapping>.
Since #6187 the QTI editor writes a single-cardinality declaration whose <qti-correct-response> holds the first accepted answer; every accepted answer is in the <qti-mapping>. Publishing such a Numeric or Text entry item derives a Perseus question with one answer.
Errors and logs
N/A. No error; the derived item silently has fewer answers.
Expected behavior
The derived Perseus item lists every accepted answer: the <qti-map-entry> keys when a mapping is present, else the <qti-correct-response> values (legacy items).
User-facing consequences
Learners on older Kolibri versions, which render the derived Perseus item, are marked wrong for every accepted answer after the first.
Steps to reproduce
In the QTI editor, create a Numeric question with accepted answers 1, 2, 3, and publish the channel.
Import it into a Kolibri version that renders the Perseus derivation.
I used Claude Code to review #6187's branch. Claude traced the publish path and drafted this issue; I reviewed it against perseus_derive.py and the branch diff.
Every <qti-map-entry> key is accepted regardless of mapped-value — if authors can write 0-scored entries, they would wrongly become correct answers and need a filter.
case-sensitive is dropped, as today for correct values — if older Kolibri's Perseus input needs it, case variants are accepted wrongly.
A <qti-mapping> with no entries falls back to correct-response — if it should mean "no answers", empty-mapping items derive nothing.
Map keys are used verbatim (1.0, not 1) — if older Kolibri compares numeric answers as strings, keys and typed input may mismatch, as for correct values today.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
Ran the project's full test suite and linter before committing
For UI changes: captured live screenshots to verify rendering
For backend changes: verified with example API/CLI output
Activity
rtibblesbot commentedon Sep 30, 2026
Plan:
_derive_textlists every accepted answer —<qti-map-entry>keys when a<qti-mapping>is present, else<qti-correct-response>values.Assumptions — the issue did not settle these; say so if one is wrong.
unstable(a5dc590c5); tests hand-build its XML from the QTI editor emits cardinality="multiple" and match_correct for multi-answer Numeric and Text entry questions #6187 issue body — if the shipped shape differs, the fixture changes.<qti-map-entry>key is accepted regardless ofmapped-value— if authors can write 0-scored entries, they would wrongly become correct answers and need a filter.case-sensitiveis dropped, as today for correct values — if older Kolibri's Perseus input needs it, case variants are accepted wrongly.<qti-mapping>with no entries falls back to correct-response — if it should mean "no answers", empty-mapping items derive nothing.1.0, not1) — if older Kolibri compares numeric answers as strings, keys and typed input may mismatch, as for correct values today.@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?