Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

QTI editor drops prefixed MathML from a question prompt on save

Aperta
#6,308 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
192
Fork
310
Merge medio
2g 6h
PR unite (30g)
65

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di learningequality/studio

Tutte le issue di learningequality/studio

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.