Skip to content

Gap match interaction

3.2.5 Gap Match Interaction — a block interaction with a number of gaps that the candidate fills in from an associated set of choices.

Also see the attributes shared by every interaction on the overview page.

Example

Identify the missing words in this famous quote from Shakespeare’s Richard III.winterspringsummerautumn

Now is the of our discontent
Made glorious by this sun of York;
And all the clouds that lour’d upon our house
In the deep bosom of the ocean buried.

<qti-gap-match-interaction response-identifier="RESPONSE" max-associations="2">
<qti-prompt>Identify the missing words in this famous quote from Shakespeare's Richard III.</qti-prompt>
<qti-gap-text identifier="W" match-max="1">winter</qti-gap-text>
<qti-gap-text identifier="Sp" match-max="1">spring</qti-gap-text>
<qti-gap-text identifier="Su" match-max="1">summer</qti-gap-text>
<qti-gap-text identifier="A" match-max="1">autumn</qti-gap-text>
<blockquote>
<p>
Now is the <qti-gap identifier="G1"></qti-gap> of our discontent<br />
Made glorious <qti-gap identifier="G2"></qti-gap> by this sun of York;<br />
And all the clouds that lour'd upon our house<br />
In the deep bosom of the ocean buried.
</p>
</blockquote>
</qti-gap-match-interaction>

qti-gap-match-interaction

AttributeTypeDefaultNotes
min-associationsnumber1
max-associationsnumber1Unlike the other drag/drop interactions, this one special-cases its default to 1 (not 0/unlimited) when the attribute is omitted — matching most real gap-match items, which have one filled answer per gap.
disable-animations / auto-size-dropzonesbooleanfalseSame as other drag/drop interactions.

show-correct-response here injects a .correct-option <span> right after each <qti-gap>, rather than annotating the gap itself.

qti-gap-text (draggable choice)

AttributeNotes
identifier
match-maxHow many times this text can be used across gaps.

qti-gap (drop target)

AttributeNotes
identifierUsed in response pairs, e.g. "W G1".
match-maxHow many choices this specific gap can accept.