Skip to content

Older-Kolibri Perseus export of QTI text-entry items keeps only the first accepted answer #6221

Open

Description

@rtibblesbot

❌ 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

  1. In the QTI editor, create a Numeric question with accepted answers 1, 2, 3, and publish the channel.
  2. Import it into a Kolibri version that renders the Perseus derivation.
  3. Answer 2. It is marked incorrect.

Context

AI usage

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.

Activity

  1. added theissue type on Sep 30, 2026
  2. self-assigned this
    on Sep 30, 2026
  3. rtibblesbot commented on Sep 30, 2026

    @rtibblesbot
    ContributorAuthor

    Plan: _derive_text lists every accepted answer — <qti-map-entry> keys when a <qti-mapping> is present, else <qti-correct-response> values.

    • Derive text answers from the mapping
    • Self-review and /simplify

    Assumptions — the issue did not settle these; say so if one is wrong.


    @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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions