Skip to content

Keep QTI item content the editor doesn't write through an edit - #6306

Open
rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6290-74ac01
Open

rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6290-74ac01

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Edits keep stylesheets, modal feedback, extra outcomes, non-hint catalogs and root attributes (xsi:schemaLocation), in schema order.

References

Fixes #6290.

Reviewer guidance

Open questions:

  • Modal feedback goes dormant once response processing is regenerated. Make such items read-only?
  • <qti-template-processing> is still dropped; it can reset the edited correct answer. Keep it, or read-only?
  • tool-name/tool-version carry over. Stamp Studio's own?

Manual QA — import "Skeletal Structure - Practice" (Kolibri QA Channel > Courses > Hummingbird Biology > Anatomy & Physiology > Skeletal Structure) into an editable channel:

  1. Edit a question two times
    1. QUESTIONS tab, Edit question 1.
    2. Change one answer. CLOSE.
    3. Edit. Change a different answer. CLOSE.
    4. Edit. Each answer shows once, both changes kept, correct answer unchanged.
  2. Change the correct answer
    1. Edit question 2. Mark as correct answer on another answer. CLOSE.
    2. FINISH, reopen. Selected answer is correct.
  3. Create a new question
    1. NEW QUESTION. Question, two answers, one correct. CLOSE.
    2. Edit. Mark the other correct. CLOSE.
    3. Edit. New correct answer selected.

Look out for:

  • QUESTIONS tab: a question shown twice or "Incomplete".

Styled/feedback items exist only in test content; see Evidence.

Evidence

Stylesheet, modal feedback, xsi:schemaLocation: delete a hint, save, reopen

Step Screenshot
Seeded question Seeded question
Reopened: one hint left Reopened: one hint left
s1-delete-hint-save-reopen.webm

Stored raw_data keeps all four.

Glossary catalog: add, edit, delete every hint

Step Screenshot
Reopened: no hints, no duplicates Reopened: no hints, no duplicates

Template processing, extra outcomes: change correct answer

Step Screenshot
Reopened: Beta is correct Reopened: Beta is correct

Prefixed root namespaces: edit prompt

Step Screenshot
Prompt edited Prompt edited

Converted legacy question: two saves

Step Screenshot
Answers 4 / 7 / 6, hints edited once Answers 4 / 7 / 6, hints edited once

New question from scratch

Step Screenshot
Reopened: "Blue sky" correct Reopened: "Blue sky" correct
More captures (12)
Step Screenshot
Stylesheet item, two hints Stylesheet item, two hints
Second hint deleted Second hint deleted
Glossary item seeded Glossary item seeded
Glossary: hint added Glossary: hint added
Glossary: hint edited Glossary: hint edited
Glossary: hints deleted Glossary: hints deleted
Scoring item seeded, Alpha correct Scoring item seeded, Alpha correct
Prefixed item before edit Prefixed item before edit
Legacy item preview Legacy item preview
Legacy item: first edit Legacy item: first edit
New question, empty New question, empty
Malformed item read-only Malformed item read-only

AI usage

Claude Code planned, wrote, tested and self-reviewed the change; verified with the QTIEditor Jest suite and pre-commit.

🤖 Generated with Claude Code


Written by rtibblesbot, an LLM-based coding agent.

@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-10-08 06:33 UTC

assembleItemXml takes the item's source XML and carries over its root
attributes, stylesheet, modal feedback, extra outcome declarations and
non-hint catalogs, in schema order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rtibblesbot
rtibblesbot marked this pull request as ready for review October 8, 2026 06:20
@rtibblesbot
rtibblesbot requested review from a team and leq-bot October 8, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QTI] Editing a question keeps the item-level content the editor doesn't write

1 participant