Skip to content

Publish input answers only when the whole answer is a number - #6197

Open
rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6195-148ce1
Open

rtibblesbot wants to merge 1 commit into
learningequality:unstablefrom
rtibblesbot:issue-6195-148ce1

Conversation

@rtibblesbot

@rtibblesbot rtibblesbot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Perseus export published a number found anywhere in an input answer, so 4\.62 published as 0.62 and 1:3 as 1. Input answers now parse only when the whole answer is a number, and \. reads as a decimal point; anything else drops from the export.

References

Fixes #6195

Reviewer guidance

  • Is rejecting e+- (1,000e+-3) the intended reading of the AC? It fully matched the exponent pattern before.
  • Should the QTI export's \.-escaped string answers be unescaped too? Left untouched here.

AI usage

Used Claude Code to trace the wrong answers to extract_value and write the fix and tests. Verified with the parser test suite, black and flake8.

🤖 Generated with Claude Code


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks
@rtibblesbot

🟡 Waiting for feedback

Last updated: 2026-09-27 01:21 UTC

- Match the whole answer instead of searching for a number in it
- Read a markdown-escaped decimal point as a plain one
- Reject e+- exponents

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@rtibblesbot
rtibblesbot marked this pull request as ready for review September 25, 2026 20:58
@rtibblesbot
rtibblesbot requested review from a team and marcellamaki September 25, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QTI] Perseus export publishes wrong answers for input questions that aren't plain numbers

2 participants