Skip to content

[QTI] A Text entry answer of NULL reopens empty and makes the question incomplete #6272

Closed

Description

@rtibblesbot

❌ 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

User-facing consequences

An author whose answer is the word NULL, as in a SQL exercise, loses it on reopen and can't complete the question with it.

Steps to reproduce

  1. On unstable at 954d27f, open an exercise in the QTI editor.
  2. Add a Text entry question with a prompt and the accepted answer NULL.
  3. Close the editor and read the exercise's incomplete question count.
  4. Reopen the question.

Acceptance Criteria

  • A Text entry answer NULL, case-sensitive or not, reopens as NULL.
  • validateQtiItem reports no error for a Text entry question whose only answer is NULL.
  • Tests build the question with buildXML, then check both the reopened answer and validateQtiItem.

AI usage

Claude Code found this while reviewing #6150, reproduced it on unstable with a scratch Jest harness, and drafted this issue.

Activity

  1. added theissue type on Oct 1, 2026
  2. rtibblesbot commented on Oct 4, 2026

    @rtibblesbot
    ContributorAuthor

    Plan: A Text entry answer NULL reopens as NULL and passes validateQtiItem.

    • Read Text entry answers as authored
    • Self-review the produced code

    Assumptions — the issue did not settle these; say so if one is wrong.

    • Kolibri scoring is out of scope; Kolibri coerces both the correct response and the learner's NULL to null (responseProcessing.js:47), so the answer never scores — if Studio must block it instead, AC 2 flips to an error.
    • Padded string map-keys are now read trimmed, like the numeric path; if an untrimmed hand-authored key must stay a separate answer, the helper keeps string keys untrimmed.
    • Repeated string <qti-value>s now survive reopen and fail validation, as numeric ones do; no test pins the old collapse.

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

    How was this generated?
    • Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
    • Ran the project's full test suite and linter before committing
    • For UI changes: captured live screenshots to verify rendering
    • For backend changes: verified with example API/CLI output
  3. added 2 commits that reference this issue on Oct 6, 2026
    96c51f1
    f016590
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions