Alex's Notes

Gap Match Interaction (QTI)

A gap match interaction is a blockInteraction that contains a number gaps that the candidate can fill from an associated set of choices.

The candidate must be able to review the content with the gaps filled in context, as indicated by their choices.

The gapMatchInteraction must be bound to a response variable with base-type directedPair and either single or multiple cardinality, depending on the number of gaps. The choices represent the source of the pairing and gaps the targets.

Each gap can have at most one choice associated with it.

The maximum occurrence of the choices is controlled by the matchMax attribute of gapChoice.

The relevant classes are:

GapMatchInteraction

Gap

GapChoice

GapText

GapImg

Data Models

GapMatchInteraction

Gap

This defines the gap structure that must only appear within a ‘gapMatchInteraction’.

GapChoice

This is an abstract representation for the selection of either a GapText or a GapImg object.

Examples

<assessmentItem xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd" identifier="gapMatch" title="Richard III (Take 1)" adaptive="false" timeDependent="false">
    <responseDeclaration identifier="RESPONSE" cardinality="multiple" baseType="directedPair">
	<correctResponse>
	    <value>W G1</value>
	    <value>Su G2</value>
	</correctResponse>
	<mapping defaultValue="-1" lowerBound="0">
	    <mapEntry mapKey="W G1" mappedValue="1"/>
	    <mapEntry mapKey="Su G2" mappedValue="2"/>
	</mapping>
    </responseDeclaration>
    <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
    <itemBody>
	<gapMatchInteraction responseIdentifier="RESPONSE" shuffle="false">
	    <prompt>
Identify the missing words in this famous quote from Shakespeare's Richard III.
	    </prompt>
	    <gapText identifier="W" matchMax="1">winter</gapText>
	    <gapText identifier="Sp" matchMax="1">spring</gapText>
	    <gapText identifier="Su" matchMax="1">summer</gapText>
	    <gapText identifier="A" matchMax="1">autumn</gapText>
	    <blockquote>
		<p>
Now is the
		    <gap identifier="G1"/>
of our discontent
		    <br/>
Made glorious
		    <gap identifier="G2"/>
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>
	</gapMatchInteraction>
    </itemBody>
    <responseProcessing template="http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response"/>
</assessmentItem>

This interaction is similar to matchInteraction except that the choices in the second set are gaps in a given passage of text and the task involves selecting choices from the first set and using them to fill the gaps.

The same attributes are involved in controlling which, and how many, pairings are allowed though there is no matchMax for the gaps because they can only ever have one associated choice. The scoring is again done with a mapping.

Additional formatting may be applied within the gapText element allowing for a greater variation.’ Allowed formats include: ‘br’, ‘img’, ‘include’, ‘math’, ‘object’, ‘printedVariable’, ‘a’, ‘abbr’, ‘acronym’, ‘b’, ‘big’, ‘cite’, ‘code’, ‘dfn’, ‘em’, ‘feedbackInline’, ‘i’, ‘kbd’, ‘q’, ‘samp’, ‘small’, ‘span’, ‘strong’, ‘sub’, ‘sup’, ‘tt’, ‘var’, ‘templateInline’.

Here’s an example using images:

<assessmentItem
    xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd"
    identifier="gapMatch"
    title="Charting Data"
    adaptive="false"
    timeDependent="false"
>
    <responseDeclaration
	identifier="RESPONSE"
	cardinality="multiple"
	baseType="directedPair"
    >
	<correctResponse>
	    <value>C1 circle</value>
	    <value>C1 circle</value>
	    <value>C1 circle</value>
	    <value>C2 triangle</value>
	    <value>C2 triangle</value>
	    <value>C3 star</value>
	    <value>C3 star</value>
	    <value>C3 star</value>
	    <value>C3 star</value>
	</correctResponse>
    </responseDeclaration>
    <outcomeDeclaration
	identifier="SCORE"
	cardinality="single"
	baseType="float"
    />
    <itemBody>
	<gapMatchInteraction responseIdentifier="RESPONSE" shuffle="false">
	    <prompt>
		Jaiden and his friends made a chart of their favorite shapes.
		There were 3 circles, 2 triangles and 4 stars. Click the shapes
		to complete the chart below.
	    </prompt>
	    <gapText
		identifier="circle"
		matchMax="5"
		data-type="clickPop"
		data-target-container="C1"
	    >
		<img src="redCircle.png" width="75" height="75" alt="" />
	    </gapText>
	    <gapText
		identifier="triangle"
		matchMax="5"
		data-type="clickPop"
		data-target-container="C2"
	    >
		<img src="greenTriangle.png" width="75" height="75" alt="" />
	    </gapText>
	    <gapText
		identifier="star"
		matchMax="5"
		data-type="clickPop"
		data-target-container="C3"
	    >
		<img src="blueStar.png" width="75" height="75" alt="" />
	    </gapText>
	    <blockquote>
		<table class="chart">
		    <tbody>
			<tr>
			    <th>Circles</th>
			    <td>
				<p>
				    <gap
					identifier="C1"
					data-type="gridContainer"
					data-centerpoint="left"
					matchGroup="max-5 min-0"
				    />
				</p>
			    </td>
			</tr>
			<tr>
			    <th>Triangles</th>
			    <td>
				<p>
				    <gap
					identifier="C2"
					data-type="gridContainer"
					data-centerpoint="left"
					matchGroup="max-5 min-0"
				    />
				</p>
			    </td>
			</tr>
			<tr>
			    <th>Stars</th>
			    <td>
				<p>
				    <gap
					identifier="C3"
					data-type="gridContainer"
					data-centerpoint="left"
					matchGroup="max-5 min-0"
				    />
				</p>
			    </td>
			</tr>
		    </tbody>
		</table>
	    </blockquote>
	</gapMatchInteraction>
    </itemBody>
    <responseProcessing
	template="http://www.imsglobal.org/question/qti_v2p2/rptemplates/match_correct"
    />
</assessmentItem>

Links to this note