Page tree
Skip to end of metadata
Go to start of metadata

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.


Example tasks with variables in the editor

In the example, the text variable {transport} will be randomly initialised with one of the following values: "bike", "bus", or "train". The numerical variable {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".

Example condition in the editor Example of another condition in the editor

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.

Using variables within the task text

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.

The variable with the correct solution {distance} is bound to the gap.

Example task

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.

  • No labels