Skip to content

[QTI] Publish raw_data QTI assessment items as QTI/IMSCP packages #6000

Description

@rtibbles

Overview

Publish exercise nodes of authored QTI by packaging the stored item XML into a QTI/IMS content package, rather than rebuilding it from structured fields.

Complexity: High
Target branch: unstable

Context

  • Today QTI is chosen only when a node has a free_response question; QTIExerciseGenerator (contentcuration/contentcuration/utils/assessment/qti/archive.py) builds item XML from structured fields and writes imsmanifest.xml + the zip.
  • Native QTI items already hold their full XML in raw_data.
  • Items reference media; dependencies must be collected from the XML (existing LocalSrcPath / get_file_dependencies mechanics).

The Change

  • Route nodes whose items are all QTI (no perseus_question) to QTI packaging.
  • Build the package from the stored item XML: validate (Ant's backend plus setting up front end files #2), collect referenced media, assemble manifest + zip.
  • Surface validation failures during publish.

Acceptance Criteria

  • A node with QTI items publishes a QTI/IMSCP package whose item XML matches the authored raw_data
  • Referenced media is included and correctly addressed in the package
  • Items are schema-validated (Ant's backend plus setting up front end files #2) before packaging; failures stop publish with a clear error
  • The package is a valid IMSCP container of QTI 3.0 items
  • Republish replaces stale archives correctly
  • Tests cover packaging, media inclusion, and validation-failure handling

References

  • contentcuration/contentcuration/utils/publish.py
  • contentcuration/contentcuration/utils/assessment/qti/archive.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