In a multiple cardinality hotspot if you wanted the student to select a maximum of say ‘2’ choices and not more than that, you could do so by specifying maxChoices=”2” as follows –
<hotspotInteraction class="theme-bluefill" maxChoices="2" responseIdentifier="RESPONSE">
In this way the student will be alerted if they selected more than two choices in the hotspot. This only works with multiple cardinality hotspots. If you specified maxChoices on a single cardinality hotspot it will not take any effect.
For multiple cardinality items, maxChoices
is ignored when set to a value less than two (i.e., 0, 1). See Single Cardinality choice interactions for interactions where you want only one possible choice. If this is set to a value of 0 (or 1), the maxChoices
is interpreted to be infinite; the student could select all of the items as their answer if they so desire. If set to a value greater than 2, and less than the number of answers offered, then the student is limited to that number of selections. If they attempt to make an additional choice, the system will let them know that they have reached their limit.
There is now the option to customize the maxChoices-message
that appears when too many choices have been selected. Below is an
example message that will show
"Only select two cities"
<hotspotInteraction class="theme-bluefill maxChoices-message:Only%20select%20two%20cities" maxChoices="2" responseIdentifier="RESPONSE">
Get Responses: | [ Click Get Responses ] |
<?xml version="1.0" encoding="utf-8" standalone="no"?> <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" adaptive="false" identifier="hotspot-mcardinality" timeDependent="false" title="UK Airports (Multiple Cardinality)" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 http://www.imsglobal.org/xsd/imsqti_v2p1.xsd"> <responseDeclaration baseType="identifier" cardinality="multiple" identifier="RESPONSE"> <correctResponse> <value>A</value> <value>B</value> <value>D</value> </correctResponse> </responseDeclaration> <outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE"/> <itemBody> <div class="row"> <div class="span6"> <h4>Hotspot (Multiple Cardinality)</h4> <hr/> <p>This item demonstrates a <em>hotspotInteraction</em> with multiple cardinality. You can choose any number of hotspots. This item also demonstrates how an item author can use one of the special hotspot classes available: "theme-bluefill". </p> <p>The picture to the right illustrates four of the most popular destinations for air travelers arriving in the United Kingdom: London, Manchester, Edinburgh and Glasgow. Please <span class="underline">choose all of the cities North of London</span>.</p> </div> <div class="span6"> <hotspotInteraction class="theme-bluefill" maxChoices="2" responseIdentifier="RESPONSE"> <object data="assets/uk.png" height="280" type="image/png" width="206">UK Map</object> <hotspotChoice coords="77,115,10" identifier="A" shape="circle"/> <hotspotChoice coords="118,184,10" identifier="B" shape="circle"/> <hotspotChoice coords="150,235,10" identifier="C" shape="circle"/> <hotspotChoice coords="96,114,10" identifier="D" shape="circle"/> </hotspotInteraction> </div> </div> </itemBody> <responseProcessing template="http://www.imsglobal.org/question/qti_v2p1/rptemplates/match_correct"/> </assessmentItem>
This item demonstrates a hotspotInteraction with max choices set. You can choose up to as many hotspots are allowed. This item also demonstrates how an item author can use one of the special hotspot classes available: "theme-bluefill".
The picture to the right illustrates four of the most popular destinations for air travelers arriving in the United Kingdom: London, Manchester, Edinburgh and Glasgow. Please choose all of the cities North of London.