[QTI] Text entry answers are merged and reordered when the first answer has surrounding space
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 15/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, xml
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
❌ 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.
- 主要言語
- Python
- スター
- 192
- フォーク
- 310
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 65
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
learningequality/studio のほかの issue
-
DEV: frontend P3 - low
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
learningequality/studio#5868 ·
メンテナーはふだん 1 日以内に返信
-
TAG: tech update / debt
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
learningequality/studio#2245 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: frontend
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
learningequality/studio#6308 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: frontend
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
learningequality/studio#6307 ·
メンテナーはふだん 1 日以内に返信
-
bug DEV: backend python
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
learningequality/studio#6305 ·
メンテナーはふだん 1 日以内に返信
learningequality/studio の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
KalicoCrew/kalico#1012 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
esphome/esphome.io#7657 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
VNG-Realisatie/gemma-zaken#2658 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
comp/gateway comp/plugins duplicate P3 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#137019 ·
メンテナーはふだん 1 日以内に返信