[QTI] Editing a question keeps the item-level content the editor doesn't write
维护者通常 1 天内回复
@rtibblesbot 已经在做这个了。
开始于 2026年10月6日。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, python
- 领域
- frontend
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
❌ 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
- 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. - Click Edit and remove a hint.
- 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:schemaLocationdoesn'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.
- 主要语言
- Python
- 星标
- 191
- 派生
- 308
- 平均合并
- 2 天 14 小时
- 30 天内合并 PR
- 57
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
learningequality/studio 的其他 Issue
-
DEV: frontend P3 - low
难度 2/5 1-3 小时 新手友好度 74/100
learningequality/studio#5868 ·
维护者通常 1 天内回复
-
TAG: tech update / debt
难度 2/5 1-3 小时 新手友好度 62/100
learningequality/studio#2245 ·
维护者通常 1 天内回复
-
DEV: frontend
难度 3/5 1-2 天 新手友好度 45/100
learningequality/studio#6296 ·
维护者通常 1 天内回复
-
bug DEV: backend
难度 3/5 半天 新手友好度 35/100
learningequality/studio#6294 ·
维护者通常 1 天内回复
-
DEV: frontend P1 - important TAG: a11y
难度 2/5 1-3 小时 新手友好度 28/100
learningequality/studio#6292 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
area/install reliability
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
FluidNumerics/fluid-walk-blocker#191 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
TransformerLensOrg/TransformerLens#1868 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
climate-analytics-lab/jax-gcm#1057 ·
维护者通常 1 天内回复