Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

QTI editor drops prefixed MathML from a question prompt on save

未关闭
#6,308 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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 内容生成。

描述

bug DEV: frontend

❌ 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:m on 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>
  • adoptNode re-creates foreign elements with createElementNS(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

  1. 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>.
  2. Open the exercise's Questions tab, click "Edit" on the item, type at the end of the question text, click "Close".
  3. 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

learningequality/studio 的其他 Issue

查看 learningequality/studio 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。