qti 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,55 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This item is a true/false question with modal feedback, adapted from the CC question QUE_102010.xml -->
3
+ <assessmentItem 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
+ xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="Example01-modalFeedback" title="Example 1 - modal feedback"
6
+ adaptive="false" timeDependent="false">
7
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
8
+ <correctResponse>
9
+ <value>true</value>
10
+ </correctResponse>
11
+ </responseDeclaration>
12
+ <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
13
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float" normalMaximum="10.0">
14
+ <defaultValue>
15
+ <value>0</value>
16
+ </defaultValue>
17
+ </outcomeDeclaration>
18
+ <outcomeDeclaration identifier="MAXSCORE" cardinality="single" baseType="float">
19
+ <defaultValue>
20
+ <value>10.0</value>
21
+ </defaultValue>
22
+ </outcomeDeclaration>
23
+ <itemBody>
24
+ <choiceInteraction responseIdentifier="RESPONSE" shuffle="false" maxChoices="1">
25
+ <prompt>Sigmund Freud and Carl Jung both belong to the psychoanalytic school of
26
+ psychology.</prompt>
27
+ <simpleChoice identifier="true" fixed="true">True </simpleChoice>
28
+ <simpleChoice identifier="false" fixed="true">False </simpleChoice>
29
+ </choiceInteraction>
30
+ </itemBody>
31
+ <responseProcessing>
32
+ <responseCondition>
33
+ <responseIf>
34
+ <match>
35
+ <variable identifier="RESPONSE"/>
36
+ <correct identifier="RESPONSE"/>
37
+ </match>
38
+ <setOutcomeValue identifier="SCORE">
39
+ <variable identifier="MAXSCORE"/>
40
+ </setOutcomeValue>
41
+ <setOutcomeValue identifier="FEEDBACK">
42
+ <baseValue baseType="identifier">correct</baseValue>
43
+ </setOutcomeValue>
44
+ </responseIf>
45
+ <responseElse>
46
+ <setOutcomeValue identifier="FEEDBACK">
47
+ <baseValue baseType="identifier">incorrect</baseValue>
48
+ </setOutcomeValue>
49
+ </responseElse>
50
+ </responseCondition>
51
+ </responseProcessing>
52
+ <!-- modal feedback is usually displayed after the main body of the question -->
53
+ <modalFeedback outcomeIdentifier="FEEDBACK" showHide="show" identifier="correct">correct</modalFeedback>
54
+ <modalFeedback outcomeIdentifier="FEEDBACK" showHide="show" identifier="incorrect">incorrect</modalFeedback>
55
+ </assessmentItem>
@@ -0,0 +1,252 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
+ <assessmentTest xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
3
+ xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:m="http://www.w3.org/1998/Math/MathML"
4
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+ toolVersion="0.1" toolName="Spectatus" title="Feedback Examples Test"
6
+ identifier="SPECTATUS-GENERATED-TEST"
7
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd">
8
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="TEST_total">
9
+ <defaultValue>
10
+ <value>0.0</value>
11
+ </defaultValue>
12
+ </outcomeDeclaration>
13
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SECTION_1_total">
14
+ <defaultValue>
15
+ <value>0.0</value>
16
+ </defaultValue>
17
+ </outcomeDeclaration>
18
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SECTION_2_total">
19
+ <defaultValue>
20
+ <value>0.0</value>
21
+ </defaultValue>
22
+ </outcomeDeclaration>
23
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SECTION_3_total">
24
+ <defaultValue>
25
+ <value>0.0</value>
26
+ </defaultValue>
27
+ </outcomeDeclaration>
28
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SECTION_4_total">
29
+ <defaultValue>
30
+ <value>0.0</value>
31
+ </defaultValue>
32
+ </outcomeDeclaration>
33
+
34
+ <!--Define feedback variables; each will contain the identifier of the feedbackInline element inside the testFeedback for the
35
+ corresponding section, so that the "All correct" message only appears as appropriate.-->
36
+
37
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="s1FB"/>
38
+
39
+ <!--The outcome variable TEST_FEEDBACK has multiple cardinality because it contains several feedback identifiers – two standard
40
+ messages and one for each section-->
41
+
42
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="s2FB"/>
43
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="s3FB"/>
44
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="s4FB"/>
45
+
46
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="TEST_FEEDBACK"/>
47
+ <testPart submissionMode="simultaneous" navigationMode="nonlinear" identifier="TP">
48
+ <assessmentSection identifier="S1" visible="true" title="Section 1">
49
+ <rubricBlock view="candidate">
50
+ <div>Basic feedback on MCQs</div>
51
+ </rubricBlock>
52
+ <assessmentItemRef identifier="id-fa3ee5852723"
53
+ href="id-fa3ee5852723/Example01-modalFeedback.xml"/>
54
+ <assessmentItemRef identifier="id-38d47747fb30"
55
+ href="id-38d47747fb30/Example02-feedbackInline.xml"/>
56
+ </assessmentSection>
57
+ <assessmentSection identifier="id-f08aa8260ccb" visible="true" title="Section 2">
58
+ <rubricBlock view="candidate">
59
+ <div>Solutions for maths questions - basic</div>
60
+ </rubricBlock>
61
+ <assessmentItemRef identifier="id-5e216df10030"
62
+ href="id-5e216df10030/Example03-feedbackBlock-solution.xml"/>
63
+ <assessmentItemRef identifier="id-aaa0bbf5da1d"
64
+ href="id-aaa0bbf5da1d/Example03-feedbackBlock-solution-random.xml"/>
65
+ </assessmentSection>
66
+ <assessmentSection identifier="id-c0ac060cd5d4" visible="true" title="Section 3">
67
+ <selection withReplacement="true" select="3"/>
68
+ <rubricBlock view="candidate">
69
+ <div>A question in which the solution content changes depending on randomly
70
+ generated variables</div>
71
+ </rubricBlock>
72
+ <assessmentItemRef identifier="id-d599169403d2"
73
+ href="id-d599169403d2/Example04-feedbackBlock-templateBlock.xml"/>
74
+ </assessmentSection>
75
+ <assessmentSection identifier="id-4c75a5515d14" visible="true" title="Section 4">
76
+ <selection withReplacement="true" select="3"/>
77
+ <rubricBlock view="candidate">
78
+ <div>A question in which the second part looks different depending on which input
79
+ method you choose in the first part</div>
80
+ </rubricBlock>
81
+ <assessmentItemRef identifier="id-9c33d141576e"
82
+ href="id-9c33d141576e/Example05-feedbackBlock-adaptive.xml"/>
83
+ </assessmentSection>
84
+ </testPart>
85
+ <outcomeProcessing>
86
+ <setOutcomeValue identifier="SECTION_1_total">
87
+ <sum>
88
+ <testVariables sectionIdentifier="S1" baseType="float" variableIdentifier="SCORE"/>
89
+ </sum>
90
+ </setOutcomeValue>
91
+ <outcomeCondition>
92
+ <outcomeIf>
93
+ <not>
94
+ <lt>
95
+ <variable identifier="SECTION_1_total"/>
96
+ <baseValue baseType="float">20.0</baseValue>
97
+ </lt>
98
+ </not>
99
+ <setOutcomeValue identifier="s1FB">
100
+ <multiple>
101
+
102
+ <!--If the score for a section is equal to the expected maximum for the section, then the feedback variable
103
+ for the section contains the identifiers of both the "All OK" and "Not All OK" messages. The first of
104
+ these will appear because its showhide attribute is set to show; the second, visible by default,
105
+ disappears because its showHide attribute is set to hide.-->
106
+
107
+ <baseValue baseType="identifier">S1-FB-AllOK</baseValue>
108
+ <baseValue baseType="identifier">S1-FB-SomeNotOK</baseValue>
109
+ </multiple>
110
+ </setOutcomeValue>
111
+ </outcomeIf>
112
+ </outcomeCondition>
113
+ <setOutcomeValue identifier="SECTION_2_total">
114
+ <sum>
115
+ <testVariables sectionIdentifier="id-f08aa8260ccb" baseType="float"
116
+ variableIdentifier="SCORE"/>
117
+ </sum>
118
+ </setOutcomeValue>
119
+ <outcomeCondition>
120
+ <outcomeIf>
121
+ <not>
122
+ <lt>
123
+ <variable identifier="SECTION_2_total"/>
124
+ <baseValue baseType="float">20.0</baseValue>
125
+ </lt>
126
+ </not>
127
+ <setOutcomeValue identifier="s2FB">
128
+ <multiple>
129
+ <baseValue baseType="identifier">S2-FB-AllOK</baseValue>
130
+ <baseValue baseType="identifier">S2-FB-SomeNotOK</baseValue>
131
+ </multiple>
132
+ </setOutcomeValue>
133
+ </outcomeIf>
134
+ </outcomeCondition>
135
+ <setOutcomeValue identifier="SECTION_3_total">
136
+ <sum>
137
+ <testVariables sectionIdentifier="id-c0ac060cd5d4" baseType="float"
138
+ variableIdentifier="SCORE"/>
139
+ </sum>
140
+ </setOutcomeValue>
141
+ <outcomeCondition>
142
+ <outcomeIf>
143
+ <not>
144
+ <lt>
145
+ <variable identifier="SECTION_3_total"/>
146
+ <baseValue baseType="float">30.0</baseValue>
147
+ </lt>
148
+ </not>
149
+ <setOutcomeValue identifier="s3FB">
150
+ <multiple>
151
+ <baseValue baseType="identifier">S3-FB-AllOK</baseValue>
152
+ <baseValue baseType="identifier">S3-FB-SomeNotOK</baseValue>
153
+ </multiple>
154
+ </setOutcomeValue>
155
+ </outcomeIf>
156
+ </outcomeCondition>
157
+ <setOutcomeValue identifier="SECTION_4_total">
158
+ <sum>
159
+ <testVariables sectionIdentifier="id-4c75a5515d14" baseType="float"
160
+ variableIdentifier="SCORE"/>
161
+ </sum>
162
+ </setOutcomeValue>
163
+ <outcomeCondition>
164
+ <outcomeIf>
165
+ <not>
166
+ <lt>
167
+ <variable identifier="SECTION_4_total"/>
168
+ <baseValue baseType="float">30.0</baseValue>
169
+ </lt>
170
+ </not>
171
+ <setOutcomeValue identifier="s4FB">
172
+ <multiple>
173
+ <baseValue baseType="identifier">S4-FB-AllOK</baseValue>
174
+ <baseValue baseType="identifier">S4-FB-SomeNotOK</baseValue>
175
+ </multiple>
176
+ </setOutcomeValue>
177
+ </outcomeIf>
178
+ </outcomeCondition>
179
+ <setOutcomeValue identifier="TEST_total">
180
+ <sum>
181
+ <testVariables baseType="float" variableIdentifier="SCORE"/>
182
+ </sum>
183
+ </setOutcomeValue>
184
+
185
+ <!--The variable TEST_FEEDBACK contains all the testFeedback identifiers to be used-->
186
+
187
+ <setOutcomeValue identifier="TEST_FEEDBACK">
188
+ <multiple>
189
+ <baseValue baseType="identifier">TEST_FB1</baseValue>
190
+ <baseValue baseType="identifier">S1_END_FB</baseValue>
191
+ <baseValue baseType="identifier">S2_END_FB</baseValue>
192
+ <baseValue baseType="identifier">S3_END_FB</baseValue>
193
+ <baseValue baseType="identifier">S4_END_FB</baseValue>
194
+ <baseValue baseType="identifier">TEST_FB2</baseValue>
195
+ </multiple>
196
+ </setOutcomeValue>
197
+ </outcomeProcessing>
198
+ <testFeedback identifier="TEST_FB1" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
199
+ access="atEnd">
200
+ <div>You have reached the end of the test.</div>
201
+ </testFeedback>
202
+ <testFeedback identifier="S1_END_FB" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
203
+ access="atEnd">
204
+ <div>Section 1 score: <printedVariable format="%.1f" identifier="SECTION_1_total"/> (from a
205
+ maximum of 20.0).
206
+
207
+ <!--If all the questions in a section are correct, the "All OK" message for that section appears, and the "Some not OK"
208
+ message disappears because the showHide attribute is set to hide.-->
209
+
210
+ <feedbackInline outcomeIdentifier="s1FB" identifier="S1-FB-AllOK"
211
+ showHide="show"> All the questions in section 1 were answered
212
+ correctly.</feedbackInline>
213
+ <feedbackInline outcomeIdentifier="s1FB" identifier="S1-FB-SomeNotOK" showHide="hide">
214
+ Some of the questions in section 1 were not answered correctly.</feedbackInline>
215
+ </div>
216
+ </testFeedback>
217
+ <testFeedback identifier="S2_END_FB" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
218
+ access="atEnd">
219
+ <div>Section 2 score: <printedVariable format="%.1f" identifier="SECTION_2_total"/> (from a
220
+ maximum of 20.0) <feedbackInline outcomeIdentifier="s2FB" identifier="S2-FB-AllOK"
221
+ showHide="show"> All the questions in section 2 were answered
222
+ correctly.</feedbackInline>
223
+ <feedbackInline outcomeIdentifier="s2FB" identifier="S2-FB-SomeNotOK" showHide="hide">
224
+ Some of the questions in section 2 were not answered correctly.</feedbackInline>
225
+ </div>
226
+ </testFeedback>
227
+ <testFeedback identifier="S3_END_FB" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
228
+ access="atEnd">
229
+ <div>Section 3 score: <printedVariable format="%.1f" identifier="SECTION_3_total"/> (from a
230
+ maximum of 30.0) <feedbackInline outcomeIdentifier="s3FB" identifier="S3-FB-AllOK"
231
+ showHide="show"> All the questions in section 3 were answered
232
+ correctly.</feedbackInline>
233
+ <feedbackInline outcomeIdentifier="s3FB" identifier="S3-FB-SomeNotOK" showHide="hide">
234
+ Some of the questions in section 3 were not answered correctly.</feedbackInline>
235
+ </div>
236
+ </testFeedback>
237
+ <testFeedback identifier="S4_END_FB" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
238
+ access="atEnd">
239
+ <div>Section 4 score: <printedVariable format="%.1f" identifier="SECTION_4_total"/> (from a
240
+ maximum of 30.0) <feedbackInline outcomeIdentifier="s4FB" identifier="S4-FB-AllOK"
241
+ showHide="show"> All the questions in section 4 were answered
242
+ correctly.</feedbackInline>
243
+ <feedbackInline outcomeIdentifier="s4FB" identifier="S4-FB-SomeNotOK" showHide="hide">
244
+ Some of the questions in section 4 were not answered correctly.</feedbackInline>
245
+ </div>
246
+ </testFeedback>
247
+ <testFeedback identifier="TEST_FB" showHide="show" outcomeIdentifier="TEST_FEEDBACK"
248
+ access="atEnd">
249
+ <div>Total score: <printedVariable format="%.1f" identifier="TEST_total"/> (from a maximum
250
+ of 100.0)</div>
251
+ </testFeedback>
252
+ </assessmentTest>
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- This item is a true/false question with inline feedback, adapted from the CC question QUE_102010.xml -->
3
+ <assessmentItem 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
+ xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2" identifier="Example02-feedbackInline" title="Example 2 - inline feedback"
6
+ adaptive="false" timeDependent="false">
7
+ <responseDeclaration identifier="RESPONSE" cardinality="single" baseType="identifier">
8
+ <correctResponse>
9
+ <value>true</value>
10
+ </correctResponse>
11
+ </responseDeclaration>
12
+ <outcomeDeclaration identifier="FEEDBACK" cardinality="single" baseType="identifier"/>
13
+ <outcomeDeclaration identifier="SCORE" cardinality="single" baseType="float" normalMaximum="10.0">
14
+ <defaultValue>
15
+ <value>0</value>
16
+ </defaultValue>
17
+ </outcomeDeclaration>
18
+ <outcomeDeclaration identifier="MAXSCORE" cardinality="single" baseType="float">
19
+ <defaultValue>
20
+ <value>10.0</value>
21
+ </defaultValue>
22
+ </outcomeDeclaration>
23
+ <itemBody>
24
+ <choiceInteraction responseIdentifier="RESPONSE" shuffle="false" maxChoices="1">
25
+ <prompt>Sigmund Freud and Carl Jung both belong to the psychoanalytic school of
26
+ psychology.</prompt>
27
+ <simpleChoice identifier="true" fixed="true">True <feedbackInline
28
+ outcomeIdentifier="FEEDBACK" identifier="true" showHide="show">That's
29
+ correct</feedbackInline></simpleChoice>
30
+ <simpleChoice identifier="false" fixed="true">False <feedbackInline
31
+ outcomeIdentifier="FEEDBACK" identifier="false" showHide="show">That's not
32
+ correct</feedbackInline></simpleChoice>
33
+ </choiceInteraction>
34
+ </itemBody>
35
+ <responseProcessing>
36
+ <setOutcomeValue identifier="FEEDBACK">
37
+ <variable identifier="RESPONSE"/>
38
+ </setOutcomeValue>
39
+ <responseCondition>
40
+ <responseIf>
41
+ <match>
42
+ <variable identifier="RESPONSE"/>
43
+ <correct identifier="RESPONSE"/>
44
+ </match>
45
+ <setOutcomeValue identifier="SCORE">
46
+ <variable identifier="MAXSCORE"/>
47
+ </setOutcomeValue>
48
+ </responseIf>
49
+ </responseCondition>
50
+ </responseProcessing>
51
+ </assessmentItem>
@@ -0,0 +1,199 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <assessmentItem xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
3
+ xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:xi="http://www.w3.org/2001/XInclude"
4
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5
+ adaptive="true" identifier="Example03-feedbackBlock-solution" timeDependent="false"
6
+ title="Example 3 - Using feedbackBlock to show a solution" toolName="Mathqurate" toolVersion="0.9.7b"
7
+ xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd">
8
+ <responseDeclaration baseType="float" cardinality="single" identifier="RESPONSE">
9
+ <correctResponse>
10
+ <value>7.389</value>
11
+ </correctResponse>
12
+ </responseDeclaration>
13
+ <responseDeclaration baseType="boolean" cardinality="single" identifier="SOLREQUEST"/>
14
+ <outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="FEEDBACK"/>
15
+ <outcomeDeclaration baseType="identifier" cardinality="single" identifier="EMPTY"/>
16
+ <outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE" normalMaximum="10.0"
17
+ normalMinimum="0.0">
18
+ <defaultValue>
19
+ <value>0.0</value>
20
+ </defaultValue>
21
+ </outcomeDeclaration>
22
+ <outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenSolution">
23
+ <defaultValue>
24
+ <value>false</value>
25
+ </defaultValue>
26
+ </outcomeDeclaration>
27
+ <outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKSOLUTION">
28
+ <defaultValue>
29
+ <value>asksolution</value>
30
+ </defaultValue>
31
+ </outcomeDeclaration>
32
+ <itemBody class="">
33
+ <div class="">
34
+ <p class="">Find the value of <m:math id="mathML0">
35
+ <m:semantics>
36
+ <m:mrow>
37
+ <m:msup>
38
+ <m:mi>e</m:mi>
39
+ <m:mn>2</m:mn>
40
+ </m:msup>
41
+ </m:mrow>
42
+ <m:annotation encoding="LaTeX">\[\e^2\]</m:annotation>
43
+ </m:semantics>
44
+ </m:math> to 3 decimal places.</p>
45
+ <div class="">
46
+ <table class="">
47
+ <tbody class="">
48
+ <tr class="">
49
+ <td class="">
50
+ <textEntryInteraction expectedLength="20" id="textEntryInteraction0"
51
+ label="mathInput" responseIdentifier="RESPONSE"/>
52
+ </td>
53
+ <td class="">
54
+ <feedbackInline id="feedbackInline0" identifier="CORRECT"
55
+ outcomeIdentifier="FEEDBACK" showHide="show"> Correct </feedbackInline>
56
+ <feedbackInline id="feedbackInline1" identifier="INCORRECT"
57
+ outcomeIdentifier="FEEDBACK" showHide="show"> No, that is not
58
+ the correct answer</feedbackInline>
59
+ </td>
60
+ </tr>
61
+ </tbody>
62
+ </table>
63
+ </div>
64
+ <!-- this feedbackBlock contains the solution -->
65
+ <feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
66
+ <div class="">
67
+ <m:math display="block" id="mathML1">
68
+ <m:semantics>
69
+ <m:mtable>
70
+ <m:mtr>
71
+ <m:mtd columnalign="right">
72
+ <m:msup>
73
+ <m:mi>e</m:mi>
74
+ <m:mn>2</m:mn>
75
+ </m:msup>
76
+ </m:mtd>
77
+ <m:mtd columnalign="center">
78
+ <m:mo>=</m:mo>
79
+ </m:mtd>
80
+ <m:mtd columnalign="left">
81
+ <m:mi>exp</m:mi>
82
+ <m:mfenced close=")" open="(">
83
+ <m:mn>2</m:mn>
84
+ </m:mfenced>
85
+ </m:mtd>
86
+ </m:mtr>
87
+ <m:mtr>
88
+ <m:mtd columnalign="right"/>
89
+ <m:mtd columnalign="center">
90
+ <m:mo>=</m:mo>
91
+ </m:mtd>
92
+ <m:mtd columnalign="left">
93
+ <m:mn>7.389</m:mn>
94
+ </m:mtd>
95
+ </m:mtr>
96
+ </m:mtable>
97
+ <m:annotation encoding="SnuggleTeX">\begin{eqnarray*}e^2 &amp;=&amp;
98
+ \exp(2)\\ &amp;=&amp; 7.389\end{eqnarray*}</m:annotation>
99
+ </m:semantics>
100
+ </m:math>
101
+ </div>
102
+ </feedbackBlock>
103
+ <!-- Explain why the score is zero (after viewing solution) -->
104
+ <feedbackBlock identifier="SEEN-SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
105
+ <p> Since you have viewed the solution, your score for this question will be 0. </p>
106
+ </feedbackBlock>
107
+ <!-- show the solution button -->
108
+ <feedbackBlock identifier="asksolution" outcomeIdentifier="ASKSOLUTION" showHide="show">
109
+ <p><endAttemptInteraction responseIdentifier="SOLREQUEST" title="Show Solution"/></p>
110
+ </feedbackBlock>
111
+ </div>
112
+ </itemBody>
113
+ <responseProcessing>
114
+ <setOutcomeValue identifier="FEEDBACK">
115
+ <multiple>
116
+ <variable identifier="EMPTY"/>
117
+ </multiple>
118
+ </setOutcomeValue>
119
+ <responseCondition>
120
+ <responseIf>
121
+ <variable identifier="SOLREQUEST"/>
122
+ <setOutcomeValue identifier="FEEDBACK">
123
+ <multiple>
124
+ <baseValue baseType="identifier">SOLUTION</baseValue>
125
+ </multiple>
126
+ </setOutcomeValue>
127
+ <setOutcomeValue identifier="seenSolution">
128
+ <baseValue baseType="boolean">true</baseValue>
129
+ </setOutcomeValue>
130
+ <setOutcomeValue identifier="completionStatus">
131
+ <baseValue baseType="identifier">completed</baseValue>
132
+ </setOutcomeValue>
133
+ <setOutcomeValue identifier="ASKSOLUTION">
134
+ <baseValue baseType="identifier">null</baseValue>
135
+ </setOutcomeValue>
136
+ </responseIf>
137
+ <responseElse>
138
+ <responseCondition>
139
+ <responseIf>
140
+ <isNull>
141
+ <variable identifier="RESPONSE"/>
142
+ </isNull>
143
+ <setOutcomeValue identifier="SCORE">
144
+ <baseValue baseType="float">0</baseValue>
145
+ </setOutcomeValue>
146
+ </responseIf>
147
+ <responseElse>
148
+ <responseCondition>
149
+ <responseIf>
150
+ <equalRounded figures="3" roundingMode="decimalPlaces">
151
+ <variable identifier="RESPONSE"/>
152
+ <correct identifier="RESPONSE"/>
153
+ </equalRounded>
154
+ <setOutcomeValue identifier="FEEDBACK">
155
+ <multiple>
156
+ <baseValue baseType="identifier">CORRECT</baseValue>
157
+ </multiple>
158
+ </setOutcomeValue>
159
+ <setOutcomeValue identifier="SCORE">
160
+ <baseValue baseType="float">2</baseValue>
161
+ </setOutcomeValue>
162
+ </responseIf>
163
+ <responseElse>
164
+ <setOutcomeValue identifier="FEEDBACK">
165
+ <multiple>
166
+ <baseValue baseType="identifier">INCORRECT</baseValue>
167
+ </multiple>
168
+ </setOutcomeValue>
169
+ <setOutcomeValue identifier="SCORE">
170
+ <baseValue baseType="float">0</baseValue>
171
+ </setOutcomeValue>
172
+ </responseElse>
173
+ </responseCondition>
174
+ <setOutcomeValue identifier="completionStatus">
175
+ <baseValue baseType="identifier">completed</baseValue>
176
+ </setOutcomeValue>
177
+ <setOutcomeValue identifier="ASKSOLUTION">
178
+ <baseValue baseType="identifier">null</baseValue>
179
+ </setOutcomeValue>
180
+ <responseCondition>
181
+ <responseIf>
182
+ <variable identifier="seenSolution"/>
183
+ <setOutcomeValue identifier="FEEDBACK">
184
+ <multiple>
185
+ <variable identifier="FEEDBACK"/>
186
+ <baseValue baseType="identifier">SEEN-SOLUTION</baseValue>
187
+ </multiple>
188
+ </setOutcomeValue>
189
+ <setOutcomeValue identifier="SCORE">
190
+ <baseValue baseType="float">0.0</baseValue>
191
+ </setOutcomeValue>
192
+ </responseIf>
193
+ </responseCondition>
194
+ </responseElse>
195
+ </responseCondition>
196
+ </responseElse>
197
+ </responseCondition>
198
+ </responseProcessing>
199
+ </assessmentItem>