[QTI] Text entry answers are merged and reordered when the first answer has surrounding space
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 15/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, xml
- Ambito
- frontend
Direzione di ricerca
The bug is in _extractAnswers in interactions/textEntry/parse.js, which compares the trimmed qti-value with the untrimmed first map-key. Reproduce it with a Jest test using the declaration from the issue, then check that the output is [[' Paris', false], ['Paris', true], ['Paris', false]] and that opening the item emits no update:rawData. The issue states it is not open for contribution, so confirm with maintainers before starting.
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.
Target branch: unstable
Observed behavior
- A
base-type="string"declaration whose map-keys areParis(case-insensitive),Paris(case-sensitive),Paris(case-insensitive) opens in the Text entry editor as two answers:Paris,Paris. - The case-sensitive
Parisanswer is dropped; the next save writes the merged list. - Cause:
_extractAnswers(interactions/textEntry/parse.js) compares the trimmed<qti-value>with the untrimmed first map-key, so the editor-shaped check fails and answers are read by value instead.
Expected behavior
- Answers open as stored:
Paris,Paris(case-sensitive),Paris, in that order.
User-facing consequences
- An author who edits such a question loses an answer and its case-sensitivity without being told.
Steps to reproduce
- Call
_extractAnswerson the declaration:<qti-response-declaration identifier="RESPONSE" cardinality="single" base-type="string"> <qti-correct-response><qti-value> Paris</qti-value></qti-correct-response> <qti-mapping default-value="0"> <qti-map-entry map-key=" Paris" mapped-value="1" case-sensitive="false"/> <qti-map-entry map-key="Paris" mapped-value="1" case-sensitive="true"/> <qti-map-entry map-key="Paris" mapped-value="1" case-sensitive="false"/> </qti-mapping> </qti-response-declaration> - It returns
[['Paris', false], [' Paris', false]]as[value, caseSensitive].
Acceptance Criteria
- The declaration above reads as
[[' Paris', false], ['Paris', true], ['Paris', false]]. - Opening such an item in edit mode emits no
update:rawData.
AI usage
Claude Code found this while self-reviewing #6282 and drafted the issue; the bug was reproduced against unstable with a Jest test.
- Lingua principale
- Python
- Stelle
- 191
- Fork
- 308
- 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
-
bug DEV: frontend
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
learningequality/studio#6308 ·
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
-
Claiming namespace `jft63`Apertanamespace operations
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
EclipseFdn/open-vsx.org#14043 ·
I maintainer di solito rispondono entro 1 giorno
-
feedback simulation workshop
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
githubnext/gh-aw-workshop#4455 ·
I maintainer di solito rispondono entro 1 giorno
-
Triage 🩺
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Container scenario crashes without expected_recovery_time, kube DNS example uses retry_waitApertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
krkn-chaos/krkn#1627 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NousResearch/hermes-agent#136483 ·
I maintainer di solito rispondono entro 1 giorno