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.
- checksums.yaml +7 -0
- data/README.md +28 -0
- data/Rakefile +1 -0
- data/lib/qti.rb +62 -0
- data/lib/qti/models/base.rb +80 -0
- data/lib/qti/models/manifest.rb +20 -0
- data/lib/qti/v1/models/assessment.rb +17 -0
- data/lib/qti/v1/models/assessment_item.rb +59 -0
- data/lib/qti/v1/models/base.rb +13 -0
- data/lib/qti/v1/models/choices/logical_identifier_choice.rb +26 -0
- data/lib/qti/v1/models/interactions/logical_identifier_interaction.rb +32 -0
- data/lib/qti/v2/models/assessment_item.rb +62 -0
- data/lib/qti/v2/models/assessment_test.rb +32 -0
- data/lib/qti/v2/models/base.rb +70 -0
- data/lib/qti/v2/models/choices/simple_choice.rb +28 -0
- data/lib/qti/v2/models/interactions.rb +25 -0
- data/lib/qti/v2/models/interactions/choice_interaction.rb +50 -0
- data/spec/fixtures/items_1.2/multiple_answer.xml +105 -0
- data/spec/fixtures/items_1.2/multiple_choice.xml +83 -0
- data/spec/fixtures/items_1.2/true_false.xml +50 -0
- data/spec/fixtures/items_2.1/Example01-modalFeedback.xml +79 -0
- data/spec/fixtures/items_2.1/Example02-feedbackInline.xml +67 -0
- data/spec/fixtures/items_2.1/Example03-feedbackBlock-solution-random.xml +223 -0
- data/spec/fixtures/items_2.1/Example03-feedbackBlock-solution.xml +238 -0
- data/spec/fixtures/items_2.1/Example04-feedbackBlock-templateBlock.xml +582 -0
- data/spec/fixtures/items_2.1/Example05-feedbackBlock-adaptive.xml +397 -0
- data/spec/fixtures/items_2.1/adaptive.xml +286 -0
- data/spec/fixtures/items_2.1/adaptive_template.xml +350 -0
- data/spec/fixtures/items_2.1/associate.xml +33 -0
- data/spec/fixtures/items_2.1/audio-video.xml +46 -0
- data/spec/fixtures/items_2.1/choice.xml +31 -0
- data/spec/fixtures/items_2.1/choice_aria.xml +42 -0
- data/spec/fixtures/items_2.1/choice_fixed.xml +33 -0
- data/spec/fixtures/items_2.1/choice_multiple.xml +31 -0
- data/spec/fixtures/items_2.1/choice_multiple_chocolade.xml +74 -0
- data/spec/fixtures/items_2.1/choice_multiple_rtl.xml +33 -0
- data/spec/fixtures/items_2.1/choice_ruby.xml +39 -0
- data/spec/fixtures/items_2.1/choice_t_f.xml +30 -0
- data/spec/fixtures/items_2.1/choice_true_false.xml +30 -0
- data/spec/fixtures/items_2.1/data-attributes.xml +61 -0
- data/spec/fixtures/items_2.1/drawing.xml +16 -0
- data/spec/fixtures/items_2.1/essay.xml +14 -0
- data/spec/fixtures/items_2.1/extended_text.xml +24 -0
- data/spec/fixtures/items_2.1/extended_text_rubric.xml +36 -0
- data/spec/fixtures/items_2.1/feedback_adaptive.xml +142 -0
- data/spec/fixtures/items_2.1/figures.xml +32 -0
- data/spec/fixtures/items_2.1/gap_match.xml +33 -0
- data/spec/fixtures/items_2.1/graphic_associate.xml +36 -0
- data/spec/fixtures/items_2.1/graphic_gap_match.xml +54 -0
- data/spec/fixtures/items_2.1/graphic_gap_match_text.xml +50 -0
- data/spec/fixtures/items_2.1/graphic_order.xml +32 -0
- data/spec/fixtures/items_2.1/hint.xml +85 -0
- data/spec/fixtures/items_2.1/hotspot.xml +26 -0
- data/spec/fixtures/items_2.1/hottext.xml +33 -0
- data/spec/fixtures/items_2.1/images/CBG.png +0 -0
- data/spec/fixtures/items_2.1/images/EBG.png +0 -0
- data/spec/fixtures/items_2.1/images/EDI.png +0 -0
- data/spec/fixtures/items_2.1/images/GLA.png +0 -0
- data/spec/fixtures/items_2.1/images/MAN.png +0 -0
- data/spec/fixtures/items_2.1/images/MCH.png +0 -0
- data/spec/fixtures/items_2.1/images/airport.png +0 -0
- data/spec/fixtures/items_2.1/images/blueStar.png +0 -0
- data/spec/fixtures/items_2.1/images/blue_door.png +0 -0
- data/spec/fixtures/items_2.1/images/bus.png +0 -0
- data/spec/fixtures/items_2.1/images/castle.png +0 -0
- data/spec/fixtures/items_2.1/images/greenTriangle.png +0 -0
- data/spec/fixtures/items_2.1/images/green_door.png +0 -0
- data/spec/fixtures/items_2.1/images/house.png +0 -0
- data/spec/fixtures/items_2.1/images/open_car.png +0 -0
- data/spec/fixtures/items_2.1/images/open_goat.png +0 -0
- data/spec/fixtures/items_2.1/images/plane.png +0 -0
- data/spec/fixtures/items_2.1/images/postcard.eps +3581 -0
- data/spec/fixtures/items_2.1/images/postcard.png +0 -0
- data/spec/fixtures/items_2.1/images/rectangle.svg +1 -0
- data/spec/fixtures/items_2.1/images/redCircle.png +0 -0
- data/spec/fixtures/items_2.1/images/red_door.png +0 -0
- data/spec/fixtures/items_2.1/images/sign.png +0 -0
- data/spec/fixtures/items_2.1/images/survey.jpg +0 -0
- data/spec/fixtures/items_2.1/images/train.png +0 -0
- data/spec/fixtures/items_2.1/images/uk.png +0 -0
- data/spec/fixtures/items_2.1/images/ukair.png +0 -0
- data/spec/fixtures/items_2.1/images/ukairtags.png +0 -0
- data/spec/fixtures/items_2.1/imsmanifest.xml +227 -0
- data/spec/fixtures/items_2.1/inline_choice.xml +26 -0
- data/spec/fixtures/items_2.1/inline_choice_math.xml +68 -0
- data/spec/fixtures/items_2.1/likert.xml +21 -0
- data/spec/fixtures/items_2.1/match.xml +41 -0
- data/spec/fixtures/items_2.1/math.xml +35 -0
- data/spec/fixtures/items_2.1/mc_calc3.xml +164 -0
- data/spec/fixtures/items_2.1/mc_calc5.xml +211 -0
- data/spec/fixtures/items_2.1/mc_stat2.xml +219 -0
- data/spec/fixtures/items_2.1/media_coords.xml +33 -0
- data/spec/fixtures/items_2.1/multi-input.xml +271 -0
- data/spec/fixtures/items_2.1/nested_object.xml +26 -0
- data/spec/fixtures/items_2.1/order.xml +25 -0
- data/spec/fixtures/items_2.1/order_partial_scoring.xml +55 -0
- data/spec/fixtures/items_2.1/order_rtl.xml +27 -0
- data/spec/fixtures/items_2.1/orkney1.xml +34 -0
- data/spec/fixtures/items_2.1/orkney2.xml +34 -0
- data/spec/fixtures/items_2.1/position_object.xml +34 -0
- data/spec/fixtures/items_2.1/select_point.xml +23 -0
- data/spec/fixtures/items_2.1/shared/orkney.css +1 -0
- data/spec/fixtures/items_2.1/shared/orkney.html +20 -0
- data/spec/fixtures/items_2.1/slider.xml +35 -0
- data/spec/fixtures/items_2.1/svg.xml +28 -0
- data/spec/fixtures/items_2.1/template.xml +88 -0
- data/spec/fixtures/items_2.1/template_image.xml +74 -0
- data/spec/fixtures/items_2.1/text_entry.xml +27 -0
- data/spec/fixtures/items_2.1/upload.xml +18 -0
- data/spec/fixtures/items_2.1/upload_composite.xml +24 -0
- data/spec/fixtures/test_qti_1.2.zip +0 -0
- data/spec/fixtures/test_qti_1.2/contact info.png +0 -0
- data/spec/fixtures/test_qti_1.2/exam1/my_files/org0/images/image.png +0 -0
- data/spec/fixtures/test_qti_1.2/exam1/my_files/org1/images/image.png +0 -0
- data/spec/fixtures/test_qti_1.2/image.png +0 -0
- data/spec/fixtures/test_qti_1.2/imsmanifest.xml +37 -0
- data/spec/fixtures/test_qti_1.2/quiz.xml +216 -0
- data/spec/fixtures/test_qti_2.1.zip +0 -0
- data/spec/fixtures/test_qti_2.1/assessment.xml +77 -0
- data/spec/fixtures/test_qti_2.1/imsmanifest.xml +211 -0
- data/spec/fixtures/test_qti_2.1/mathassess.xsd +54 -0
- data/spec/fixtures/test_qti_2.1/multiple-answer/multiple-answer.xml +31 -0
- data/spec/fixtures/test_qti_2.1/multiple-choice/multiple-choice.xml +31 -0
- data/spec/fixtures/test_qti_2.1/text-entry/text-entry.xml +330 -0
- data/spec/fixtures/test_qti_2.1/true-false/true-false.xml +55 -0
- data/spec/fixtures/tests/feedbackTest/assessment.xml +252 -0
- data/spec/fixtures/tests/feedbackTest/id-38d47747fb30/Example02-feedbackInline.xml +51 -0
- data/spec/fixtures/tests/feedbackTest/id-5e216df10030/Example03-feedbackBlock-solution.xml +199 -0
- data/spec/fixtures/tests/feedbackTest/id-9c33d141576e/Example05-feedbackBlock-adaptive.xml +330 -0
- data/spec/fixtures/tests/feedbackTest/id-aaa0bbf5da1d/Example03-feedbackBlock-solution-random.xml +223 -0
- data/spec/fixtures/tests/feedbackTest/id-d599169403d2/Example04-feedbackBlock-templateBlock.xml +534 -0
- data/spec/fixtures/tests/feedbackTest/id-fa3ee5852723/Example01-modalFeedback.xml +55 -0
- data/spec/fixtures/tests/feedbackTest/imsmanifest.xml +239 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Choicemultiple_2014410822.xml +110 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Choicemultiple_871212949.xml +208 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Choicesingle_853928446.xml +159 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Choicetruefalse_176040516.xml +98 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Hotspot_278940407.xml +109 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Hottext_801974120.xml +106 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/InteractionMixSachsen_1901710679.xml +54 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Matchmultiple_1038910213.xml +139 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Matchsingle_143114773.xml +133 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/Order_913967682.xml +117 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntry_883368511.xml +114 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrynumeric_2040297025.xml +154 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrynumeric_770468849.xml +124 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/TextEntrysubset_806481421.xml +227 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/imsmanifest.xml +278 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/03c5e2f774db49598deb3ac7d05b53f9.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/0563e67fb1bb48ad882e0a5abf2a2686.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/2f44366716474a5d8e2a2e32346cbc05.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/71a299b50b5e4b1492f8ee51ce25be7d.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/a439b702d5034ca38f6df26a12835db3.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/b660fc9f268c4ef688d8606116c70160.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/c2f541343b9b4bfdba9fc90c7a18403e.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/e18b5a2eb8104d0994a182ee0176a05c.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/f88c5aa2c6724a388fdbadc7133eb757.jpg +0 -0
- data/spec/fixtures/tests/interactionmix_saxony_v3/media/ffe337505ef74334a0cecb33310f99c1.jpg +0 -0
- data/spec/fixtures/tests/tests/complete.xml +33 -0
- data/spec/fixtures/tests/tests/report.xml +70 -0
- data/spec/fixtures/tests/tests/rtest01-fragment.xml +12 -0
- data/spec/fixtures/tests/tests/rtest01-set01.xml +17 -0
- data/spec/fixtures/tests/tests/rtest01-set02.xml +17 -0
- data/spec/fixtures/tests/tests/rtest01-set03.xml +17 -0
- data/spec/fixtures/tests/tests/rtest01.xml +16 -0
- data/spec/fixtures/tests/tests/rtest02.xml +48 -0
- data/spec/fixtures/tests/tests/rtest03.xml +38 -0
- data/spec/fixtures/tests/tests/rtest04.xml +50 -0
- data/spec/fixtures/tests/tests/rtest06.xml +34 -0
- data/spec/fixtures/tests/tests/rtest08.xml +38 -0
- data/spec/fixtures/tests/tests/rtest09.xml +33 -0
- data/spec/fixtures/tests/tests/rtest10.xml +48 -0
- data/spec/fixtures/tests/tests/rtest12.xml +38 -0
- data/spec/fixtures/tests/tests/rtest13.xml +62 -0
- data/spec/fixtures/tests/tests/rtest22.xml +41 -0
- data/spec/fixtures/tests/tests/rtest24.xml +37 -0
- data/spec/fixtures/tests/tests/rtest25.xml +62 -0
- data/spec/fixtures/tests/tests/rtest26.xml +38 -0
- data/spec/fixtures/tests/tests/rtest27.xml +46 -0
- data/spec/qti/models/base_spec.rb +71 -0
- data/spec/qti/models/manifest_spec.rb +19 -0
- data/spec/qti/v1/models/assessment_item_spec.rb +49 -0
- data/spec/qti/v1/models/assessment_spec.rb +18 -0
- data/spec/qti/v1/models/choices/logical_identifier_choice_spec.rb +23 -0
- data/spec/qti/v1/models/interactions/logical_identifier_interaction_spec.rb +20 -0
- data/spec/qti/v2/models/assessment_item_spec.rb +67 -0
- data/spec/qti/v2/models/assessment_test_spec.rb +60 -0
- data/spec/qti/v2/models/choices/simple_choice_spec.rb +22 -0
- data/spec/qti/v2/models/interactions/choice_interaction_spec.rb +27 -0
- data/spec/qti_spec.rb +38 -0
- data/spec/spec_helper.rb +10 -0
- metadata +506 -0
data/spec/fixtures/tests/feedbackTest/id-d599169403d2/Example04-feedbackBlock-templateBlock.xml
ADDED
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
2
|
+
<assessmentItem toolVersion="0.5.1" toolName="Mathqurate" title="Find side, directly or sine rule - with solution"
|
|
3
|
+
timeDependent="false" identifier="Example04-feedbackBlock-templateBlock" adaptive="true"
|
|
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" xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
6
|
+
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
|
7
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
8
|
+
<responseDeclaration identifier="RESPONSE1" cardinality="single" baseType="float"/>
|
|
9
|
+
<responseDeclaration identifier="HINTREQUEST" cardinality="single" baseType="boolean"/>
|
|
10
|
+
<responseDeclaration identifier="SOLREQUEST" cardinality="single" baseType="boolean"/>
|
|
11
|
+
<outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE"
|
|
12
|
+
normalMaximum="10.0" normalMinimum="0.0">
|
|
13
|
+
<defaultValue>
|
|
14
|
+
<value>0.0</value>
|
|
15
|
+
</defaultValue>
|
|
16
|
+
</outcomeDeclaration>
|
|
17
|
+
<outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="FEEDBACK"/>
|
|
18
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="EMPTY"/>
|
|
19
|
+
<outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenSolution">
|
|
20
|
+
<defaultValue>
|
|
21
|
+
<value>false</value>
|
|
22
|
+
</defaultValue>
|
|
23
|
+
</outcomeDeclaration>
|
|
24
|
+
<outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenHint">
|
|
25
|
+
<defaultValue>
|
|
26
|
+
<value>false</value>
|
|
27
|
+
</defaultValue>
|
|
28
|
+
</outcomeDeclaration>
|
|
29
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKHINT">
|
|
30
|
+
<defaultValue>
|
|
31
|
+
<value>askhint</value>
|
|
32
|
+
</defaultValue>
|
|
33
|
+
</outcomeDeclaration>
|
|
34
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKSOLUTION">
|
|
35
|
+
<defaultValue>
|
|
36
|
+
<value>asksolution</value>
|
|
37
|
+
</defaultValue>
|
|
38
|
+
</outcomeDeclaration>
|
|
39
|
+
<outcomeDeclaration identifier="oMult" cardinality="single" baseType="float">
|
|
40
|
+
<defaultValue>
|
|
41
|
+
<value>1.0</value>
|
|
42
|
+
</defaultValue>
|
|
43
|
+
</outcomeDeclaration>
|
|
44
|
+
<outcomeDeclaration identifier="oPower" cardinality="single" baseType="float"/>
|
|
45
|
+
<templateDeclaration identifier="iA" cardinality="single" baseType="integer"
|
|
46
|
+
paramVariable="false" mathVariable="true">
|
|
47
|
+
<defaultValue>
|
|
48
|
+
<value>90</value>
|
|
49
|
+
</defaultValue>
|
|
50
|
+
</templateDeclaration>
|
|
51
|
+
<templateDeclaration identifier="iB" cardinality="single" baseType="integer"
|
|
52
|
+
paramVariable="false" mathVariable="true">
|
|
53
|
+
<defaultValue>
|
|
54
|
+
<value>65</value>
|
|
55
|
+
</defaultValue>
|
|
56
|
+
</templateDeclaration>
|
|
57
|
+
<templateDeclaration identifier="ia" cardinality="single" baseType="integer"
|
|
58
|
+
paramVariable="false" mathVariable="true"/>
|
|
59
|
+
<templateDeclaration identifier="sinA" cardinality="single" baseType="float"
|
|
60
|
+
paramVariable="false" mathVariable="true"/>
|
|
61
|
+
<templateDeclaration identifier="sinB" cardinality="single" baseType="float"
|
|
62
|
+
paramVariable="false" mathVariable="true"/>
|
|
63
|
+
<templateDeclaration identifier="fAns" cardinality="single" baseType="float"
|
|
64
|
+
paramVariable="false" mathVariable="true"/>
|
|
65
|
+
<templateDeclaration identifier="fPiOver180" cardinality="single" baseType="float"
|
|
66
|
+
paramVariable="false" mathVariable="true"/>
|
|
67
|
+
<templateDeclaration identifier="sType" cardinality="single" baseType="string"
|
|
68
|
+
paramVariable="false" mathVariable="false"/>
|
|
69
|
+
<templateDeclaration baseType="identifier" cardinality="single" identifier="tSol"/>
|
|
70
|
+
<templateDeclaration baseType="identifier" cardinality="single" identifier="tSoli"/>
|
|
71
|
+
<templateProcessing>
|
|
72
|
+
<!-- now do the randomisation and mathematical calculations -->
|
|
73
|
+
<!-- for this example, iA is often 90 degrees -->
|
|
74
|
+
<setTemplateValue identifier="iA">
|
|
75
|
+
<random>
|
|
76
|
+
<multiple>
|
|
77
|
+
<baseValue baseType="integer">45</baseValue>
|
|
78
|
+
<baseValue baseType="integer">60</baseValue>
|
|
79
|
+
<baseValue baseType="integer">75</baseValue>
|
|
80
|
+
<baseValue baseType="integer">90</baseValue>
|
|
81
|
+
<baseValue baseType="integer">90</baseValue>
|
|
82
|
+
<baseValue baseType="integer">90</baseValue>
|
|
83
|
+
</multiple>
|
|
84
|
+
</random>
|
|
85
|
+
</setTemplateValue>
|
|
86
|
+
<setTemplateValue identifier="iB">
|
|
87
|
+
<randomInteger min="50" max="85" step="5"/>
|
|
88
|
+
</setTemplateValue>
|
|
89
|
+
<templateConstraint>
|
|
90
|
+
<not>
|
|
91
|
+
<equal toleranceMode="exact">
|
|
92
|
+
<variable identifier="iA"/>
|
|
93
|
+
<variable identifier="iB"/>
|
|
94
|
+
</equal>
|
|
95
|
+
</not>
|
|
96
|
+
</templateConstraint>
|
|
97
|
+
<setTemplateValue identifier="ia">
|
|
98
|
+
<randomInteger min="5" max="50"/>
|
|
99
|
+
</setTemplateValue>
|
|
100
|
+
<setTemplateValue identifier="fPiOver180">
|
|
101
|
+
<divide>
|
|
102
|
+
<mathConstant name="pi"/>
|
|
103
|
+
<baseValue baseType="integer">180</baseValue>
|
|
104
|
+
</divide>
|
|
105
|
+
</setTemplateValue>
|
|
106
|
+
<setTemplateValue identifier="sinA">
|
|
107
|
+
<mathOperator name="sin">
|
|
108
|
+
<product>
|
|
109
|
+
<variable identifier="iA"/>
|
|
110
|
+
<variable identifier="fPiOver180"/>
|
|
111
|
+
</product>
|
|
112
|
+
</mathOperator>
|
|
113
|
+
</setTemplateValue>
|
|
114
|
+
<setTemplateValue identifier="sinB">
|
|
115
|
+
<mathOperator name="sin">
|
|
116
|
+
<product>
|
|
117
|
+
<variable identifier="iB"/>
|
|
118
|
+
<variable identifier="fPiOver180"/>
|
|
119
|
+
</product>
|
|
120
|
+
</mathOperator>
|
|
121
|
+
</setTemplateValue>
|
|
122
|
+
<setTemplateValue identifier="sinA">
|
|
123
|
+
<roundTo roundingMode="significantFigures" figures="5">
|
|
124
|
+
<variable identifier="sinA"/>
|
|
125
|
+
</roundTo>
|
|
126
|
+
</setTemplateValue>
|
|
127
|
+
<setTemplateValue identifier="sinB">
|
|
128
|
+
<roundTo roundingMode="significantFigures" figures="5">
|
|
129
|
+
<variable identifier="sinB"/>
|
|
130
|
+
</roundTo>
|
|
131
|
+
</setTemplateValue>
|
|
132
|
+
<setTemplateValue identifier="fAns">
|
|
133
|
+
<divide>
|
|
134
|
+
<product>
|
|
135
|
+
<variable identifier="ia"/>
|
|
136
|
+
<variable identifier="sinB"/>
|
|
137
|
+
</product>
|
|
138
|
+
<variable identifier="sinA"/>
|
|
139
|
+
</divide>
|
|
140
|
+
</setTemplateValue>
|
|
141
|
+
<setTemplateValue identifier="fAns">
|
|
142
|
+
<roundTo roundingMode="significantFigures" figures="3">
|
|
143
|
+
<variable identifier="fAns"/>
|
|
144
|
+
</roundTo>
|
|
145
|
+
</setTemplateValue>
|
|
146
|
+
<!-- set up alternative content depending on the value of variable iA -->
|
|
147
|
+
<templateCondition>
|
|
148
|
+
<templateIf>
|
|
149
|
+
<equal toleranceMode="exact">
|
|
150
|
+
<variable identifier="iA"/>
|
|
151
|
+
<baseValue baseType="integer">90</baseValue>
|
|
152
|
+
</equal>
|
|
153
|
+
<setTemplateValue identifier="sType">
|
|
154
|
+
<baseValue baseType="string">right angle</baseValue>
|
|
155
|
+
</setTemplateValue>
|
|
156
|
+
<setTemplateValue identifier="tSol">
|
|
157
|
+
<baseValue baseType="identifier">SolRightAngle</baseValue>
|
|
158
|
+
</setTemplateValue>
|
|
159
|
+
<setTemplateValue identifier="tSoli">
|
|
160
|
+
<baseValue baseType="identifier">SolRightAnglei</baseValue>
|
|
161
|
+
</setTemplateValue>
|
|
162
|
+
</templateIf>
|
|
163
|
+
<templateElse>
|
|
164
|
+
<setTemplateValue identifier="sType">
|
|
165
|
+
<baseValue baseType="string">scalene</baseValue>
|
|
166
|
+
</setTemplateValue>
|
|
167
|
+
<setTemplateValue identifier="tSol">
|
|
168
|
+
<baseValue baseType="identifier">SolScalene</baseValue>
|
|
169
|
+
</setTemplateValue>
|
|
170
|
+
<setTemplateValue identifier="tSoli">
|
|
171
|
+
<baseValue baseType="identifier">SolScalenei</baseValue>
|
|
172
|
+
</setTemplateValue>
|
|
173
|
+
</templateElse>
|
|
174
|
+
</templateCondition>
|
|
175
|
+
</templateProcessing>
|
|
176
|
+
<itemBody>
|
|
177
|
+
<p>In triangle ABC, side a=<printedVariable identifier="ia"/>, angle A=<printedVariable identifier="iA"/>° and angle
|
|
178
|
+
B=<printedVariable identifier="iB"/>°. Find the length of side b.</p>
|
|
179
|
+
<div class="">
|
|
180
|
+
<p>Enter your answer to 3 significant figures.</p>
|
|
181
|
+
<textEntryInteraction responseIdentifier="RESPONSE1" expectedLength="20"/>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="">
|
|
184
|
+
<feedbackInline id="feedbackInline3" showHide="show" outcomeIdentifier="FEEDBACK"
|
|
185
|
+
identifier="Correct"> OK </feedbackInline></div>
|
|
186
|
+
<div class="">
|
|
187
|
+
<feedbackInline id="feedbackInline2" showHide="show" outcomeIdentifier="FEEDBACK"
|
|
188
|
+
identifier="Partial"> Not far off - check your rounding... </feedbackInline></div>
|
|
189
|
+
<div class="">
|
|
190
|
+
<feedbackInline id="feedbackInline1" showHide="show" outcomeIdentifier="FEEDBACK"
|
|
191
|
+
identifier="Incorrect"> Incorrect
|
|
192
|
+
</feedbackInline></div>
|
|
193
|
+
<div class="">
|
|
194
|
+
<feedbackBlock id="feedbackBlock11" identifier="THREETRIES" outcomeIdentifier="FEEDBACK"
|
|
195
|
+
showHide="show">
|
|
196
|
+
<p> You have had three attempts at answering this question, so here is the solution:
|
|
197
|
+
</p>
|
|
198
|
+
</feedbackBlock>
|
|
199
|
+
<!-- this feedbackBlock contains the solution,
|
|
200
|
+
which is different depending on the value of iA -->
|
|
201
|
+
<feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
|
|
202
|
+
<p>This is a <printedVariable identifier="sType"/> triangle, so
|
|
203
|
+
<templateInline templateIdentifier="tSoli" identifier="SolRightAnglei" showHide="show">
|
|
204
|
+
<span> we can use sin(B) to find b directly</span></templateInline>
|
|
205
|
+
<templateInline templateIdentifier="tSoli" identifier="SolScalenei" showHide="show">
|
|
206
|
+
<span> we apply the Sine Rule</span></templateInline>:
|
|
207
|
+
</p>
|
|
208
|
+
<templateBlock templateIdentifier="tSol" identifier="SolRightAngle" showHide="show">
|
|
209
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
|
210
|
+
<semantics>
|
|
211
|
+
<mtable>
|
|
212
|
+
<mtr>
|
|
213
|
+
<mtd columnalign="right">
|
|
214
|
+
<mrow>
|
|
215
|
+
<mi>sin</mi>
|
|
216
|
+
<mfenced close=")" open="(">
|
|
217
|
+
<mi>B</mi>
|
|
218
|
+
</mfenced>
|
|
219
|
+
</mrow>
|
|
220
|
+
</mtd>
|
|
221
|
+
<mtd columnalign="center">
|
|
222
|
+
<mo>=</mo>
|
|
223
|
+
</mtd>
|
|
224
|
+
<mtd columnalign="left">
|
|
225
|
+
<mfrac>
|
|
226
|
+
<mi>b</mi>
|
|
227
|
+
<mi>a</mi>
|
|
228
|
+
</mfrac>
|
|
229
|
+
</mtd>
|
|
230
|
+
</mtr>
|
|
231
|
+
<mtr>
|
|
232
|
+
<mtd columnalign="right">
|
|
233
|
+
<mi>b</mi>
|
|
234
|
+
</mtd>
|
|
235
|
+
<mtd columnalign="center">
|
|
236
|
+
<mo>=</mo>
|
|
237
|
+
</mtd>
|
|
238
|
+
<mtd columnalign="left">
|
|
239
|
+
<mi>a</mi>
|
|
240
|
+
<mrow>
|
|
241
|
+
<mi>sin</mi>
|
|
242
|
+
<mfenced close=")" open="(">
|
|
243
|
+
<mi>B</mi>
|
|
244
|
+
</mfenced>
|
|
245
|
+
</mrow>
|
|
246
|
+
</mtd>
|
|
247
|
+
</mtr>
|
|
248
|
+
<mtr>
|
|
249
|
+
<mtd columnalign="right">
|
|
250
|
+
<mi>b</mi>
|
|
251
|
+
</mtd>
|
|
252
|
+
<mtd columnalign="center">
|
|
253
|
+
<mo>=</mo>
|
|
254
|
+
</mtd>
|
|
255
|
+
<mtd columnalign="left">
|
|
256
|
+
<mrow>
|
|
257
|
+
<mi>ia</mi>
|
|
258
|
+
<mo>×</mo>
|
|
259
|
+
<mi>sin</mi>
|
|
260
|
+
<mfenced close=")" open="(">
|
|
261
|
+
<mi>iB</mi>
|
|
262
|
+
</mfenced>
|
|
263
|
+
</mrow>
|
|
264
|
+
</mtd>
|
|
265
|
+
</mtr>
|
|
266
|
+
<mtr>
|
|
267
|
+
<mtd columnalign="right"/>
|
|
268
|
+
<mtd columnalign="center">
|
|
269
|
+
<mo>=</mo>
|
|
270
|
+
</mtd>
|
|
271
|
+
<mtd columnalign="left">
|
|
272
|
+
<mi>fAns</mi>
|
|
273
|
+
</mtd>
|
|
274
|
+
</mtr>
|
|
275
|
+
</mtable>
|
|
276
|
+
<annotation encoding="SnuggleTeX">\begin{eqnarray*}
|
|
277
|
+
\\sin(B)&=&\frac{b}{a}\\
|
|
278
|
+
b&=&a\sin(B)\\
|
|
279
|
+
&=&\qv{ia}\times\sin(\qv{iB})
|
|
280
|
+
&=&\qv{fAns} \end{eqnarray*}</annotation>
|
|
281
|
+
</semantics>
|
|
282
|
+
</math>
|
|
283
|
+
</templateBlock>
|
|
284
|
+
<templateBlock templateIdentifier="tSol" identifier="SolScalene" showHide="show">
|
|
285
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
|
286
|
+
<semantics>
|
|
287
|
+
<mtable>
|
|
288
|
+
<mtr>
|
|
289
|
+
<mtd columnalign="right">
|
|
290
|
+
<mfrac>
|
|
291
|
+
<mi>a</mi>
|
|
292
|
+
<mrow>
|
|
293
|
+
<mi>sin</mi>
|
|
294
|
+
<mfenced close=")" open="(">
|
|
295
|
+
<mi>A</mi>
|
|
296
|
+
</mfenced>
|
|
297
|
+
</mrow>
|
|
298
|
+
</mfrac>
|
|
299
|
+
</mtd>
|
|
300
|
+
<mtd columnalign="center">
|
|
301
|
+
<mo>=</mo>
|
|
302
|
+
</mtd>
|
|
303
|
+
<mtd columnalign="left">
|
|
304
|
+
<mfrac>
|
|
305
|
+
<mi>b</mi>
|
|
306
|
+
<mrow>
|
|
307
|
+
<mi>sin</mi>
|
|
308
|
+
<mfenced close=")" open="(">
|
|
309
|
+
<mi>B</mi>
|
|
310
|
+
</mfenced>
|
|
311
|
+
</mrow>
|
|
312
|
+
</mfrac>
|
|
313
|
+
</mtd>
|
|
314
|
+
</mtr>
|
|
315
|
+
<mtr>
|
|
316
|
+
<mtd columnalign="right">
|
|
317
|
+
<mfrac>
|
|
318
|
+
<mi>ia</mi>
|
|
319
|
+
<mrow>
|
|
320
|
+
<mi>sin</mi>
|
|
321
|
+
<mfenced close=")" open="(">
|
|
322
|
+
<mi>iA</mi>
|
|
323
|
+
</mfenced>
|
|
324
|
+
</mrow>
|
|
325
|
+
</mfrac>
|
|
326
|
+
</mtd>
|
|
327
|
+
<mtd columnalign="center">
|
|
328
|
+
<mo>=</mo>
|
|
329
|
+
</mtd>
|
|
330
|
+
<mtd columnalign="left">
|
|
331
|
+
<mfrac>
|
|
332
|
+
<mi>b</mi>
|
|
333
|
+
<mrow>
|
|
334
|
+
<mi>sin</mi>
|
|
335
|
+
<mfenced close=")" open="(">
|
|
336
|
+
<mi>iB</mi>
|
|
337
|
+
</mfenced>
|
|
338
|
+
</mrow>
|
|
339
|
+
</mfrac>
|
|
340
|
+
</mtd>
|
|
341
|
+
</mtr>
|
|
342
|
+
<mtr>
|
|
343
|
+
<mtd columnalign="right">
|
|
344
|
+
<mi>b</mi>
|
|
345
|
+
</mtd>
|
|
346
|
+
<mtd columnalign="center">
|
|
347
|
+
<mo>=</mo>
|
|
348
|
+
</mtd>
|
|
349
|
+
<mtd columnalign="left">
|
|
350
|
+
<mfrac>
|
|
351
|
+
<mrow>
|
|
352
|
+
<mi>ia</mi>
|
|
353
|
+
<mo>×</mo>
|
|
354
|
+
<mi>sin</mi>
|
|
355
|
+
<mfenced close=")" open="(">
|
|
356
|
+
<mi>iB</mi>
|
|
357
|
+
</mfenced>
|
|
358
|
+
</mrow>
|
|
359
|
+
<mrow>
|
|
360
|
+
<mi>sin</mi>
|
|
361
|
+
<mfenced close=")" open="(">
|
|
362
|
+
<mi>iA</mi>
|
|
363
|
+
</mfenced>
|
|
364
|
+
</mrow>
|
|
365
|
+
</mfrac>
|
|
366
|
+
</mtd>
|
|
367
|
+
</mtr>
|
|
368
|
+
<mtr>
|
|
369
|
+
<mtd columnalign="right"/>
|
|
370
|
+
<mtd columnalign="center">
|
|
371
|
+
<mo>=</mo>
|
|
372
|
+
</mtd>
|
|
373
|
+
<mtd columnalign="left">
|
|
374
|
+
<mfrac>
|
|
375
|
+
<mrow>
|
|
376
|
+
<mi>ia</mi>
|
|
377
|
+
<mo>×</mo>
|
|
378
|
+
<mi>sinB</mi>
|
|
379
|
+
</mrow>
|
|
380
|
+
<mrow>
|
|
381
|
+
<mi>sinA</mi>
|
|
382
|
+
</mrow>
|
|
383
|
+
</mfrac>
|
|
384
|
+
</mtd>
|
|
385
|
+
</mtr>
|
|
386
|
+
<mtr>
|
|
387
|
+
<mtd columnalign="right"/>
|
|
388
|
+
<mtd columnalign="center">
|
|
389
|
+
<mo>=</mo>
|
|
390
|
+
</mtd>
|
|
391
|
+
<mtd columnalign="left">
|
|
392
|
+
<mi>fAns</mi>
|
|
393
|
+
</mtd>
|
|
394
|
+
</mtr>
|
|
395
|
+
</mtable>
|
|
396
|
+
<annotation encoding="SnuggleTeX">\begin{eqnarray*}
|
|
397
|
+
\frac{a}{\sin(A)}&=&\frac{b}{\sin(B)}\\
|
|
398
|
+
\frac{\qv{ia}}{\sin(\qv{iA})}&=&\frac{b}{\sin(\qv{iB})}
|
|
399
|
+
b&=&\frac{A\times\sin(B)}{\sin(A)}\\
|
|
400
|
+
&=&\frac{\qv{ia}\times\sin(\qv{iB})}{\sin(\qv{iA})}\\
|
|
401
|
+
&=&\qv{fAns} \end{eqnarray*}</annotation>
|
|
402
|
+
</semantics>
|
|
403
|
+
</math>
|
|
404
|
+
</templateBlock>
|
|
405
|
+
<p>So the expected answer is <printedVariable identifier="fAns"/>.</p>
|
|
406
|
+
</feedbackBlock></div>
|
|
407
|
+
<!-- Explain why the score is zero (after viewing solution) -->
|
|
408
|
+
<feedbackBlock identifier="SEEN-SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
|
|
409
|
+
<p> Since you have viewed the solution, your score for this question will be 0. </p>
|
|
410
|
+
</feedbackBlock>
|
|
411
|
+
<!-- show the solution button -->
|
|
412
|
+
<feedbackBlock identifier="asksolution" outcomeIdentifier="ASKSOLUTION" showHide="show">
|
|
413
|
+
<div>
|
|
414
|
+
<endAttemptInteraction id="endAttemptInteraction2" responseIdentifier="SOLREQUEST"
|
|
415
|
+
title="Show Solution"/>
|
|
416
|
+
</div>
|
|
417
|
+
</feedbackBlock>
|
|
418
|
+
</itemBody>
|
|
419
|
+
<responseProcessing>
|
|
420
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
421
|
+
<multiple>
|
|
422
|
+
<variable identifier="EMPTY"/>
|
|
423
|
+
</multiple>
|
|
424
|
+
</setOutcomeValue>
|
|
425
|
+
<responseCondition>
|
|
426
|
+
<responseIf>
|
|
427
|
+
<variable identifier="SOLREQUEST"/>
|
|
428
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
429
|
+
<multiple>
|
|
430
|
+
<baseValue baseType="identifier">SOLUTION</baseValue>
|
|
431
|
+
</multiple>
|
|
432
|
+
</setOutcomeValue>
|
|
433
|
+
<setOutcomeValue identifier="seenSolution">
|
|
434
|
+
<baseValue baseType="boolean">true</baseValue>
|
|
435
|
+
</setOutcomeValue>
|
|
436
|
+
<setOutcomeValue identifier="completionStatus">
|
|
437
|
+
<baseValue baseType="identifier">completed</baseValue>
|
|
438
|
+
</setOutcomeValue>
|
|
439
|
+
<setOutcomeValue identifier="ASKSOLUTION">
|
|
440
|
+
<baseValue baseType="identifier">null</baseValue>
|
|
441
|
+
</setOutcomeValue>
|
|
442
|
+
</responseIf>
|
|
443
|
+
<responseElse>
|
|
444
|
+
<responseCondition>
|
|
445
|
+
<responseIf>
|
|
446
|
+
<isNull>
|
|
447
|
+
<variable identifier="RESPONSE1"/>
|
|
448
|
+
</isNull>
|
|
449
|
+
<setOutcomeValue identifier="SCORE">
|
|
450
|
+
<baseValue baseType="float">0</baseValue>
|
|
451
|
+
</setOutcomeValue>
|
|
452
|
+
</responseIf>
|
|
453
|
+
<responseElse>
|
|
454
|
+
<responseCondition>
|
|
455
|
+
<responseIf>
|
|
456
|
+
<equalRounded roundingMode="significantFigures" figures="3">
|
|
457
|
+
<variable identifier="fAns"/>
|
|
458
|
+
<variable identifier="RESPONSE1"/>
|
|
459
|
+
</equalRounded>
|
|
460
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
461
|
+
<multiple>
|
|
462
|
+
<baseValue baseType="identifier">Correct</baseValue>
|
|
463
|
+
</multiple>
|
|
464
|
+
</setOutcomeValue>
|
|
465
|
+
<setOutcomeValue identifier="SCORE">
|
|
466
|
+
<baseValue baseType="float">10.0</baseValue>
|
|
467
|
+
</setOutcomeValue>
|
|
468
|
+
</responseIf>
|
|
469
|
+
<responseElseIf>
|
|
470
|
+
<equalRounded roundingMode="significantFigures" figures="2">
|
|
471
|
+
<variable identifier="RESPONSE1"/>
|
|
472
|
+
<variable identifier="fAns"/>
|
|
473
|
+
</equalRounded>
|
|
474
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
475
|
+
<multiple>
|
|
476
|
+
<baseValue baseType="identifier">Partial</baseValue>
|
|
477
|
+
</multiple>
|
|
478
|
+
</setOutcomeValue>
|
|
479
|
+
<setOutcomeValue identifier="SCORE">
|
|
480
|
+
<baseValue baseType="float">5.0</baseValue>
|
|
481
|
+
</setOutcomeValue>
|
|
482
|
+
</responseElseIf>
|
|
483
|
+
<responseElse>
|
|
484
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
485
|
+
<multiple>
|
|
486
|
+
<baseValue baseType="identifier">Incorrect</baseValue>
|
|
487
|
+
</multiple>
|
|
488
|
+
</setOutcomeValue>
|
|
489
|
+
<setOutcomeValue identifier="SCORE">
|
|
490
|
+
<baseValue baseType="float">0.0</baseValue>
|
|
491
|
+
</setOutcomeValue>
|
|
492
|
+
</responseElse>
|
|
493
|
+
</responseCondition>
|
|
494
|
+
<responseCondition>
|
|
495
|
+
<responseIf>
|
|
496
|
+
<gt>
|
|
497
|
+
<variable identifier="numAttempts"/>
|
|
498
|
+
<baseValue baseType="integer">3</baseValue>
|
|
499
|
+
</gt>
|
|
500
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
501
|
+
<multiple>
|
|
502
|
+
<baseValue baseType="identifier"> THREETRIES </baseValue>
|
|
503
|
+
<baseValue baseType="identifier"> SOLUTION </baseValue>
|
|
504
|
+
</multiple>
|
|
505
|
+
</setOutcomeValue>
|
|
506
|
+
<!-- completionStatus must be specifically set to completed in adaptive questions -->
|
|
507
|
+
<setOutcomeValue identifier="completionStatus">
|
|
508
|
+
<baseValue baseType="identifier">completed</baseValue>
|
|
509
|
+
</setOutcomeValue>
|
|
510
|
+
<setOutcomeValue identifier="ASKSOLUTION">
|
|
511
|
+
<baseValue baseType="identifier">null</baseValue>
|
|
512
|
+
</setOutcomeValue>
|
|
513
|
+
</responseIf>
|
|
514
|
+
</responseCondition>
|
|
515
|
+
<responseCondition>
|
|
516
|
+
<responseIf>
|
|
517
|
+
<variable identifier="seenSolution"/>
|
|
518
|
+
<setOutcomeValue identifier="FEEDBACK">
|
|
519
|
+
<multiple>
|
|
520
|
+
<variable identifier="FEEDBACK"/>
|
|
521
|
+
<baseValue baseType="identifier">SEEN-SOLUTION</baseValue>
|
|
522
|
+
</multiple>
|
|
523
|
+
</setOutcomeValue>
|
|
524
|
+
<setOutcomeValue identifier="SCORE">
|
|
525
|
+
<baseValue baseType="float">0.0</baseValue>
|
|
526
|
+
</setOutcomeValue>
|
|
527
|
+
</responseIf>
|
|
528
|
+
</responseCondition>
|
|
529
|
+
</responseElse>
|
|
530
|
+
</responseCondition>
|
|
531
|
+
</responseElse>
|
|
532
|
+
</responseCondition>
|
|
533
|
+
</responseProcessing>
|
|
534
|
+
</assessmentItem>
|