Skip to content

[QTI] Dual-publish Perseus zips for choice/text-entry (math input only) QTI items #6001

Description

@rtibbles

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Derive a Perseus archive from QTI items whose interaction type Perseus can express (single/multiple choice, text/math input), published alongside the QTI package so older Kolibri still renders the content.

Complexity: High
Target branch: unstable

Context

  • Older Kolibri renders Perseus; newer renders QTI. The authored source of truth is QTI XML in raw_data.
  • PerseusExerciseGenerator builds Perseus from structured question/answers, which native QTI items no longer carry.
  • The pydantic models can read the choice/text-entry subset. Advanced interaction types have no Perseus equivalent.

The Change

  • For QTI items mapping to a Perseus question type, derive the structured form from the QTI XML and produce a Perseus archive in addition to the QTI package.
  • Publish QTI only for nodes containing any interaction with no Perseus equivalent — never a partial or invalid Perseus.

Acceptance Criteria

  • A node of choice/text-input QTI items publishes both a QTI package and a Perseus archive
  • The derived Perseus matches the QTI item: prompt, choices, correct answers
  • Nodes containing any non-Perseus-expressible interaction publish QTI only
  • Older Kolibri (Perseus) and newer Kolibri (QTI) each render the node
  • Tests cover derivation for single choice, multiple choice, and text/math input, plus the QTI-only fallback

References

  • contentcuration/contentcuration/utils/assessment/perseus.py

AI usage

Architecture decided with the maintainer across an iterative session: blanket QTI type with the item XML in raw_data; XSD-authoritative validation across all sources; a legacy→QTI global migration with an API-layer dual-read; ricecooker upload delegating to the AssessmentItem serializer; and a Perseus custom-interaction contract confirmed against the QTI 3.0 specification. Claude mapped the existing publish/validation/ricecooker code, proposed the breakdown, and drafted each issue; the maintainer steered every decision and reviewed throughout.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions