Example Test: Calculated Test Variable as a Solution to a Question

Last modified by Carina Enke on 14.01.2024

Post-test variables allow, among other things, the targeted use of learner responses from individual questions to calculate global variables. These can for example be used as solutions in subsequent questions. 

In the following example, the learner responses submitted for the question A1 will be used in the question text of the subsequent question A2 (1) as well as for the calculation of another test variable that will be used as the solution to the question A2 (2).

(1)

Nutzereingabe in nachfolgender Aufgabe_de.png

(2)

Nutzereingabe zur Berechung einer Lösung einer nachfolgenden Aufgabe_de.png

 

Example test "Calculated Test Variables as a Solution to a Question"

Testvariablen_de.png

Test variables:

In the example, “post-processed” (post-) variables will be created at test level and set to the value of the learner response for the first question.

For example, the test variable {a} will be set to the value of the learner response, i. e. the input of the participant, for the first gap of the question A1. The same will be done in this example with the test variable {b}.

In the test variable {sum}, both user inputs will be used for a calculation, which will then be transmitted to question A2.

Editor - Aufgabenvariablen_de.png

Question variables:

In question A2, the required variables have to be created without setting any values so that they can be filled with the user values when the test is performed.

 

Creating this example step by step

Use the following steps to create the example yourself:

1

Create a test. Enable linear processing for the test in the options tab. Linear processing ensures that participants process the questions one after the other. Only if this setting has been configured, it will be possible to pass on values from one question to the next.

Test - Lineare Navigation_de.png

2

Create two text entry interactions titled A1 and A2.

Test - Lückentextaufgaben_de.png

3

Specify the gap type for the first question, e. g. "Numeric (floating point)".

Aufgabe - Art der Lücke_de.png

4

Then create the three required pre-question variables (a2_a, a2_b, a2_sum) with an empty value for the second question. These question variables will be necessary to adopt the learner response from A1 and to compare the calculated solution. The assignment will be done in step 6.

Please consider the following for your own examples: The variable type must match the gap type selected for question A1:

  • For text entry interactions and formula comparisons, the participant enters text, which is why “Text” must be selected as the variable type.
  • For the question types numerical input and calculation interaction, the participant enters a number as a learner response, which is why “Floating point” must be selected as the variable type.

Aufgabe - Variable anlegen_de.png

5

To display the pre-question variables and thus the participant responses from the first question (A1) later in the question text of question A2, you need to insert them in the question text.

Aufgabe - Anzeige der Variable im Aufgabentext_de.png

6

Now create the post-test variable (LR1). Do not forget to pay attention to choosing the correct variable type here as well. In the example, the type "Floating point" is used. 

Set the value of the variable to the variable value of the learner solution (LEARNERRESPONSE_GAP_1) for question A1.

Assign this post-test variable to the question variable (Item_LR1).

Test - Post Testvariablen anlegen_de.png

7

Save the test and start the preview. Fill in the blanks of the first question with numbers. Then switch to the second question. The values entered for the first question will be displayed in the question text and used for calculating the solution.

Information

This example does not yet take into account the possibility of not entering an answer for the first question. How to consider this case by creating conditions is shown in the ice cream sale example above.

Beispielrechnung_de.png