Older-Kolibri Perseus export of a QTI Text entry item answered `1_000` or `٥` has no answers
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with perseus_derive._accepted_values, extract_value, and PerseusExerciseGenerator._process_input_answers, then reproduce the issue using derive_perseus_item as described. Check the rendered perseus/input_question.json output and add coverage showing that non-xsd:double forms such as 1_000 and ٥ are handled as expected without producing an incorrect answer set.
由索引模型根据 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
perseus_derive._accepted_values keeps any answer Python float() reads as finite. float() also reads forms that are not xsd:double:
- digit separators:
1_000,1_0E3 - non-ASCII digits:
٥,5
extract_value rejects these, so PerseusExerciseGenerator._process_input_answers drops them. The derived Perseus item ships "answers": [].
Errors and logs
None. No warning is logged.
Expected behavior
_accepted_values accepts only xsd:double values (ASCII digits, no _), so an item whose only answers are these forms is answerless and publishes in neither archive.
User-facing consequences
Learners on older Kolibri get an input question that marks every answer wrong.
Steps to reproduce
derive_perseus_item(_Item(_text_item("single", ["1_000"])))— answers["1_000"].- Pass them through
_process_input_answers, then renderperseus/input_question.json. - The
numeric-input 1widget has no answers.
Same for ["٥"].
Context
- The editor rejects these forms; ricecooker-imported QTI items do not.
- Related: #6222, #6224
AI usage
Drafted by Claude Code during review of #6224. Reproduced on unstable with a script calling derive_perseus_item, _process_input_answers and the template.
- 主要语言
- Python
- 星标
- 211
- 派生
- 317
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 25
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
难度 2/5 1-3 小时 新手友好度 20/100
learningequality/studio#6378 ·
维护者通常 1 天内回复
-
dependencies DEV: backend python
难度 4/5 1-2 天 新手友好度 25/100
learningequality/studio#6376 ·
维护者通常 1 天内回复
-
dependencies DEV: frontend
难度 4/5 3-5 天 新手友好度 8/100
learningequality/studio#6375 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
bug ready-for-dev
难度 1/5 1-3 小时 新手友好度 92/100
OpenHands/extensions#897 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
tensorflow/datasets#11253 ·
维护者通常 1 天内回复
-
fix(core): a config section with all keys commented out crashes startup可能已有人在做 @Aryanbhargava18 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
kubeflow/mcp-server#512 ·
维护者通常 1 天内回复
-
Stop trusting the compromised eMudhra CA certificates可能已有人在做 @anth-volk 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
PolicyEngine/uk-triple-lock#54 ·
维护者通常 1 天内回复
-
DBFS append mode silently overwrites existing files可能已有人在做 @IlyaKhalafi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
fsspec/filesystem_spec#2429 ·
维护者通常 1 天内回复