Skip to content

[QTI] Reusable legacy→QTI assessment-item conversion utility #6003

Description

@rtibbles

Overview

Build the reusable legacy→QTI conversion — structured single/multiple selection, input, true/false → <qti-assessment-item> XML. This is the pure conversion utility; wiring it into the API endpoint (dual-read) is #6030, and the one-time global backfill is #6007.

Complexity: Medium
Target branch: unstable

Context

The Change

  • Provide a reusable legacy→QTI conversion producing <qti-assessment-item> XML from a structured item (single/multiple selection, input, true_false).
  • Make it lossless: prompt, choices/answers, correctness, hints, and media survive.
  • Leave perseus_question items untouched — out of scope here.
  • Surface items that fail conversion, rather than silently dropping them.

Acceptance Criteria

  • A reusable conversion produces <qti-assessment-item> XML from each supported legacy type (single/multiple selection, input, true_false)
  • The conversion is almost lossless: prompt, choices/answers, correctness, and media survive
  • Each converted item validates against the QTI 3.0 XSD ([QTI] QTI 3.0 schema XML validation utilities #6005)
  • Items that fail conversion are surfaced, not silently dropped
  • Tests cover conversion per legacy type

Out of scope

  • Hint conversion, this will be added in follow up

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

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions