Last modified by Carina Enke on 15.11.2025

Show last authors
1 As an example, a typical application task is created. The goal is to calculate the distance travelled by a vehicle based on speed and time. The speed is dependent on the vehicle type.
2
3 |(% colspan="1" style="width:352px" %)(% colspan="1" %)
4 (((
5 (% class="content-wrapper" %)
6 (((
7 [[image:attach:Editor - Tab Variablen zur Beispielaufgabe_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
8 )))
9 )))|(% colspan="1" style="width:749px" %)(% colspan="1" %)
10 (((
11 In the example, the [[text variable>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.Text Variables.WebHome||shape="rect"]] {transport} will be randomly initialised with one of the following values: "bike", "bus", or "train". The [[numerical variable>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.Numerische Variablen.WebHome]] {speed} is randomly selected from a value range. Thus, the value range for the speed {speed} should be set in dependence of the selected vehicle {transport}, since a "bike" is generally slower than a "train".
12 )))
13 |(% style="width:352px" %)(((
14 (% class="content-wrapper" %)
15 (((
16 [[image:attach:Editor - Beispiel einer Bedingung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" height="501" width="377"]][[image:attach:Editor - weiteres Beispiel einer Bedingung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" height="502" width="359"]]
17 )))
18 )))|(% style="width:749px" %)(((
19 For the dependent value setting, we use the variable condition. In the condition, we can define the value range for the variable {speed} depending on the selected value of the variable {transport}. For the bike ({transport}="bike"), for example, a value range of 10 to 30 (km/h) was set.
20 )))
21 |(% style="width:352px" %)(((
22 (% class="content-wrapper" %)
23 (((
24 [[image:attach:Editor - Nutzung von Variablen in der Aufgabenstellung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
25 )))
26 )))|(% style="width:749px" %)(((
27 The given values of the task are integrated into the task text by specifying the variable name ({transport}, {speed}, and {hours}). In the example, the variable is included in a task of the type [[calculation interaction>>doc:ONYX.Erstellung von Testinhalten.Aufgabentypen.Berechnungsaufgabe.WebHome]].
28
29 The variable with the correct solution {distance} is bound to the gap.
30 )))
31 |(% style="width:352px" %)(((
32 (% class="content-wrapper" %)
33 (((
34 [[image:attach:Testrun - Beispielaufgabe im Testrun_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
35 )))
36 )))|(% style="width:749px" %)(((
37 One of the defined values will be randomly chosen for each participant and each test attempt. In the example, the value "bike" was randomly inserted, which is why a speed in the value range of 10 to 30 (km/h) was selected.
38 )))