Repository navigation
Reopen a Text entry answer of NULL as authored - #6285
Conversation
8bb3b93 to
96c51f1
Compare
|
Rebased onto |
AlexVelezLl
left a comment
There was a problem hiding this comment.
This is not the correct fix. The bug is that we incorrectly treat "NULL" strings as null values in the coerceValue method. This came from the same Kolibri assumption. Could you instead remove that condition wherever it appears in Studio, and open an issue in Kolibri reporting the same thing there?
`coerceValue` mirrored Kolibri's assumption that the string `NULL` is QTI NULL, so a Text entry answer of `NULL` reopened empty. Fixes learningequality#6272 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@AlexVelezLl Done:
Saved The unticked reopen was not captured: the QA server's Redis failed mid-run. Its saved XML reads |
bd612a6 to
f016590
Compare
|
Quick check on rtibblesbot's work on this PR: react 👍 helpful · 😕 mixed · 👎 not helpful. Reply with anything specific. |

Summary
NULLreopened empty, marking the question incomplete.NULLas null, an assumption copied from Kolibri.References
Fixes #6272.
Reviewer guidance
NULLto null, so it may never score; flag it in Studio?coerceValueis shared: correct responses, mappings and default values all keepNULLnow.Legacy check after
pnpm devsetup(sign ina@a.com/a):Open "Sample Exercise": "Capital of France?" is Text entry with Paris/paris/NULL ticked; "Describe Paris." is Free response. Add
Lutetia, untick paris, reopen: Paris ☑, paris ☐, NULL ☑, Lutetia ☐.Manual QA. QA team: A Text entry answer of
NULLnow reopens as typed. A regression is most probable in reopened answers, their Case-sensitive ticks, their errors and the incomplete-question count.In an exercise, open Edit details > Questions. Click New question and set Response type to Text entry. To reopen, click Close, reload the page and click Edit on the question.
NULLwith Case-sensitive on, then off. Reopen.NULLshows with the same tick and no Incomplete badge.NULL(Case-sensitive on),null(off),Apple(on) andApple(off). No error shows. Reopen.NULL(on),null(off) andApple(off) show.apple. "Duplicate answers are not allowed" shows underAppleandapple. Reopen. "1 incomplete question" and both errors show. Deleteappleand reopen. The count goes away.appleand one empty answer. Reopen.appleshows without spaces. The empty answer shows "Cannot be empty".5,5.0and1.2.3. Reopen. "Duplicate answers are not allowed" shows under5and5.0, and "Must be a valid number (e.g. 12, 0.5, -3.14)" under1.2.3. Incomplete shows. Change them to5.50and1.20, then reopen. The answers show as typed, with no errors.Older input questions cannot be made in the UI. The reviewer check above covers them.
Evidence
NULL, null and Apple
appleadded: duplicate error under Apple and appleNumeric answers
More captures (3)
AI usage
Claude Code wrote the fix and tests.
🤖 Generated with Claude Code
Written by rtibblesbot, an LLM-based coding agent.
🟡 Waiting for feedback
Last updated: 2026-10-06 23:09 UTC