Wiki source code of Beispiel - Digging a hole

Last modified by Hendrik Zschocke on 12.01.2024

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 The following sample task shows the use of variables to generate random values in a calculation interaction. The participant should calculate the answer depending on given values, which are redefined for each attempt.
5
6 This example is based on the example content "Digging a hole" published by IMS for the use of [[IMS QTI item templates>>url:http://www.imsglobal.org/question/qtiv2p2/imsqti_v2p2_impl.html#3.7||shape="rect"]].
7
8
9 [[image:attach:Testrun - Beispiel Zufallswerte_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
10
11 {{/layout-cell}}
12
13 {{layout-cell}}
14 {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Content"}}
15 {{toc/}}
16 {{/panel}}
17
18 {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Related topics"}}
19 * [[Variables>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome]]
20 * [[Calculation interaction>>doc:ONYX.Erstellung von Testinhalten.Aufgabentypen.Berechnungsaufgabe.WebHome]]
21 * [[Formula comparison>>doc:ONYX.Erstellung von Testinhalten.Aufgabentypen.Formelvergleich.WebHome]]
22 {{/panel}}
23
24 {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Further information"}}
25 * [[MAXIMA manual>>url:http://maxima.sourceforge.net/docs/manual/de/maxima.html||shape="rect"]]
26 * [[MAXIMA good practice examples>>url:https://bildungsportal.sachsen.de/opal/auth/RepositoryEntry/5499682817/CourseNode/93229879750473/wiki/Index||shape="rect"]]
27 * [[MAXIMA system information>>url:http://maxima.sourceforge.net/||rel="nofollow" shape="rect" class="external-link"]]
28 {{/panel}}
29 {{/layout-cell}}
30 {{/layout-section}}
31
32 {{layout-section ac:type="single"}}
33 {{layout-cell}}
34 == Example "Digging a hole" ==
35
36 |(((
37 (% class="content-wrapper" %)
38 (((
39 [[image:attach:Editor - Aufgabentext_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
40 )))
41 )))|(((
42 Create a **[[calculation interaction>>doc:ONYX.Erstellung von Testinhalten.Aufgabentypen.Berechnungsaufgabe.WebHome]] **and replace by variables all the values in the task text that should later be initialised with random values. Variables can be added by specifying the variable name in braces. The following variables are used in the example:
43
44 * The text variable {PEOPLE} should be randomly assigned the value "men", "woman" or "children".
45 * The numerical variables {A}/{B} indicate the number of people.
46 * The numerical variable {MIN} stands for the given time.
47
48 The answer is to be calculated from the given values and will also be represented as a variable later:
49
50 * The numerical variable {ANSWER} refers to the time to be calculated.
51 )))
52 |(((
53 (% class="content-wrapper" %)
54 (((
55 [[image:attach:Editor - Variable People bearbeiten_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
56 )))
57 )))|(((
58 All required variables can be managed in the tab **//Variables//**. In the following, the variable creation process will be explained using the text variable example {PEOPLE}:
59
60 * In the section **//Pre-processed variables//**, create a new variable via the button** //Add new variable//**.
61 * Enter the variable name **PEOPLE**. Please pay attention to the correct spelling of the variable name. Upper- and lower-case letters must be the same as for the placeholder.
62 * Since this is a text variable, select the entry **//Text//** as variable type.
63 * The value is set from a **random selection** of given terms.
64 * Enter the terms "**men**", "**woman**" and "**children**". Separate multiple values by a line break or semicolon.
65 )))
66 |(((
67 (% class="content-wrapper" %)
68 (((
69 [[image:attach:Editor - Variablenübersicht_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
70 )))
71 )))|(((
72 All other variables will also be created:
73
74 * Variable: {PEOPLE}, type: text, random selection: men; woman; children
75 * Variable: {A}, type: integer, value range: min=2, max=4, step=1
76 * Variable: {MIN}, type: floating-point, calculation (MAXIMA): 120/{A}   
77
78 The variable {B} should be set depending on the variable {A} to simplify the calculation. Therefore, the variable {B} is initially empty and then set to the appropriate value using a condition.
79
80 * Variable: {B}, type: integer, condition: IF A = 2 THEN B = value range: min=4, max=12, step=2 ELSE IF A = 3 THEN B = random selection: 6; 12 ELSE IF A = 4 THEN B = random selection: 8; 12 
81 * Variable: {ANSWER}, type: integer, calculation (MAXIMA): 120/{B}
82 )))
83 |(((
84 (% class="content-wrapper" %)
85 (((
86 [[image:attach:Editor - Aufgabentext_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
87 )))
88 )))|(((
89 To insert the variable into the task text, you need to type the variable name {PEOPLE}. In the example, the variable is included in a task of the type [[calculation interaction>>doc:ONYX.Erstellung von Testinhalten.Aufgabentypen.Berechnungsaufgabe.WebHome]].
90 )))
91 |(% colspan="1" %)(% colspan="1" %)
92 (((
93 (% class="content-wrapper" %)
94 (((
95 [[image:attach:Testrun - Beispielaufgabe mit Zufallswerten_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
96 )))
97 )))|(% colspan="1" %)(% colspan="1" %)
98 (((
99 One of the defined values will be randomly chosen for each participant and each test attempt. In the example, the value "**women**" was inserted.
100 )))
101 {{/layout-cell}}
102 {{/layout-section}}
103 {{/layout}}