QTI editor drops prefixed MathML from a question prompt on save
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
❌ 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.
- Lingua principale
- Python
- Stelle
- 192
- Fork
- 310
- Merge medio
- 2g 6h
- PR unite (30g)
- 65
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di learningequality/studio
-
Set unpublishable: true on PublishedChange by construction to simplify handleMaxRevs predicateApertaDEV: frontend P3 - low
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
learningequality/studio#5868 ·
I maintainer di solito rispondono entro 1 giorno
-
TAG: tech update / debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
learningequality/studio#2245 ·
I maintainer di solito rispondono entro 1 giorno
-
[QTI] Text entry answers are merged and reordered when the first answer has surrounding spaceApertabug DEV: frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 15/100
learningequality/studio#6309 ·
I maintainer di solito rispondono entro 1 giorno
-
bug DEV: frontend
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
learningequality/studio#6307 ·
I maintainer di solito rispondono entro 1 giorno
-
bug DEV: backend python
Difficoltà 3/5 1-2 giorni Idoneità per principianti 30/100
learningequality/studio#6305 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di learningequality/studio
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vllm-project/vllm#61131 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kubernetes-client/python#2735 ·
I maintainer di solito rispondono entro 1 giorno
-
desktop help wanted test
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Broken links found in docsApertadocs pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pydantic/pydantic-ai#10113 ·
I maintainer di solito rispondono entro 1 giorno
-
Tutorial unit test leaks sample data into tutorial doctestForse già presa @Gambit-Checkmate l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100