Skip to content

[QTI] Saving a question drops data-catalog-idref from its prompt #6307

Closed as duplicate

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

User-facing consequences

  • An imported item's glossary term stops being a glossary term for learners after any edit in Studio.

Steps to reproduce

  1. Open a QTI choice item with this prompt and catalog:
    <qti-prompt>Pick the <span data-catalog-idref="g1">vowel</span>.</qti-prompt>
    …
    <qti-catalog id="g1">
      <qti-card support="glossary-on-screen"><qti-html-content><p>A letter like A, E, I, O, U.</p></qti-html-content></qti-card>
    </qti-catalog>
  2. Click Edit, expand Hints, click Add hint, type any text, click Close.
  3. The emitted raw_data has <qti-prompt><p>Pick the vowel.</p></qti-prompt>.

Context

Acceptance Criteria

  • Editing any part of such an item keeps data-catalog-idref on the prompt element that carried it.
  • Editing the prompt text around such an element keeps the attribute.
  • A test covers it from opening the item to the emitted raw_data.

AI usage

Claude Code found this during manual QA of #6290 and drafted the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions