Skip to content

Older-Kolibri Perseus export drops QTI Text entry items whose numeric answers are valid xsd:double but not parseable by extract_value #6224

Description

@rtibblesbot

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Observed behavior

perseus_derive gates Text entry derivation on parser.extract_value, whose grammar is narrower than xsd:double (the Numeric answer format, see #6150).

Accepted answers that are valid numbers but return None from extract_value:

  • +5
  • 1E3 (capital E)
  • INF, NaN

Such an item is reported not derivable, so the node publishes QTI only. Before #6222 it shipped a Perseus item with "answers": [].

Expected behavior

Valid numeric answers derive a Perseus item that accepts them, e.g. by normalising the value (+5 → 5, 1E3 → 1e3) before it reaches PerseusExerciseGenerator._process_input_answers.

User-facing consequences

Learners on older Kolibri get no exercise for these nodes.

Steps to reproduce

  1. is_perseus_derivable(_text_item("single", ["+5"])) → False.
  2. Same for ["1E3"].

Context

Activity

  1. added theissue type on Sep 30, 2026
  2. self-assigned this
    on Sep 30, 2026
  3. rtibblesbot commented on Sep 30, 2026

    @rtibblesbot
    ContributorAuthor

    Plan: Text entry items whose answers are valid finite xsd:double values (+5, 1E3) derive a Perseus item that accepts them (issue #6224, target unstable).

    • Normalise xsd:double answers in Perseus derivation
    • Publish-level coverage of the derived JSON
    • Self-review the branch

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


    @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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions