Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#6,290 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript, python
Domain
frontend

Research direction

Start with contentcuration/frontend/shared/views/QTIEditor/serialization/assembleItem.js, especially assembleItemXml, and trace how useQtiItem opens and emits the item. Add or locate tests that open an item containing each listed stylesheet, modal-feedback element, or root attribute, then inspect emitted raw_data. Done means all three are preserved after editing, with tests covering each case.

Written by the indexing model from the issue text.

Description

bug

❌ 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

The first edit to a QTI question rewrites <qti-assessment-item> with only what assembleItemXml writes: the root's identifier, title, language and fixed flags, response and outcome declarations, the body, the hint catalog and response processing. Anything else outside <qti-item-body> is dropped:

  • <qti-stylesheet>
  • <qti-modal-feedback>
  • root attributes such as xsi:schemaLocation

Errors and logs

None. The content is lost without a warning.

Expected behavior

An edit keeps every element and attribute of <qti-assessment-item> outside <qti-item-body> that the editor doesn't write, or the item shows unsupportedItemMessage$() read-only, as #6225 does for bodies the editor can't reproduce.

User-facing consequences

An item uploaded with ricecooker that carries a stylesheet or modal feedback loses it the first time an author changes anything, such as a hint. Learners then see the question unstyled, or get no feedback after answering.

Steps to reproduce

  1. Open an exercise containing a QTI choice item with <qti-stylesheet href="style.css" type="text/css"/> before <qti-item-body> and a <qti-modal-feedback> after it.
  2. Click Edit and remove a hint.
  3. Inspect the emitted raw_data: it has no <qti-stylesheet> and no <qti-modal-feedback>.

Acceptance Criteria

  • Editing an item with a <qti-stylesheet> doesn't lose it.
  • Editing an item with a <qti-modal-feedback> doesn't lose it.
  • Editing an item whose root carries xsi:schemaLocation doesn't lose it.
  • Tests cover each case above, from opening the item to the emitted raw_data.

AI usage

Claude Code found this while reviewing the #6225 branch and drafted this issue. The loss was reproduced under Jest on unstable by opening such an item through useQtiItem, removing a hint and reading the assembled XML.

Dominant language
Python
Stars
191
Forks
308
Avg merge
2d 3h
Merged PRs (30d)
54

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from learningequality/studio

All issues in learningequality/studio

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.