Skip to content

[QTI] Gap Match interaction #6202

Open
1 of 3 issues completed
Open

Description

@AlexVelezLl

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

Overview

Add the Gap Match question type to the QTI editor. An author writes a passage, turns words into gaps (by highlighting them, or by inserting a blank gap and typing its answer into it), and adds optional distractors. Learners drag answers and distractors from one shared pool into the gaps (#5927).

Like inline choice (#6178), it is a passage-based type built on the TipTapEditor seams from #6176. Unlike inline choice, the item is one interaction with one response declaration: the passage sits inside <qti-gap-match-interaction>, and the correct response pairs each answer with its gap.

Scope

Included

Excluded

  • Answer-specific distractor pools (match-group): every answer and distractor is a candidate for every gap.
  • Partial credit: an item is scored all-or-nothing.
  • Image answers (qti-gap-img) and graphic gap match.
  • Mixing gap match with other interaction types in one item.
  • Learner preview inside Studio.
  • Rendering in Kolibri's QTI viewer (kolibri#15213).

Strategy

Testing Requirements

Beyond each task's unit tests, the project is done when a channel with a gap match question (several gaps and distractors) publishes and, once kolibri#15213 lands, renders in Kolibri's QTI viewer, where filling every gap correctly produces SCORE 1 and any wrong gap produces 0.

AI usage

I used Claude Code to draft this tracking issue and its tasks. It read the QTI editor core, the inline choice issues, the QTI 3.0 schema's content model for gap match, and Kolibri's gap match issue to check feasibility. I decided the scope, the scoring and the split, and reviewed and edited the text.

Activity

  1. sigilsystemsro-cmyk commented on Oct 17, 2026

    @sigilsystemsro-cmyk

    Phase 1: Core Parsing & XML Assembly (#6203)
    ​Input Mapping: Implement the XML parser to ingest tags without supporting complex match-group distractor pools.
    ​Validation Rule: Constrain validation strictly against the QTI 3.0 XSD schema; output raw_data as-is to the backend server.
    ​Scoring Logic: Hardcode the evaluation template to all-or-nothing (match_correct): correct mapping yields score 1, any deviation yields 0.
    ​Phase 2: Editor UI & Gap Node Integration (#6204)
    ​TipTapEditor Binding: Leverage the existing inline-node pattern established in #6193 to inject gap choices directly into the passage text stream.
    ​Insert Action: Configure the editor toolbar to expose the Insert action, allowing authors to drop blank gaps and associate distractors from the shared pool.
    ​Constraint Enforcement: Block any attempt to mix gap match interactions with other question types within the same item container.
    ​Immediate Execution Directive
    ​Run the unit test suite on a newly published test channel to verify that rendering in the Kolibri QTI viewer correctly scores 1 on exact matches and 0 on partial or incorrect placements.

  2. assigned and unassigned on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions