qti 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,582 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<assessmentItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3
|
+
xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2.xsd"
|
4
|
+
xmlns="http://www.imsglobal.org/xsd/imsqti_v2p2"
|
5
|
+
xmlns:xi="http://www.w3.org/2001/XInclude"
|
6
|
+
xmlns:m="http://www.w3.org/1998/Math/MathML"
|
7
|
+
toolVersion="0.5.1"
|
8
|
+
toolName="Mathqurate"
|
9
|
+
title="Find side, directly or sine rule - with solution"
|
10
|
+
timeDependent="false"
|
11
|
+
identifier="Example04-feedbackBlock-templateBlock"
|
12
|
+
adaptive="true">
|
13
|
+
<responseDeclaration identifier="RESPONSE1" cardinality="single" baseType="float"/>
|
14
|
+
<responseDeclaration identifier="HINTREQUEST" cardinality="single" baseType="boolean"/>
|
15
|
+
<responseDeclaration identifier="SOLREQUEST" cardinality="single" baseType="boolean"/>
|
16
|
+
<outcomeDeclaration baseType="float" cardinality="single" identifier="SCORE"
|
17
|
+
normalMaximum="10.0" normalMinimum="0.0">
|
18
|
+
<defaultValue>
|
19
|
+
<value>0.0</value>
|
20
|
+
</defaultValue>
|
21
|
+
</outcomeDeclaration>
|
22
|
+
<outcomeDeclaration baseType="identifier" cardinality="multiple" identifier="FEEDBACK"/>
|
23
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="EMPTY"/>
|
24
|
+
<outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenSolution">
|
25
|
+
<defaultValue>
|
26
|
+
<value>false</value>
|
27
|
+
</defaultValue>
|
28
|
+
</outcomeDeclaration>
|
29
|
+
<outcomeDeclaration baseType="boolean" cardinality="single" identifier="seenHint">
|
30
|
+
<defaultValue>
|
31
|
+
<value>false</value>
|
32
|
+
</defaultValue>
|
33
|
+
</outcomeDeclaration>
|
34
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKHINT">
|
35
|
+
<defaultValue>
|
36
|
+
<value>askhint</value>
|
37
|
+
</defaultValue>
|
38
|
+
</outcomeDeclaration>
|
39
|
+
<outcomeDeclaration baseType="identifier" cardinality="single" identifier="ASKSOLUTION">
|
40
|
+
<defaultValue>
|
41
|
+
<value>asksolution</value>
|
42
|
+
</defaultValue>
|
43
|
+
</outcomeDeclaration>
|
44
|
+
<outcomeDeclaration identifier="oMult" cardinality="single" baseType="float">
|
45
|
+
<defaultValue>
|
46
|
+
<value>1.0</value>
|
47
|
+
</defaultValue>
|
48
|
+
</outcomeDeclaration>
|
49
|
+
<outcomeDeclaration identifier="oPower" cardinality="single" baseType="float"/>
|
50
|
+
|
51
|
+
<!--The template variables for the calculation are declared, among them iA, an integer variable; it will be used in MathML,
|
52
|
+
so the mathVariable attribute is true.-->
|
53
|
+
|
54
|
+
<templateDeclaration identifier="iA" cardinality="single" baseType="integer"
|
55
|
+
paramVariable="false" mathVariable="true">
|
56
|
+
<defaultValue>
|
57
|
+
<value>90</value>
|
58
|
+
</defaultValue>
|
59
|
+
</templateDeclaration>
|
60
|
+
<templateDeclaration identifier="iB" cardinality="single" baseType="integer"
|
61
|
+
paramVariable="false" mathVariable="true">
|
62
|
+
<defaultValue>
|
63
|
+
<value>65</value>
|
64
|
+
</defaultValue>
|
65
|
+
</templateDeclaration>
|
66
|
+
<templateDeclaration identifier="ia" cardinality="single" baseType="integer"
|
67
|
+
paramVariable="false" mathVariable="true"/>
|
68
|
+
<templateDeclaration identifier="sinA" cardinality="single" baseType="float"
|
69
|
+
paramVariable="false" mathVariable="true"/>
|
70
|
+
<templateDeclaration identifier="sinB" cardinality="single" baseType="float"
|
71
|
+
paramVariable="false" mathVariable="true"/>
|
72
|
+
<templateDeclaration identifier="fAns" cardinality="single" baseType="float"
|
73
|
+
paramVariable="false" mathVariable="true"/>
|
74
|
+
<templateDeclaration identifier="fPiOver180" cardinality="single" baseType="float"
|
75
|
+
paramVariable="false" mathVariable="true"/>
|
76
|
+
|
77
|
+
<!--This template variable holds a string which describes the triangle.-->
|
78
|
+
|
79
|
+
<templateDeclaration identifier="sType" cardinality="single" baseType="string"
|
80
|
+
paramVariable="false" mathVariable="false"/>
|
81
|
+
|
82
|
+
<!--These template variables control the display of the templateInline and templateBlock elements.-->
|
83
|
+
|
84
|
+
<templateDeclaration baseType="identifier" cardinality="single" identifier="tSol"/>
|
85
|
+
<templateDeclaration baseType="identifier" cardinality="single" identifier="tSoli"/>
|
86
|
+
<templateProcessing>
|
87
|
+
|
88
|
+
<!-- now do the randomisation and mathematical calculations -->
|
89
|
+
<!-- The value of iA is selected randomly from a list of possible values of which several are 90 -->
|
90
|
+
|
91
|
+
<setTemplateValue identifier="iA">
|
92
|
+
<random>
|
93
|
+
<multiple>
|
94
|
+
<baseValue baseType="integer">45</baseValue>
|
95
|
+
<baseValue baseType="integer">60</baseValue>
|
96
|
+
<baseValue baseType="integer">75</baseValue>
|
97
|
+
<baseValue baseType="integer">90</baseValue>
|
98
|
+
<baseValue baseType="integer">90</baseValue>
|
99
|
+
<baseValue baseType="integer">90</baseValue>
|
100
|
+
</multiple>
|
101
|
+
</random>
|
102
|
+
</setTemplateValue>
|
103
|
+
<setTemplateValue identifier="iB">
|
104
|
+
<randomInteger min="50" max="85" step="5"/>
|
105
|
+
</setTemplateValue>
|
106
|
+
<templateConstraint>
|
107
|
+
<not>
|
108
|
+
<equal toleranceMode="exact">
|
109
|
+
<variable identifier="iA"/>
|
110
|
+
<variable identifier="iB"/>
|
111
|
+
</equal>
|
112
|
+
</not>
|
113
|
+
</templateConstraint>
|
114
|
+
<setTemplateValue identifier="ia">
|
115
|
+
<randomInteger min="5" max="50"/>
|
116
|
+
</setTemplateValue>
|
117
|
+
<setTemplateValue identifier="fPiOver180">
|
118
|
+
<divide>
|
119
|
+
<mathConstant name="pi"/>
|
120
|
+
<baseValue baseType="integer">180</baseValue>
|
121
|
+
</divide>
|
122
|
+
</setTemplateValue>
|
123
|
+
<setTemplateValue identifier="sinA">
|
124
|
+
<mathOperator name="sin">
|
125
|
+
<product>
|
126
|
+
<variable identifier="iA"/>
|
127
|
+
<variable identifier="fPiOver180"/>
|
128
|
+
</product>
|
129
|
+
</mathOperator>
|
130
|
+
</setTemplateValue>
|
131
|
+
<setTemplateValue identifier="sinB">
|
132
|
+
<mathOperator name="sin">
|
133
|
+
<product>
|
134
|
+
<variable identifier="iB"/>
|
135
|
+
<variable identifier="fPiOver180"/>
|
136
|
+
</product>
|
137
|
+
</mathOperator>
|
138
|
+
</setTemplateValue>
|
139
|
+
<setTemplateValue identifier="sinA">
|
140
|
+
<roundTo roundingMode="significantFigures" figures="5">
|
141
|
+
<variable identifier="sinA"/>
|
142
|
+
</roundTo>
|
143
|
+
</setTemplateValue>
|
144
|
+
<setTemplateValue identifier="sinB">
|
145
|
+
<roundTo roundingMode="significantFigures" figures="5">
|
146
|
+
<variable identifier="sinB"/>
|
147
|
+
</roundTo>
|
148
|
+
</setTemplateValue>
|
149
|
+
<setTemplateValue identifier="fAns">
|
150
|
+
<divide>
|
151
|
+
<product>
|
152
|
+
<variable identifier="ia"/>
|
153
|
+
<variable identifier="sinB"/>
|
154
|
+
</product>
|
155
|
+
<variable identifier="sinA"/>
|
156
|
+
</divide>
|
157
|
+
</setTemplateValue>
|
158
|
+
<setTemplateValue identifier="fAns">
|
159
|
+
<roundTo roundingMode="significantFigures" figures="3">
|
160
|
+
<variable identifier="fAns"/>
|
161
|
+
</roundTo>
|
162
|
+
</setTemplateValue>
|
163
|
+
|
164
|
+
<!-- set up alternative content depending on the value of variable iA -->
|
165
|
+
|
166
|
+
<templateCondition>
|
167
|
+
<templateIf>
|
168
|
+
<equal toleranceMode="exact">
|
169
|
+
|
170
|
+
<!--If iA is 90, sType contains “right angled”, tSol contains the identifier, SolRightAngle, of the
|
171
|
+
templateBlock for the right angle case, and tSoli contains the identifier, SolRightAnglei, of the
|
172
|
+
templateInline for the right angle case-->
|
173
|
+
|
174
|
+
<variable identifier="iA"/>
|
175
|
+
<baseValue baseType="integer">90</baseValue>
|
176
|
+
</equal>
|
177
|
+
<setTemplateValue identifier="sType">
|
178
|
+
<baseValue baseType="string">right angle</baseValue>
|
179
|
+
</setTemplateValue>
|
180
|
+
<setTemplateValue identifier="tSol">
|
181
|
+
<baseValue baseType="identifier">SolRightAngle</baseValue>
|
182
|
+
</setTemplateValue>
|
183
|
+
<setTemplateValue identifier="tSoli">
|
184
|
+
<baseValue baseType="identifier">SolRightAnglei</baseValue>
|
185
|
+
</setTemplateValue>
|
186
|
+
</templateIf>
|
187
|
+
<templateElse>
|
188
|
+
|
189
|
+
<!--If iA is not 90, sType contains "scalene", tSol contains the identifier, SolScalene, of the templateBlock
|
190
|
+
for the scalene case, and tSoli contains the identifier, SolScalenei, of the templateInline for the scalene
|
191
|
+
case-->
|
192
|
+
|
193
|
+
<setTemplateValue identifier="sType">
|
194
|
+
<baseValue baseType="string">scalene</baseValue>
|
195
|
+
</setTemplateValue>
|
196
|
+
<setTemplateValue identifier="tSol">
|
197
|
+
<baseValue baseType="identifier">SolScalene</baseValue>
|
198
|
+
</setTemplateValue>
|
199
|
+
<setTemplateValue identifier="tSoli">
|
200
|
+
<baseValue baseType="identifier">SolScalenei</baseValue>
|
201
|
+
</setTemplateValue>
|
202
|
+
</templateElse>
|
203
|
+
</templateCondition>
|
204
|
+
</templateProcessing>
|
205
|
+
<itemBody>
|
206
|
+
<p>In triangle ABC, side a=<printedVariable identifier="ia"/>, angle A=<printedVariable identifier="iA"/>° and angle
|
207
|
+
B=<printedVariable identifier="iB"/>°. Find the length of side b.</p>
|
208
|
+
<div class="">
|
209
|
+
<p>Enter your answer to 3 significant figures.</p>
|
210
|
+
<textEntryInteraction responseIdentifier="RESPONSE1" expectedLength="20"/>
|
211
|
+
</div>
|
212
|
+
<div class="">
|
213
|
+
<feedbackInline id="feedbackInline3" showHide="show" outcomeIdentifier="FEEDBACK"
|
214
|
+
identifier="Correct"> OK </feedbackInline></div>
|
215
|
+
<div class="">
|
216
|
+
<feedbackInline id="feedbackInline2" showHide="show" outcomeIdentifier="FEEDBACK"
|
217
|
+
identifier="Partial"> Not far off - check your rounding... </feedbackInline></div>
|
218
|
+
<div class="">
|
219
|
+
<feedbackInline id="feedbackInline1" showHide="show" outcomeIdentifier="FEEDBACK"
|
220
|
+
identifier="Incorrect"> Incorrect
|
221
|
+
</feedbackInline></div>
|
222
|
+
<div class="">
|
223
|
+
<feedbackBlock id="feedbackBlock11" identifier="THREETRIES" outcomeIdentifier="FEEDBACK"
|
224
|
+
showHide="show">
|
225
|
+
<p> You have had three attempts at answering this question, so here is the solution:
|
226
|
+
</p>
|
227
|
+
</feedbackBlock>
|
228
|
+
|
229
|
+
<!-- this feedbackBlock contains the solution,
|
230
|
+
which is different depending on the value of iA -->
|
231
|
+
|
232
|
+
<feedbackBlock identifier="SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
|
233
|
+
|
234
|
+
<!--Parts of this sentence appear differently, depending on whether or not iA is 90. The template variables sType,
|
235
|
+
tSol and tSoli were set during template processing in the templateCondition shown above-->
|
236
|
+
|
237
|
+
<p>This is a <printedVariable identifier="sType"/> triangle, so
|
238
|
+
<templateInline templateIdentifier="tSoli" identifier="SolRightAnglei" showHide="show">
|
239
|
+
<span> we can use sin(B) to find b directly</span></templateInline>
|
240
|
+
<templateInline templateIdentifier="tSoli" identifier="SolScalenei" showHide="show">
|
241
|
+
<span> we apply the Sine Rule</span></templateInline>:
|
242
|
+
</p>
|
243
|
+
|
244
|
+
<!--The templateBlock elements contain the MathML for the two different solutions: SolRightAngle for iA=90 and
|
245
|
+
SolScalene for other values of iA-->
|
246
|
+
|
247
|
+
<templateBlock templateIdentifier="tSol" identifier="SolRightAngle" showHide="show">
|
248
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
249
|
+
<semantics>
|
250
|
+
<mtable>
|
251
|
+
<mtr>
|
252
|
+
<mtd columnalign="right">
|
253
|
+
<mrow>
|
254
|
+
<mi>sin</mi>
|
255
|
+
<mfenced close=")" open="(">
|
256
|
+
<mi>B</mi>
|
257
|
+
</mfenced>
|
258
|
+
</mrow>
|
259
|
+
</mtd>
|
260
|
+
<mtd columnalign="center">
|
261
|
+
<mo>=</mo>
|
262
|
+
</mtd>
|
263
|
+
<mtd columnalign="left">
|
264
|
+
<mfrac>
|
265
|
+
<mi>b</mi>
|
266
|
+
<mi>a</mi>
|
267
|
+
</mfrac>
|
268
|
+
</mtd>
|
269
|
+
</mtr>
|
270
|
+
<mtr>
|
271
|
+
<mtd columnalign="right">
|
272
|
+
<mi>b</mi>
|
273
|
+
</mtd>
|
274
|
+
<mtd columnalign="center">
|
275
|
+
<mo>=</mo>
|
276
|
+
</mtd>
|
277
|
+
<mtd columnalign="left">
|
278
|
+
<mi>a</mi>
|
279
|
+
<mrow>
|
280
|
+
<mi>sin</mi>
|
281
|
+
<mfenced close=")" open="(">
|
282
|
+
<mi>B</mi>
|
283
|
+
</mfenced>
|
284
|
+
</mrow>
|
285
|
+
</mtd>
|
286
|
+
</mtr>
|
287
|
+
<mtr>
|
288
|
+
<mtd columnalign="right">
|
289
|
+
<mi>b</mi>
|
290
|
+
</mtd>
|
291
|
+
<mtd columnalign="center">
|
292
|
+
<mo>=</mo>
|
293
|
+
</mtd>
|
294
|
+
<mtd columnalign="left">
|
295
|
+
<mrow>
|
296
|
+
<mi>ia</mi>
|
297
|
+
<mo>×</mo>
|
298
|
+
<mi>sin</mi>
|
299
|
+
<mfenced close=")" open="(">
|
300
|
+
<mi>iB</mi>
|
301
|
+
</mfenced>
|
302
|
+
</mrow>
|
303
|
+
</mtd>
|
304
|
+
</mtr>
|
305
|
+
<mtr>
|
306
|
+
<mtd columnalign="right"/>
|
307
|
+
<mtd columnalign="center">
|
308
|
+
<mo>=</mo>
|
309
|
+
</mtd>
|
310
|
+
<mtd columnalign="left">
|
311
|
+
<mi>fAns</mi>
|
312
|
+
</mtd>
|
313
|
+
</mtr>
|
314
|
+
</mtable>
|
315
|
+
<annotation encoding="SnuggleTeX">\begin{eqnarray*}
|
316
|
+
\\sin(B)&=&\frac{b}{a}\\
|
317
|
+
b&=&a\sin(B)\\
|
318
|
+
&=&\qv{ia}\times\sin(\qv{iB})
|
319
|
+
&=&\qv{fAns} \end{eqnarray*}</annotation>
|
320
|
+
</semantics>
|
321
|
+
</math>
|
322
|
+
</templateBlock>
|
323
|
+
<templateBlock templateIdentifier="tSol" identifier="SolScalene" showHide="show">
|
324
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
325
|
+
<semantics>
|
326
|
+
<mtable>
|
327
|
+
<mtr>
|
328
|
+
<mtd columnalign="right">
|
329
|
+
<mfrac>
|
330
|
+
<mi>a</mi>
|
331
|
+
<mrow>
|
332
|
+
<mi>sin</mi>
|
333
|
+
<mfenced close=")" open="(">
|
334
|
+
<mi>A</mi>
|
335
|
+
</mfenced>
|
336
|
+
</mrow>
|
337
|
+
</mfrac>
|
338
|
+
</mtd>
|
339
|
+
<mtd columnalign="center">
|
340
|
+
<mo>=</mo>
|
341
|
+
</mtd>
|
342
|
+
<mtd columnalign="left">
|
343
|
+
<mfrac>
|
344
|
+
<mi>b</mi>
|
345
|
+
<mrow>
|
346
|
+
<mi>sin</mi>
|
347
|
+
<mfenced close=")" open="(">
|
348
|
+
<mi>B</mi>
|
349
|
+
</mfenced>
|
350
|
+
</mrow>
|
351
|
+
</mfrac>
|
352
|
+
</mtd>
|
353
|
+
</mtr>
|
354
|
+
<mtr>
|
355
|
+
<mtd columnalign="right">
|
356
|
+
<mfrac>
|
357
|
+
<mi>ia</mi>
|
358
|
+
<mrow>
|
359
|
+
<mi>sin</mi>
|
360
|
+
<mfenced close=")" open="(">
|
361
|
+
<mi>iA</mi>
|
362
|
+
</mfenced>
|
363
|
+
</mrow>
|
364
|
+
</mfrac>
|
365
|
+
</mtd>
|
366
|
+
<mtd columnalign="center">
|
367
|
+
<mo>=</mo>
|
368
|
+
</mtd>
|
369
|
+
<mtd columnalign="left">
|
370
|
+
<mfrac>
|
371
|
+
<mi>b</mi>
|
372
|
+
<mrow>
|
373
|
+
<mi>sin</mi>
|
374
|
+
<mfenced close=")" open="(">
|
375
|
+
<mi>iB</mi>
|
376
|
+
</mfenced>
|
377
|
+
</mrow>
|
378
|
+
</mfrac>
|
379
|
+
</mtd>
|
380
|
+
</mtr>
|
381
|
+
<mtr>
|
382
|
+
<mtd columnalign="right">
|
383
|
+
<mi>b</mi>
|
384
|
+
</mtd>
|
385
|
+
<mtd columnalign="center">
|
386
|
+
<mo>=</mo>
|
387
|
+
</mtd>
|
388
|
+
<mtd columnalign="left">
|
389
|
+
<mfrac>
|
390
|
+
<mrow>
|
391
|
+
<mi>ia</mi>
|
392
|
+
<mo>×</mo>
|
393
|
+
<mi>sin</mi>
|
394
|
+
<mfenced close=")" open="(">
|
395
|
+
<mi>iB</mi>
|
396
|
+
</mfenced>
|
397
|
+
</mrow>
|
398
|
+
<mrow>
|
399
|
+
<mi>sin</mi>
|
400
|
+
<mfenced close=")" open="(">
|
401
|
+
<mi>iA</mi>
|
402
|
+
</mfenced>
|
403
|
+
</mrow>
|
404
|
+
</mfrac>
|
405
|
+
</mtd>
|
406
|
+
</mtr>
|
407
|
+
<mtr>
|
408
|
+
<mtd columnalign="right"/>
|
409
|
+
<mtd columnalign="center">
|
410
|
+
<mo>=</mo>
|
411
|
+
</mtd>
|
412
|
+
<mtd columnalign="left">
|
413
|
+
<mfrac>
|
414
|
+
<mrow>
|
415
|
+
<mi>ia</mi>
|
416
|
+
<mo>×</mo>
|
417
|
+
<mi>sinB</mi>
|
418
|
+
</mrow>
|
419
|
+
<mrow>
|
420
|
+
<mi>sinA</mi>
|
421
|
+
</mrow>
|
422
|
+
</mfrac>
|
423
|
+
</mtd>
|
424
|
+
</mtr>
|
425
|
+
<mtr>
|
426
|
+
<mtd columnalign="right"/>
|
427
|
+
<mtd columnalign="center">
|
428
|
+
<mo>=</mo>
|
429
|
+
</mtd>
|
430
|
+
<mtd columnalign="left">
|
431
|
+
<mi>fAns</mi>
|
432
|
+
</mtd>
|
433
|
+
</mtr>
|
434
|
+
</mtable>
|
435
|
+
<annotation encoding="SnuggleTeX">\begin{eqnarray*}
|
436
|
+
\frac{a}{\sin(A)}&=&\frac{b}{\sin(B)}\\
|
437
|
+
\frac{\qv{ia}}{\sin(\qv{iA})}&=&\frac{b}{\sin(\qv{iB})}
|
438
|
+
b&=&\frac{A\times\sin(B)}{\sin(A)}\\
|
439
|
+
&=&\frac{\qv{ia}\times\sin(\qv{iB})}{\sin(\qv{iA})}\\
|
440
|
+
&=&\qv{fAns} \end{eqnarray*}</annotation>
|
441
|
+
</semantics>
|
442
|
+
</math>
|
443
|
+
</templateBlock>
|
444
|
+
|
445
|
+
<!--This sentence is the same for all values of iA-->
|
446
|
+
|
447
|
+
<p>So the expected answer is <printedVariable identifier="fAns"/>.</p>
|
448
|
+
</feedbackBlock></div>
|
449
|
+
|
450
|
+
<!-- Explain why the score is zero (after viewing solution) -->
|
451
|
+
|
452
|
+
<feedbackBlock identifier="SEEN-SOLUTION" outcomeIdentifier="FEEDBACK" showHide="show">
|
453
|
+
<p> Since you have viewed the solution, your score for this question will be 0. </p>
|
454
|
+
</feedbackBlock>
|
455
|
+
|
456
|
+
<!-- show the solution button -->
|
457
|
+
|
458
|
+
<feedbackBlock identifier="asksolution" outcomeIdentifier="ASKSOLUTION" showHide="show">
|
459
|
+
<div>
|
460
|
+
<endAttemptInteraction id="endAttemptInteraction2" responseIdentifier="SOLREQUEST"
|
461
|
+
title="Show Solution"/>
|
462
|
+
</div>
|
463
|
+
</feedbackBlock>
|
464
|
+
</itemBody>
|
465
|
+
<responseProcessing>
|
466
|
+
<setOutcomeValue identifier="FEEDBACK">
|
467
|
+
<multiple>
|
468
|
+
<variable identifier="EMPTY"/>
|
469
|
+
</multiple>
|
470
|
+
</setOutcomeValue>
|
471
|
+
<responseCondition>
|
472
|
+
<responseIf>
|
473
|
+
<variable identifier="SOLREQUEST"/>
|
474
|
+
<setOutcomeValue identifier="FEEDBACK">
|
475
|
+
<multiple>
|
476
|
+
<baseValue baseType="identifier">SOLUTION</baseValue>
|
477
|
+
</multiple>
|
478
|
+
</setOutcomeValue>
|
479
|
+
<setOutcomeValue identifier="seenSolution">
|
480
|
+
<baseValue baseType="boolean">true</baseValue>
|
481
|
+
</setOutcomeValue>
|
482
|
+
<setOutcomeValue identifier="completionStatus">
|
483
|
+
<baseValue baseType="identifier">completed</baseValue>
|
484
|
+
</setOutcomeValue>
|
485
|
+
<setOutcomeValue identifier="ASKSOLUTION">
|
486
|
+
<baseValue baseType="identifier">null</baseValue>
|
487
|
+
</setOutcomeValue>
|
488
|
+
</responseIf>
|
489
|
+
<responseElse>
|
490
|
+
<responseCondition>
|
491
|
+
<responseIf>
|
492
|
+
<isNull>
|
493
|
+
<variable identifier="RESPONSE1"/>
|
494
|
+
</isNull>
|
495
|
+
<setOutcomeValue identifier="SCORE">
|
496
|
+
<baseValue baseType="float">0</baseValue>
|
497
|
+
</setOutcomeValue>
|
498
|
+
</responseIf>
|
499
|
+
<responseElse>
|
500
|
+
<responseCondition>
|
501
|
+
<responseIf>
|
502
|
+
<equalRounded roundingMode="significantFigures" figures="3">
|
503
|
+
<variable identifier="fAns"/>
|
504
|
+
<variable identifier="RESPONSE1"/>
|
505
|
+
</equalRounded>
|
506
|
+
<setOutcomeValue identifier="FEEDBACK">
|
507
|
+
<multiple>
|
508
|
+
<baseValue baseType="identifier">Correct</baseValue>
|
509
|
+
</multiple>
|
510
|
+
</setOutcomeValue>
|
511
|
+
<setOutcomeValue identifier="SCORE">
|
512
|
+
<baseValue baseType="float">10.0</baseValue>
|
513
|
+
</setOutcomeValue>
|
514
|
+
</responseIf>
|
515
|
+
<responseElseIf>
|
516
|
+
<equalRounded roundingMode="significantFigures" figures="2">
|
517
|
+
<variable identifier="RESPONSE1"/>
|
518
|
+
<variable identifier="fAns"/>
|
519
|
+
</equalRounded>
|
520
|
+
<setOutcomeValue identifier="FEEDBACK">
|
521
|
+
<multiple>
|
522
|
+
<baseValue baseType="identifier">Partial</baseValue>
|
523
|
+
</multiple>
|
524
|
+
</setOutcomeValue>
|
525
|
+
<setOutcomeValue identifier="SCORE">
|
526
|
+
<baseValue baseType="float">5.0</baseValue>
|
527
|
+
</setOutcomeValue>
|
528
|
+
</responseElseIf>
|
529
|
+
<responseElse>
|
530
|
+
<setOutcomeValue identifier="FEEDBACK">
|
531
|
+
<multiple>
|
532
|
+
<baseValue baseType="identifier">Incorrect</baseValue>
|
533
|
+
</multiple>
|
534
|
+
</setOutcomeValue>
|
535
|
+
<setOutcomeValue identifier="SCORE">
|
536
|
+
<baseValue baseType="float">0.0</baseValue>
|
537
|
+
</setOutcomeValue>
|
538
|
+
</responseElse>
|
539
|
+
</responseCondition>
|
540
|
+
<responseCondition>
|
541
|
+
<responseIf>
|
542
|
+
<gt>
|
543
|
+
<variable identifier="numAttempts"/>
|
544
|
+
<baseValue baseType="integer">3</baseValue>
|
545
|
+
</gt>
|
546
|
+
<setOutcomeValue identifier="FEEDBACK">
|
547
|
+
<multiple>
|
548
|
+
<baseValue baseType="identifier"> THREETRIES </baseValue>
|
549
|
+
<baseValue baseType="identifier"> SOLUTION </baseValue>
|
550
|
+
</multiple>
|
551
|
+
</setOutcomeValue>
|
552
|
+
|
553
|
+
<!-- completionStatus must be specifically set to completed in adaptive questions -->
|
554
|
+
|
555
|
+
<setOutcomeValue identifier="completionStatus">
|
556
|
+
<baseValue baseType="identifier">completed</baseValue>
|
557
|
+
</setOutcomeValue>
|
558
|
+
<setOutcomeValue identifier="ASKSOLUTION">
|
559
|
+
<baseValue baseType="identifier">null</baseValue>
|
560
|
+
</setOutcomeValue>
|
561
|
+
</responseIf>
|
562
|
+
</responseCondition>
|
563
|
+
<responseCondition>
|
564
|
+
<responseIf>
|
565
|
+
<variable identifier="seenSolution"/>
|
566
|
+
<setOutcomeValue identifier="FEEDBACK">
|
567
|
+
<multiple>
|
568
|
+
<variable identifier="FEEDBACK"/>
|
569
|
+
<baseValue baseType="identifier">SEEN-SOLUTION</baseValue>
|
570
|
+
</multiple>
|
571
|
+
</setOutcomeValue>
|
572
|
+
<setOutcomeValue identifier="SCORE">
|
573
|
+
<baseValue baseType="float">0.0</baseValue>
|
574
|
+
</setOutcomeValue>
|
575
|
+
</responseIf>
|
576
|
+
</responseCondition>
|
577
|
+
</responseElse>
|
578
|
+
</responseCondition>
|
579
|
+
</responseElse>
|
580
|
+
</responseCondition>
|
581
|
+
</responseProcessing>
|
582
|
+
</assessmentItem>
|