Repository navigation
Trim QTI text entry answers and inline choice options on save - #6295
Merged
AlexVelezLl merged 2 commits intoOct 6, 2026
Merged
Conversation
- Stored XML now matches what the editor validates and reloads. - Trimmed at build time; editor state keeps typed whitespace. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…items Padded <qti-value> or map-key text no longer leaks into Perseus answers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rtibblesbot
marked this pull request as ready for review
October 6, 2026 08:10
AlexVelezLl
approved these changes
Oct 6, 2026
AlexVelezLl
left a comment
Member
There was a problem hiding this comment.
Code changes look good and manual QA checks out! LGTM!
Contributor
Author
|
Quick check on rtibblesbot's work on this PR: react 👍 helpful · 😕 mixed · 👎 not helpful. Reply with anything specific. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
References
Fixes #6264.
Reviewer guidance
map-keykept typed spaces) — should numeric keep its typed value?_correct_valuesstripping also affects choice items:<qti-value> choice_0 </qti-value>now derives as correct instead of matching nothing. Wanted beyond text entry?QA team: text entry and numeric answers now save without surrounding spaces. Regressions most likely in answer validation.
Sign in as a channel editor. Open "Sample Exercise" in "Published Channel" > "Topic 1".
Text entry answers
Spaces stay while you type. After the reload, the answers are "Paris" and "london". Case-sensitive is ticked only on "london".
Numeric answers
Before step 3, "+5" and "5.0" show "Duplicate answers are not allowed". "abc" shows "Must be a valid number (e.g. 12, 0.5, -3.14)". After the reload, the answers are "+5" and "-7.5".
Show answers
The text entry answers are "Paris" and "london".
Look out for:
Skip inline choice: the editor cannot make it. Manual QA cannot reach questions that older versions saved with spaces.
Evidence
Text entry answers with spaces
Numeric answers with spaces
Existing answer stored with spaces
Answers in the side panel
More captures (3)
AI usage
Used Claude Code to write the fix and its tests from the issue. Verified with the Jest and pytest suites for the changed modules and pre-commit.
Written by rtibblesbot, an LLM-based coding agent.
🟡 Waiting for feedback
Last updated: 2026-10-06 08:10 UTC