qti 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +28 -0
  3. data/Rakefile +1 -0
  4. data/lib/qti.rb +62 -0
  5. data/lib/qti/models/base.rb +80 -0
  6. data/lib/qti/models/manifest.rb +20 -0
  7. data/lib/qti/v1/models/assessment.rb +17 -0
  8. data/lib/qti/v1/models/assessment_item.rb +59 -0
  9. data/lib/qti/v1/models/base.rb +13 -0
  10. data/lib/qti/v1/models/choices/logical_identifier_choice.rb +26 -0
  11. data/lib/qti/v1/models/interactions/logical_identifier_interaction.rb +32 -0
  12. data/lib/qti/v2/models/assessment_item.rb +62 -0
  13. data/lib/qti/v2/models/assessment_test.rb +32 -0
  14. data/lib/qti/v2/models/base.rb +70 -0
  15. data/lib/qti/v2/models/choices/simple_choice.rb +28 -0
  16. data/lib/qti/v2/models/interactions.rb +25 -0
  17. data/lib/qti/v2/models/interactions/choice_interaction.rb +50 -0
  18. data/spec/fixtures/items_1.2/multiple_answer.xml +105 -0
  19. data/spec/fixtures/items_1.2/multiple_choice.xml +83 -0
  20. data/spec/fixtures/items_1.2/true_false.xml +50 -0
  21. data/spec/fixtures/items_2.1/Example01-modalFeedback.xml +79 -0
  22. data/spec/fixtures/items_2.1/Example02-feedbackInline.xml +67 -0
  23. data/spec/fixtures/items_2.1/Example03-feedbackBlock-solution-random.xml +223 -0
  24. data/spec/fixtures/items_2.1/Example03-feedbackBlock-solution.xml +238 -0
  25. data/spec/fixtures/items_2.1/Example04-feedbackBlock-templateBlock.xml +582 -0
  26. data/spec/fixtures/items_2.1/Example05-feedbackBlock-adaptive.xml +397 -0
  27. data/spec/fixtures/items_2.1/adaptive.xml +286 -0
  28. data/spec/fixtures/items_2.1/adaptive_template.xml +350 -0
  29. data/spec/fixtures/items_2.1/associate.xml +33 -0
  30. data/spec/fixtures/items_2.1/audio-video.xml +46 -0
  31. data/spec/fixtures/items_2.1/choice.xml +31 -0
  32. data/spec/fixtures/items_2.1/choice_aria.xml +42 -0
  33. data/spec/fixtures/items_2.1/choice_fixed.xml +33 -0
  34. data/spec/fixtures/items_2.1/choice_multiple.xml +31 -0
  35. data/spec/fixtures/items_2.1/choice_multiple_chocolade.xml +74 -0
  36. data/spec/fixtures/items_2.1/choice_multiple_rtl.xml +33 -0
  37. data/spec/fixtures/items_2.1/choice_ruby.xml +39 -0
  38. data/spec/fixtures/items_2.1/choice_t_f.xml +30 -0
  39. data/spec/fixtures/items_2.1/choice_true_false.xml +30 -0
  40. data/spec/fixtures/items_2.1/data-attributes.xml +61 -0
  41. data/spec/fixtures/items_2.1/drawing.xml +16 -0
  42. data/spec/fixtures/items_2.1/essay.xml +14 -0
  43. data/spec/fixtures/items_2.1/extended_text.xml +24 -0
  44. data/spec/fixtures/items_2.1/extended_text_rubric.xml +36 -0
  45. data/spec/fixtures/items_2.1/feedback_adaptive.xml +142 -0
  46. data/spec/fixtures/items_2.1/figures.xml +32 -0
  47. data/spec/fixtures/items_2.1/gap_match.xml +33 -0
  48. data/spec/fixtures/items_2.1/graphic_associate.xml +36 -0
  49. data/spec/fixtures/items_2.1/graphic_gap_match.xml +54 -0
  50. data/spec/fixtures/items_2.1/graphic_gap_match_text.xml +50 -0
  51. data/spec/fixtures/items_2.1/graphic_order.xml +32 -0
  52. data/spec/fixtures/items_2.1/hint.xml +85 -0
  53. data/spec/fixtures/items_2.1/hotspot.xml +26 -0
  54. data/spec/fixtures/items_2.1/hottext.xml +33 -0
  55. data/spec/fixtures/items_2.1/images/CBG.png +0 -0
  56. data/spec/fixtures/items_2.1/images/EBG.png +0 -0
  57. data/spec/fixtures/items_2.1/images/EDI.png +0 -0
  58. data/spec/fixtures/items_2.1/images/GLA.png +0 -0
  59. data/spec/fixtures/items_2.1/images/MAN.png +0 -0
  60. data/spec/fixtures/items_2.1/images/MCH.png +0 -0
  61. data/spec/fixtures/items_2.1/images/airport.png +0 -0
  62. data/spec/fixtures/items_2.1/images/blueStar.png +0 -0
  63. data/spec/fixtures/items_2.1/images/blue_door.png +0 -0
  64. data/spec/fixtures/items_2.1/images/bus.png +0 -0
  65. data/spec/fixtures/items_2.1/images/castle.png +0 -0
  66. data/spec/fixtures/items_2.1/images/greenTriangle.png +0 -0
  67. data/spec/fixtures/items_2.1/images/green_door.png +0 -0
  68. data/spec/fixtures/items_2.1/images/house.png +0 -0
  69. data/spec/fixtures/items_2.1/images/open_car.png +0 -0
  70. data/spec/fixtures/items_2.1/images/open_goat.png +0 -0
  71. data/spec/fixtures/items_2.1/images/plane.png +0 -0
  72. data/spec/fixtures/items_2.1/images/postcard.eps +3581 -0
  73. data/spec/fixtures/items_2.1/images/postcard.png +0 -0
  74. data/spec/fixtures/items_2.1/images/rectangle.svg +1 -0
  75. data/spec/fixtures/items_2.1/images/redCircle.png +0 -0
  76. data/spec/fixtures/items_2.1/images/red_door.png +0 -0
  77. data/spec/fixtures/items_2.1/images/sign.png +0 -0
  78. data/spec/fixtures/items_2.1/images/survey.jpg +0 -0
  79. data/spec/fixtures/items_2.1/images/train.png +0 -0
  80. data/spec/fixtures/items_2.1/images/uk.png +0 -0
  81. data/spec/fixtures/items_2.1/images/ukair.png +0 -0
  82. data/spec/fixtures/items_2.1/images/ukairtags.png +0 -0
  83. data/spec/fixtures/items_2.1/imsmanifest.xml +227 -0
  84. data/spec/fixtures/items_2.1/inline_choice.xml +26 -0
  85. data/spec/fixtures/items_2.1/inline_choice_math.xml +68 -0
  86. data/spec/fixtures/items_2.1/likert.xml +21 -0
  87. data/spec/fixtures/items_2.1/match.xml +41 -0
  88. data/spec/fixtures/items_2.1/math.xml +35 -0
  89. data/spec/fixtures/items_2.1/mc_calc3.xml +164 -0
  90. data/spec/fixtures/items_2.1/mc_calc5.xml +211 -0
  91. data/spec/fixtures/items_2.1/mc_stat2.xml +219 -0
  92. data/spec/fixtures/items_2.1/media_coords.xml +33 -0
  93. data/spec/fixtures/items_2.1/multi-input.xml +271 -0
  94. data/spec/fixtures/items_2.1/nested_object.xml +26 -0
  95. data/spec/fixtures/items_2.1/order.xml +25 -0
  96. data/spec/fixtures/items_2.1/order_partial_scoring.xml +55 -0
  97. data/spec/fixtures/items_2.1/order_rtl.xml +27 -0
  98. data/spec/fixtures/items_2.1/orkney1.xml +34 -0
  99. data/spec/fixtures/items_2.1/orkney2.xml +34 -0
  100. data/spec/fixtures/items_2.1/position_object.xml +34 -0
  101. data/spec/fixtures/items_2.1/select_point.xml +23 -0
  102. data/spec/fixtures/items_2.1/shared/orkney.css +1 -0
  103. data/spec/fixtures/items_2.1/shared/orkney.html +20 -0
  104. data/spec/fixtures/items_2.1/slider.xml +35 -0
  105. data/spec/fixtures/items_2.1/svg.xml +28 -0
  106. data/spec/fixtures/items_2.1/template.xml +88 -0
  107. data/spec/fixtures/items_2.1/template_image.xml +74 -0
  108. data/spec/fixtures/items_2.1/text_entry.xml +27 -0
  109. data/spec/fixtures/items_2.1/upload.xml +18 -0
  110. data/spec/fixtures/items_2.1/upload_composite.xml +24 -0
  111. data/spec/fixtures/test_qti_1.2.zip +0 -0
  112. data/spec/fixtures/test_qti_1.2/contact info.png +0 -0
  113. data/spec/fixtures/test_qti_1.2/exam1/my_files/org0/images/image.png +0 -0
  114. data/spec/fixtures/test_qti_1.2/exam1/my_files/org1/images/image.png +0 -0
  115. data/spec/fixtures/test_qti_1.2/image.png +0 -0
  116. data/spec/fixtures/test_qti_1.2/imsmanifest.xml +37 -0
  117. data/spec/fixtures/test_qti_1.2/quiz.xml +216 -0
  118. data/spec/fixtures/test_qti_2.1.zip +0 -0
  119. data/spec/fixtures/test_qti_2.1/assessment.xml +77 -0
  120. data/spec/fixtures/test_qti_2.1/imsmanifest.xml +211 -0
  121. data/spec/fixtures/test_qti_2.1/mathassess.xsd +54 -0
  122. data/spec/fixtures/test_qti_2.1/multiple-answer/multiple-answer.xml +31 -0
  123. data/spec/fixtures/test_qti_2.1/multiple-choice/multiple-choice.xml +31 -0
  124. data/spec/fixtures/test_qti_2.1/text-entry/text-entry.xml +330 -0
  125. data/spec/fixtures/test_qti_2.1/true-false/true-false.xml +55 -0
  126. data/spec/fixtures/tests/feedbackTest/assessment.xml +252 -0
  127. data/spec/fixtures/tests/feedbackTest/id-38d47747fb30/Example02-feedbackInline.xml +51 -0
  128. data/spec/fixtures/tests/feedbackTest/id-5e216df10030/Example03-feedbackBlock-solution.xml +199 -0
  129. data/spec/fixtures/tests/feedbackTest/id-9c33d141576e/Example05-feedbackBlock-adaptive.xml +330 -0
  130. data/spec/fixtures/tests/feedbackTest/id-aaa0bbf5da1d/Example03-feedbackBlock-solution-random.xml +223 -0
  131. data/spec/fixtures/tests/feedbackTest/id-d599169403d2/Example04-feedbackBlock-templateBlock.xml +534 -0
  132. data/spec/fixtures/tests/feedbackTest/id-fa3ee5852723/Example01-modalFeedback.xml +55 -0
  133. data/spec/fixtures/tests/feedbackTest/imsmanifest.xml +239 -0
  134. data/spec/fixtures/tests/interactionmix_saxony_v3/Choicemultiple_2014410822.xml +110 -0
  135. data/spec/fixtures/tests/interactionmix_saxony_v3/Choicemultiple_871212949.xml +208 -0
  136. data/spec/fixtures/tests/interactionmix_saxony_v3/Choicesingle_853928446.xml +159 -0
  137. data/spec/fixtures/tests/interactionmix_saxony_v3/Choicetruefalse_176040516.xml +98 -0
  138. data/spec/fixtures/tests/interactionmix_saxony_v3/Hotspot_278940407.xml +109 -0
  139. data/spec/fixtures/tests/interactionmix_saxony_v3/Hottext_801974120.xml +106 -0
  140. data/spec/fixtures/tests/interactionmix_saxony_v3/InteractionMixSachsen_1901710679.xml +54 -0
  141. data/spec/fixtures/tests/interactionmix_saxony_v3/Matchmultiple_1038910213.xml +139 -0
  142. data/spec/fixtures/tests/interactionmix_saxony_v3/Matchsingle_143114773.xml +133 -0
  143. data/spec/fixtures/tests/interactionmix_saxony_v3/Order_913967682.xml +117 -0
  144. data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntry_883368511.xml +114 -0
  145. data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrynumeric_2040297025.xml +154 -0
  146. data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrynumeric_770468849.xml +124 -0
  147. data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrysubset_806481421.xml +227 -0
  148. data/spec/fixtures/tests/interactionmix_saxony_v3/imsmanifest.xml +278 -0
  149. data/spec/fixtures/tests/interactionmix_saxony_v3/media/03c5e2f774db49598deb3ac7d05b53f9.jpg +0 -0
  150. data/spec/fixtures/tests/interactionmix_saxony_v3/media/0563e67fb1bb48ad882e0a5abf2a2686.jpg +0 -0
  151. data/spec/fixtures/tests/interactionmix_saxony_v3/media/2f44366716474a5d8e2a2e32346cbc05.jpg +0 -0
  152. data/spec/fixtures/tests/interactionmix_saxony_v3/media/71a299b50b5e4b1492f8ee51ce25be7d.jpg +0 -0
  153. data/spec/fixtures/tests/interactionmix_saxony_v3/media/a439b702d5034ca38f6df26a12835db3.jpg +0 -0
  154. data/spec/fixtures/tests/interactionmix_saxony_v3/media/b660fc9f268c4ef688d8606116c70160.jpg +0 -0
  155. data/spec/fixtures/tests/interactionmix_saxony_v3/media/c2f541343b9b4bfdba9fc90c7a18403e.jpg +0 -0
  156. data/spec/fixtures/tests/interactionmix_saxony_v3/media/e18b5a2eb8104d0994a182ee0176a05c.jpg +0 -0
  157. data/spec/fixtures/tests/interactionmix_saxony_v3/media/f88c5aa2c6724a388fdbadc7133eb757.jpg +0 -0
  158. data/spec/fixtures/tests/interactionmix_saxony_v3/media/ffe337505ef74334a0cecb33310f99c1.jpg +0 -0
  159. data/spec/fixtures/tests/tests/complete.xml +33 -0
  160. data/spec/fixtures/tests/tests/report.xml +70 -0
  161. data/spec/fixtures/tests/tests/rtest01-fragment.xml +12 -0
  162. data/spec/fixtures/tests/tests/rtest01-set01.xml +17 -0
  163. data/spec/fixtures/tests/tests/rtest01-set02.xml +17 -0
  164. data/spec/fixtures/tests/tests/rtest01-set03.xml +17 -0
  165. data/spec/fixtures/tests/tests/rtest01.xml +16 -0
  166. data/spec/fixtures/tests/tests/rtest02.xml +48 -0
  167. data/spec/fixtures/tests/tests/rtest03.xml +38 -0
  168. data/spec/fixtures/tests/tests/rtest04.xml +50 -0
  169. data/spec/fixtures/tests/tests/rtest06.xml +34 -0
  170. data/spec/fixtures/tests/tests/rtest08.xml +38 -0
  171. data/spec/fixtures/tests/tests/rtest09.xml +33 -0
  172. data/spec/fixtures/tests/tests/rtest10.xml +48 -0
  173. data/spec/fixtures/tests/tests/rtest12.xml +38 -0
  174. data/spec/fixtures/tests/tests/rtest13.xml +62 -0
  175. data/spec/fixtures/tests/tests/rtest22.xml +41 -0
  176. data/spec/fixtures/tests/tests/rtest24.xml +37 -0
  177. data/spec/fixtures/tests/tests/rtest25.xml +62 -0
  178. data/spec/fixtures/tests/tests/rtest26.xml +38 -0
  179. data/spec/fixtures/tests/tests/rtest27.xml +46 -0
  180. data/spec/qti/models/base_spec.rb +71 -0
  181. data/spec/qti/models/manifest_spec.rb +19 -0
  182. data/spec/qti/v1/models/assessment_item_spec.rb +49 -0
  183. data/spec/qti/v1/models/assessment_spec.rb +18 -0
  184. data/spec/qti/v1/models/choices/logical_identifier_choice_spec.rb +23 -0
  185. data/spec/qti/v1/models/interactions/logical_identifier_interaction_spec.rb +20 -0
  186. data/spec/qti/v2/models/assessment_item_spec.rb +67 -0
  187. data/spec/qti/v2/models/assessment_test_spec.rb +60 -0
  188. data/spec/qti/v2/models/choices/simple_choice_spec.rb +22 -0
  189. data/spec/qti/v2/models/interactions/choice_interaction_spec.rb +27 -0
  190. data/spec/qti_spec.rb +38 -0
  191. data/spec/spec_helper.rb +10 -0
  192. metadata +506 -0
@@ -0,0 +1,350 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"
5
+ identifier="adaptiveTemplate" title="Monty Hall (Take 2)" adaptive="true" timeDependent="false">
6
+ <responseDeclaration identifier="DOOR" cardinality="single" baseType="identifier"/>
7
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
8
+ <correctResponse>
9
+ <value>switchStrategy</value>
10
+ </correctResponse>
11
+ </responseDeclaration>
12
+ <outcomeDeclaration identifier="STORY" cardinality="single" baseType="identifier">
13
+ <defaultValue>
14
+ <value>openingGambit</value>
15
+ </defaultValue>
16
+ </outcomeDeclaration>
17
+ <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
18
+ <outcomeDeclaration identifier="CLOSED" cardinality="multiple" baseType="identifier">
19
+ <defaultValue>
20
+ <value>DoorA</value>
21
+ <value>DoorB</value>
22
+ <value>DoorC</value>
23
+ </defaultValue>
24
+ </outcomeDeclaration>
25
+ <outcomeDeclaration identifier="GOATS" cardinality="multiple" baseType="identifier"/>
26
+ <outcomeDeclaration identifier="PRIZE" cardinality="single" baseType="identifier"/>
27
+ <outcomeDeclaration identifier="FIRSTDOOR" cardinality="single" baseType="identifier"/>
28
+ <outcomeDeclaration identifier="REVEALED" cardinality="single" baseType="identifier"/>
29
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
30
+ <templateDeclaration identifier="PRIZEDOOR" cardinality="single" baseType="identifier"
31
+ mathVariable="false" paramVariable="false"/>
32
+ <templateProcessing>
33
+ <setTemplateValue identifier="PRIZEDOOR">
34
+ <random>
35
+ <multiple>
36
+ <baseValue baseType="identifier">DoorA</baseValue>
37
+ <baseValue baseType="identifier">DoorB</baseValue>
38
+ <baseValue baseType="identifier">DoorC</baseValue>
39
+ </multiple>
40
+ </random>
41
+ </setTemplateValue>
42
+ </templateProcessing>
43
+ <itemBody>
44
+ <p>Monty Hall has hidden a prize behind one of these doors.</p>
45
+ <feedbackBlock outcomeIdentifier="STORY" showHide="show" identifier="openingGambit">
46
+ <p>Monty invites you to choose one of the doors but won't let you open it just yet.</p>
47
+ </feedbackBlock>
48
+ <feedbackBlock outcomeIdentifier="STORY" showHide="show" identifier="tempter">
49
+ <p>Monty opens one of the other doors to reveal - a goat!</p>
50
+ <p>He then asks you if you would like to change your mind or to stick with the door you
51
+ originally chose. It's time to make your mind up, which door are you going to
52
+ open?</p>
53
+ </feedbackBlock>
54
+ <feedbackBlock outcomeIdentifier="STORY" showHide="show" identifier="goat">
55
+ <p>Bad luck! When you opened your chosen door it also revealed a goat.</p>
56
+ </feedbackBlock>
57
+ <feedbackBlock outcomeIdentifier="STORY" showHide="show" identifier="prize">
58
+ <p>Congratulations! When you opened your chosen door it revealed a fantastic prize that
59
+ you are now free to take home.</p>
60
+ </feedbackBlock>
61
+ <choiceInteraction responseIdentifier="DOOR" shuffle="false" maxChoices="1">
62
+ <simpleChoice identifier="DoorA">
63
+ <feedbackInline outcomeIdentifier="CLOSED" showHide="show" identifier="DoorA">
64
+ <img src="images/red_door.png" alt="The Red Door"/>
65
+ </feedbackInline>
66
+ <feedbackInline outcomeIdentifier="GOATS" showHide="show" identifier="DoorA">
67
+ <img src="images/open_goat.png" alt="An open door"/> - this door is now open
68
+ revealing a goat!</feedbackInline>
69
+ <feedbackInline outcomeIdentifier="PRIZE" showHide="show" identifier="DoorA">
70
+ <img src="images/open_car.png" alt="An open door"/> - this door is now open
71
+ revealing a fantastic prize!</feedbackInline>
72
+ </simpleChoice>
73
+ <simpleChoice identifier="DoorB">
74
+ <feedbackInline outcomeIdentifier="CLOSED" showHide="show" identifier="DoorB">
75
+ <img src="images/green_door.png" alt="The Green Door"/>
76
+ </feedbackInline>
77
+ <feedbackInline outcomeIdentifier="GOATS" showHide="show" identifier="DoorB">
78
+ <img src="images/open_goat.png" alt="An open door"/> - this door is now open
79
+ revealing a goat!</feedbackInline>
80
+ <feedbackInline outcomeIdentifier="PRIZE" showHide="show" identifier="DoorB">
81
+ <img src="images/open_car.png" alt="An open door"/> - this door is now open
82
+ revealing a fantastic prize!</feedbackInline>
83
+ </simpleChoice>
84
+ <simpleChoice identifier="DoorC">
85
+ <feedbackInline outcomeIdentifier="CLOSED" showHide="show" identifier="DoorC">
86
+ <img src="images/blue_door.png" alt="The Blue Door"/>
87
+ </feedbackInline>
88
+ <feedbackInline outcomeIdentifier="GOATS" showHide="show" identifier="DoorC">
89
+ <img src="images/open_goat.png" alt="An open door"/> - this door is now open
90
+ revealing a goat!</feedbackInline>
91
+ <feedbackInline outcomeIdentifier="PRIZE" showHide="show" identifier="DoorC">
92
+ <img src="images/open_car.png" alt="An open door"/> - this door is now open
93
+ revealing a fantastic prize!</feedbackInline>
94
+ </simpleChoice>
95
+ </choiceInteraction>
96
+ <feedbackBlock outcomeIdentifier="FEEDBACK" showHide="show" identifier="poser">
97
+ <p>Well, whether or not you won the prize did you make your decision by guesswork or
98
+ logical reasoning? The question is, if we allowed you to play this game repeatedly
99
+ what strategy <em>should</em> you adopt?</p>
100
+ <choiceInteraction responseIdentifier="RESPONSE" shuffle="true" maxChoices="1">
101
+ <simpleChoice identifier="stickStrategy">Always stick to the first door you chose.</simpleChoice>
102
+ <simpleChoice identifier="switchStrategy">Always switch to the other closed door
103
+ when Monty offers you the chance.</simpleChoice>
104
+ <simpleChoice identifier="noStrategy">It really doesn't matter whether you stick or
105
+ switch - the outcome's the same.</simpleChoice>
106
+ </choiceInteraction>
107
+ </feedbackBlock>
108
+ </itemBody>
109
+ <responseProcessing>
110
+ <setOutcomeValue identifier="completionStatus">
111
+ <baseValue baseType="identifier">incomplete</baseValue>
112
+ </setOutcomeValue>
113
+ <responseCondition>
114
+ <responseIf>
115
+ <!-- Transition from openingGambit to tempter -->
116
+ <and>
117
+ <match>
118
+ <baseValue baseType="identifier">openingGambit</baseValue>
119
+ <variable identifier="STORY"/>
120
+ </match>
121
+ <not>
122
+ <isNull>
123
+ <variable identifier="DOOR"/>
124
+ </isNull>
125
+ </not>
126
+ </and>
127
+ <!-- Remember the first door chosen -->
128
+ <setOutcomeValue identifier="FIRSTDOOR">
129
+ <variable identifier="DOOR"/>
130
+ </setOutcomeValue>
131
+ <responseCondition>
132
+ <responseIf>
133
+ <match>
134
+ <variable identifier="DOOR"/>
135
+ <variable identifier="PRIZEDOOR"/>
136
+ </match>
137
+ <!-- Randomly open one of the other two doors -->
138
+ <responseCondition>
139
+ <responseIf>
140
+ <match>
141
+ <variable identifier="DOOR"/>
142
+ <baseValue baseType="identifier">DoorA</baseValue>
143
+ </match>
144
+ <setOutcomeValue identifier="REVEALED">
145
+ <random>
146
+ <multiple>
147
+ <baseValue baseType="identifier">DoorB</baseValue>
148
+ <baseValue baseType="identifier">DoorC</baseValue>
149
+ </multiple>
150
+ </random>
151
+ </setOutcomeValue>
152
+ </responseIf>
153
+ <responseElseIf>
154
+ <match>
155
+ <variable identifier="DOOR"/>
156
+ <baseValue baseType="identifier">DoorB</baseValue>
157
+ </match>
158
+ <setOutcomeValue identifier="REVEALED">
159
+ <random>
160
+ <multiple>
161
+ <baseValue baseType="identifier">DoorA</baseValue>
162
+ <baseValue baseType="identifier">DoorC</baseValue>
163
+ </multiple>
164
+ </random>
165
+ </setOutcomeValue>
166
+ </responseElseIf>
167
+ <responseElse>
168
+ <setOutcomeValue identifier="REVEALED">
169
+ <random>
170
+ <multiple>
171
+ <baseValue baseType="identifier">DoorA</baseValue>
172
+ <baseValue baseType="identifier">DoorB</baseValue>
173
+ </multiple>
174
+ </random>
175
+ </setOutcomeValue>
176
+ </responseElse>
177
+ </responseCondition>
178
+ </responseIf>
179
+ <responseElse>
180
+ <!-- Open the other losing door -->
181
+ <responseCondition>
182
+ <responseIf>
183
+ <not>
184
+ <member>
185
+ <baseValue baseType="identifier">DoorA</baseValue>
186
+ <multiple>
187
+ <variable identifier="PRIZEDOOR"/>
188
+ <variable identifier="DOOR"/>
189
+ </multiple>
190
+ </member>
191
+ </not>
192
+ <setOutcomeValue identifier="REVEALED">
193
+ <baseValue baseType="identifier">DoorA</baseValue>
194
+ </setOutcomeValue>
195
+ </responseIf>
196
+ <responseElseIf>
197
+ <not>
198
+ <member>
199
+ <baseValue baseType="identifier">DoorB</baseValue>
200
+ <multiple>
201
+ <variable identifier="PRIZEDOOR"/>
202
+ <variable identifier="DOOR"/>
203
+ </multiple>
204
+ </member>
205
+ </not>
206
+ <setOutcomeValue identifier="REVEALED">
207
+ <baseValue baseType="identifier">DoorB</baseValue>
208
+ </setOutcomeValue>
209
+ </responseElseIf>
210
+ <responseElse>
211
+ <setOutcomeValue identifier="REVEALED">
212
+ <baseValue baseType="identifier">DoorC</baseValue>
213
+ </setOutcomeValue>
214
+ </responseElse>
215
+ </responseCondition>
216
+ </responseElse>
217
+ </responseCondition>
218
+ <setOutcomeValue identifier="CLOSED">
219
+ <delete>
220
+ <variable identifier="REVEALED"/>
221
+ <variable identifier="CLOSED"/>
222
+ </delete>
223
+ </setOutcomeValue>
224
+ <setOutcomeValue identifier="GOATS">
225
+ <multiple>
226
+ <variable identifier="REVEALED"/>
227
+ </multiple>
228
+ </setOutcomeValue>
229
+ <setOutcomeValue identifier="STORY">
230
+ <baseValue baseType="identifier">tempter</baseValue>
231
+ </setOutcomeValue>
232
+ </responseIf>
233
+ <responseElseIf>
234
+ <!-- Transition from tempter to prize or goat -->
235
+ <and>
236
+ <match>
237
+ <baseValue baseType="identifier">tempter</baseValue>
238
+ <variable identifier="STORY"/>
239
+ </match>
240
+ <not>
241
+ <isNull>
242
+ <variable identifier="DOOR"/>
243
+ </isNull>
244
+ </not>
245
+ </and>
246
+ <!-- Whether you won or not, we score based on whether you switched -->
247
+ <responseCondition>
248
+ <responseIf>
249
+ <match>
250
+ <variable identifier="DOOR"/>
251
+ <variable identifier="FIRSTDOOR"/>
252
+ </match>
253
+ <setOutcomeValue identifier="SCORE">
254
+ <baseValue baseType="float">0</baseValue>
255
+ </setOutcomeValue>
256
+ </responseIf>
257
+ <responseElse>
258
+ <setOutcomeValue identifier="SCORE">
259
+ <baseValue baseType="float">1</baseValue>
260
+ </setOutcomeValue>
261
+ </responseElse>
262
+ </responseCondition>
263
+ <!-- Now determine if you won the prize and open your chosen door -->
264
+ <responseCondition>
265
+ <responseIf>
266
+ <match>
267
+ <variable identifier="DOOR"/>
268
+ <variable identifier="PRIZEDOOR"/>
269
+ </match>
270
+ <setOutcomeValue identifier="PRIZE">
271
+ <variable identifier="DOOR"/>
272
+ </setOutcomeValue>
273
+ <setOutcomeValue identifier="STORY">
274
+ <baseValue baseType="identifier">prize</baseValue>
275
+ </setOutcomeValue>
276
+ </responseIf>
277
+ <responseElse>
278
+ <setOutcomeValue identifier="GOATS">
279
+ <multiple>
280
+ <variable identifier="GOATS"/>
281
+ <variable identifier="DOOR"/>
282
+ </multiple>
283
+ </setOutcomeValue>
284
+ <setOutcomeValue identifier="STORY">
285
+ <baseValue baseType="identifier">goat</baseValue>
286
+ </setOutcomeValue>
287
+ </responseElse>
288
+ </responseCondition>
289
+ <setOutcomeValue identifier="CLOSED">
290
+ <delete>
291
+ <variable identifier="DOOR"/>
292
+ <variable identifier="CLOSED"/>
293
+ </delete>
294
+ </setOutcomeValue>
295
+ <setOutcomeValue identifier="FEEDBACK">
296
+ <baseValue baseType="identifier">poser</baseValue>
297
+ </setOutcomeValue>
298
+ </responseElseIf>
299
+ <responseElseIf>
300
+ <and>
301
+ <match>
302
+ <variable identifier="FEEDBACK"/>
303
+ <baseValue baseType="identifier">poser</baseValue>
304
+ </match>
305
+ <not>
306
+ <isNull>
307
+ <variable identifier="RESPONSE"/>
308
+ </isNull>
309
+ </not>
310
+ </and>
311
+ <responseCondition>
312
+ <responseIf>
313
+ <match>
314
+ <variable identifier="RESPONSE"/>
315
+ <correct identifier="RESPONSE"/>
316
+ </match>
317
+ <setOutcomeValue identifier="SCORE">
318
+ <sum>
319
+ <variable identifier="SCORE"/>
320
+ <baseValue baseType="float">2</baseValue>
321
+ </sum>
322
+ </setOutcomeValue>
323
+ </responseIf>
324
+ </responseCondition>
325
+ <setOutcomeValue identifier="FEEDBACK">
326
+ <variable identifier="RESPONSE"/>
327
+ </setOutcomeValue>
328
+ <setOutcomeValue identifier="completionStatus">
329
+ <baseValue baseType="identifier">completed</baseValue>
330
+ </setOutcomeValue>
331
+ </responseElseIf>
332
+ </responseCondition>
333
+ </responseProcessing>
334
+ <modalFeedback outcomeIdentifier="FEEDBACK" showHide="show" identifier="stickStrategy">No.
335
+ Initially, the probability of the prize being behind each door is 1/3. Opening a losing door
336
+ can't possibly make this go down for the remaining closed one! In fact you should
337
+ <em>never</em> stick to your original decision.</modalFeedback>
338
+ <modalFeedback outcomeIdentifier="FEEDBACK" showHide="show" identifier="switchStrategy"> Yes,
339
+ you should <em>always</em> switch doors when offered the chance. Congratulations, perhaps
340
+ you should think about a career as a TV game show contestant? </modalFeedback>
341
+ <modalFeedback outcomeIdentifier="FEEDBACK" showHide="show" identifier="noStrategy">
342
+ <p>No, you should infact <em>always</em> switch doors. This problem has fooled many
343
+ mathematicians since it was first posed in an American magazine article and continues to
344
+ present a seemingly paradoxical answer!</p>
345
+ <p>The probability of your first choice door hiding the prize is 1/3 and this can't change.
346
+ But, 2/3 of the time you'll be wrong with your first choice and, by revealing a goat,
347
+ Monty is effectively telling you which door the prize is behind the remaining 2/3 of the
348
+ time! So by switching doors, your chances of getting the prize go up to 2/3!</p>
349
+ </modalFeedback>
350
+ </assessmentItem>
@@ -0,0 +1,33 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"
5
+ identifier="associate" title="Shakespearian Rivals" adaptive="false" timeDependent="false">
6
+ <responseDeclaration identifier="RESPONSE" cardinality="multiple" baseType="pair">
7
+ <correctResponse>
8
+ <value>A P</value>
9
+ <value>C M</value>
10
+ <value>D L</value>
11
+ </correctResponse>
12
+ <mapping defaultValue="0">
13
+ <mapEntry mapKey="A P" mappedValue="2"/>
14
+ <mapEntry mapKey="C M" mappedValue="1"/>
15
+ <mapEntry mapKey="D L" mappedValue="1"/>
16
+ </mapping>
17
+ </responseDeclaration>
18
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float"/>
19
+ <itemBody>
20
+ <associateInteraction responseIdentifier="RESPONSE" shuffle="true" maxAssociations="3">
21
+ <prompt>Hidden in this list of characters from famous Shakespeare plays are three pairs
22
+ of rivals. Can you match each character to his adversary?</prompt>
23
+ <simpleAssociableChoice identifier="A" matchMax="1">Antonio</simpleAssociableChoice>
24
+ <simpleAssociableChoice identifier="C" matchMax="1">Capulet</simpleAssociableChoice>
25
+ <simpleAssociableChoice identifier="D" matchMax="1">Demetrius</simpleAssociableChoice>
26
+ <simpleAssociableChoice identifier="L" matchMax="1">Lysander</simpleAssociableChoice>
27
+ <simpleAssociableChoice identifier="M" matchMax="1">Montague</simpleAssociableChoice>
28
+ <simpleAssociableChoice identifier="P" matchMax="1">Prospero</simpleAssociableChoice>
29
+ </associateInteraction>
30
+ </itemBody>
31
+ <responseProcessing
32
+ template="http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response"/>
33
+ </assessmentItem>
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"
5
+ identifier="choice" title="Favorite Color" adaptive="false" timeDependent="false">
6
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
7
+ <correctResponse>
8
+ <value>ChoiceA</value>
9
+ </correctResponse>
10
+ </responseDeclaration>
11
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
12
+ <defaultValue>
13
+ <value>0</value>
14
+ </defaultValue>
15
+ </outcomeDeclaration>
16
+ <itemBody id="theWholeItem">
17
+ <p id="p1"><span id="a">Ms. Smith’s class contains 24 students.</span> <span id="b">Each student voted for his or her favorite color.</span> <span id="c">Watch the video to learn about the result of the class vote.</span></p>
18
+ <video width="320" height="240" controls>
19
+ <source src="movie.mp4" type="video/mp4">
20
+ <source src="movie.ogg" type="video/ogg">
21
+ <track kind="captions" src="../captions/movie.vtt" srclang="en" label="Captions" default />
22
+ <track kind="subtitles" label="SpanishSubtitles" src="subtitles_sp.vtt" srclang="sp"></track>
23
+ Your browser does not support the video tag. </video>
24
+ <choiceInteraction responseIdentifier="RESPONSE" shuffle="false"
25
+ maxChoices="5">
26
+ <prompt id="o">Indicate which of the following statements are accurate.</prompt>
27
+ <simpleChoice identifier="choice1" fixed="true">
28
+ <p id="p">The majority of students voted for Red.</p>
29
+ </simpleChoice>
30
+ <simpleChoice identifier="choice2" fixed="true">
31
+ <p id="q">Twice as many students voted for Red than voted for Blue.</p>
32
+ </simpleChoice>
33
+ <simpleChoice identifier="choice3" fixed="true">
34
+ <p id="r">Two percent of students voted for Yellow.</p>
35
+ </simpleChoice>
36
+ <simpleChoice identifier="choice4" fixed="true">
37
+ <p id="s">Red received more votes than any other color.</p>
38
+ </simpleChoice>
39
+ <simpleChoice identifier="choice5" fixed="true">
40
+ <p id="t">Twenty-five percent of students voted for Green.</p>
41
+ </simpleChoice>
42
+ </choiceInteraction>
43
+ </itemBody>
44
+ <responseProcessing
45
+ template="http://www.imsglobal.org/question/qti_v2p2/rptemplates/match_correct"/>
46
+ </assessmentItem>
@@ -0,0 +1,31 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- Thie example adapted from the PET Handbook, copyright University of Cambridge ESOL Examinations -->
3
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
4
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"
6
+ identifier="choice" title="Unattended Luggage" adaptive="false" timeDependent="false">
7
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
8
+ <correctResponse>
9
+ <value>ChoiceA</value>
10
+ </correctResponse>
11
+ </responseDeclaration>
12
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float">
13
+ <defaultValue>
14
+ <value>0</value>
15
+ </defaultValue>
16
+ </outcomeDeclaration>
17
+ <itemBody>
18
+ <p>Look at the text in the picture.</p>
19
+ <p>
20
+ <img src="images/sign.png" alt="NEVER LEAVE LUGGAGE UNATTENDED"/>
21
+ </p>
22
+ <choiceInteraction responseIdentifier="RESPONSE" shuffle="false" maxChoices="1">
23
+ <prompt>What does it say?</prompt>
24
+ <simpleChoice identifier="ChoiceA">You must stay with your luggage at all times.</simpleChoice>
25
+ <simpleChoice identifier="ChoiceB">Do not let someone else look after your luggage.</simpleChoice>
26
+ <simpleChoice identifier="ChoiceC">Remember your luggage when you leave.</simpleChoice>
27
+ </choiceInteraction>
28
+ </itemBody>
29
+ <responseProcessing
30
+ template="http://www.imsglobal.org/question/qti_v2p2/rptemplates/match_correct"/>
31
+ </assessmentItem>