
❌ 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 are Paris (case-insensitive), Paris (case-sensitive), Paris (case-insensitive) opens in the Text entry editor as two answers: Paris, Paris.
- The case-sensitive
Paris answer 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
_extractAnswers on 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
AI usage
Claude Code found this while self-reviewing #6282 and drafted the issue; the bug was reproduced against unstable with a Jest test.
❌ 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
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.Parisanswer is dropped; the next save writes the merged list._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
Paris,Paris(case-sensitive),Paris, in that order.User-facing consequences
Steps to reproduce
_extractAnswerson the declaration:[['Paris', false], [' Paris', false]]as[value, caseSensitive].Acceptance Criteria
[[' Paris', false], ['Paris', true], ['Paris', false]].update:rawData.AI usage
Claude Code found this while self-reviewing #6282 and drafted the issue; the bug was reproduced against
unstablewith a Jest test.