QTI editor drops prefixed MathML from a question prompt on save
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
Start with contentcuration/contentcuration/frontend/shared/views/QTIEditor/serialization/xml.js, especially the adoptNode code at lines 99–103, and trace how the prompt reaches TipTap and is serialized back to raw_data. Reproduce the prefixed-MathML case described in the issue, then add an end-to-end test for opening and saving the item. Done means the formula remains MathML in raw_data and the saved item passes the QTI XSD check.
由索引模型根据 Issue 内容生成。
描述
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Observed behavior
- A QTI item whose prompt carries MathML under a prefix (
xmlns:mon the root,<m:math>in the prompt) loses the formula on its first save from the editor. Only its text survives. - Source prompt:
<qti-prompt>solve <m:math><m:mi>x</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.</qti-prompt> - Saved prompt after typing at the end:
<qti-prompt><p>solve x+1. Edited</p></qti-prompt> adoptNodere-creates foreign elements withcreateElementNS(namespace, node.tagName), so the HTML handed to TipTap contains<m:math>, which TipTap does not recognise as math.
Expected behavior
- The formula in the prompt survives the edit.
User-facing consequences
- Imported items that use prefixed MathML silently lose their formulas the first time anyone edits the question text, and publish without them.
Steps to reproduce
- Seed an exercise with a QTI item whose root declares
xmlns:m="http://www.w3.org/1998/Math/MathML"and whose single-choice prompt contains<m:math>…</m:math>. - Open the exercise's Questions tab, click "Edit" on the item, type at the end of the question text, click "Close".
- Read the saved
raw_data: the<m:math>element is gone.
Seen on unstable at 90c5b61902187e722c055cca8eb1137a29a30ace, during manual QA for #6290.
Acceptance Criteria
- Editing the prompt of an item with
<m:math>(prefixed MathML) saves a prompt that still contains the formula as MathML. - The saved item passes the QTI XSD check.
- 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.
- 主要语言
- Python
- 星标
- 191
- 派生
- 308
- 平均合并
- 2 天 6 小时
- 30 天内合并 PR
- 65
环境准备
- 提供 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 天内回复
-
bug DEV: frontend
难度 2/5 1-3 小时 新手友好度 15/100
learningequality/studio#6309 ·
维护者通常 1 天内回复
-
bug DEV: frontend
难度 3/5 1-2 天 新手友好度 20/100
learningequality/studio#6307 ·
维护者通常 1 天内回复
-
bug DEV: backend python
难度 3/5 1-2 天 新手友好度 30/100
learningequality/studio#6305 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
docs(types): update the collection binding note now that typed collections shipped in pycubrid 1.9.0未关闭documentation priority: low size: S
难度 2/5 1-3 小时 新手友好度 75/100
cubrid-lab/sqlalchemy-cubrid#768 ·
维护者通常 1 天内回复
-
bug help wanted
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
documentation
难度 1/5 1 小时以内 新手友好度 65/100
ansys/pydpf-core#3547 ·
维护者通常 1 天内回复
-
core
难度 2/5 1-3 小时 新手友好度 70/100
vectorize-io/hindsight#5457 ·
维护者通常 1 天内回复
-
[Bug]: LangChain drops OpenAI Responses text blocks from session recording可能已有人在做 @ktz03 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
volcengine/OpenViking#5806 ·
维护者通常 1 天内回复