Test example: Calculated Test Variable as a Solution to a Question
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) 
(2) 
Test example "Calculated Test Variables as a Solution to a Question"
| 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. |
| 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. In the Options tab, set the test to linear processing. Linear processing ensures that the participant works through the questions step by step. It is only with this setting that values can be passed from one question to the next. 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. |
|
2 | Create two text entry interactions titled A1 and A2. Create two text entry interactions titled A1 and A2. |
|
3 | Specify the gap type for the first question, e.g. "Numerical". Specify the gap type for the first question, e. g. "Numeric (floating point)". |
|
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:
|
|
5 | To display the pre-question variables and thus the participant's response from the first question (A1) later in the question text of question A2, you need to insert them in the question text. 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. |
|
| 6 | Adjust the type of gap and the solution for this task, as well as any other settings (points, size, etc.). In the example described, the gap type was set to ‘Calculated’ and the variable a2_a was selected as the solution. | ![]() |
7 | Now create the post-test variable (LR1). Make sure you select the correct variable type here, too. In the example given, the type "Floating point" is used. Set the value of the variable to the learner response value (LEARNERRESPONSE_GAP_1) for question A1. Link this post-test variable to the question variable (Item_LR1). |
|
8 | Save the test and start the preview. Fill in the blanks of the first question with numbers. Then move on to the second question. The values entered for the first question will be displayed in the question text and used to calculate the solution. |
|









