Skip to content

[QTI] An invalid question with several interactions publishes without an Incomplete indicator #6289

Closed as not planned

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

validateQtiItem returns no errors for an item with several interactions when one of them is invalid. Such an item is unsupported (#6105), so its interactions are never validated.

  • The card shows no Incomplete indicator.
  • The exercise counts as complete and publishes.

Errors and logs

None.

Expected behavior

An unsupported item that is invalid blocks publishing, as AlexVelezLl ruled on #6105: "if the item is unsupported because of a parse error or invalid, uneditable qti item, then it should be publish-blocking". Only valid unsupported items are publishable.

User-facing consequences

Learners get a question that can't be answered correctly, e.g. a choice with no correct response in a scored exercise. Authors aren't warned and can't fix it in Studio.

Steps to reproduce

  1. Take MULTI_INTERACTION_ITEM_DOCUMENT (QTIEditor/utils/testingFixtures.js) and remove the second interaction's <qti-correct-response>.
  2. Call validateQtiItem(xml, { allowFreeResponse: false }): it returns [].
  3. Put the item in an exercise: no Incomplete indicator, and the exercise publishes.

Context

AI usage

I used Claude Code to review the #6225 branch. It found this and reproduced it on upstream/unstable by calling validateQtiItem from a scratch Jest test.

Activity

  1. added theissue type on Oct 5, 2026
  2. AlexVelezLl commented on Oct 5, 2026

    @AlexVelezLl
    Member

    The only thing we should make sure of is that the stored items won't break the publish workflow. If one of the interactions is incorrect because of semantic logic, then it should still be publishable if the publish workflow won't break. Multi-interaction questions aren't supported yet, and flagging these on the frontend isn't in scope as long as publishing won't break.

  3. rtibblesbot commented on Oct 5, 2026

    @rtibblesbot
    ContributorAuthor

    Thanks — closing as not planned. The publish workflow on unstable already copes with these items:

    • QTIExerciseGenerator._create_native_qti_item: an item failing XSD validation is logged and excluded, not raised.
    • A missing <qti-correct-response> passes the XSD, so the item is packaged as-is.
    • perseus_derive._derivable_interaction: an item with more than one interaction is not derived to Perseus (covered by two_interactions in test_perseus_derive.py).
  4. rtibblesbot commented on Oct 5, 2026

    @rtibblesbot
    ContributorAuthor

    I can't close issues; a maintainer needs to close this as not planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions