Wiki source code of Berechnete Testvariable als Lösung einer Aufgabe
Last modified by Anna Paul-Hasenfuss on 20.04.2026
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{section}} | ||
| 2 | {{column width="60%"}} | ||
| 3 | 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. | ||
| 4 | |||
| 5 | 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). | ||
| 6 | |||
| 7 | (1) [[image:attach:Nutzereingabe in nachfolgender Aufgabe_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 8 | |||
| 9 | (2) [[image:attach:Nutzereingabe zur Berechung einer Lösung einer nachfolgenden Aufgabe_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 10 | {{/column}} | ||
| 11 | |||
| 12 | {{column width="30%"}} | ||
| 13 | {{panel title="Inhalt"}} | ||
| 14 | {{toc start="2"/}} | ||
| 15 | {{/panel}} | ||
| 16 | |||
| 17 | {{panel title="Using question variables"}} | ||
| 18 | * [[Definition of a variable>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome||shape="rect"]] | ||
| 19 | * [[Use of variables>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome||shape="rect"]] | ||
| 20 | * [[Definition of a condition>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome||shape="rect"]] | ||
| 21 | * [[Expert mode (IMS QTI)>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome||shape="rect"]] | ||
| 22 | * [[View variable assignment>>doc:ONYX.Erstellung von Testinhalten.Aufgaben.Variablen verwenden.WebHome||shape="rect"]] | ||
| 23 | {{/panel}} | ||
| 24 | {{/column}} | ||
| 25 | {{/section}} | ||
| 26 | |||
| 27 | == Test example "Calculated Test Variables as a Solution to a Question" == | ||
| 28 | |||
| 29 | |((( | ||
| 30 | ((( | ||
| 31 | [[image:attach:Testvariablen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 32 | ))) | ||
| 33 | )))|((( | ||
| 34 | **Test variables:** | ||
| 35 | |||
| 36 | 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. | ||
| 37 | |||
| 38 | 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}. | ||
| 39 | |||
| 40 | In the test variable {sum}, both user inputs will be used for a calculation, which will then be transmitted to question A2. | ||
| 41 | ))) | ||
| 42 | |((( | ||
| 43 | ((( | ||
| 44 | [[image:attach:Editor - Aufgabenvariablen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 45 | ))) | ||
| 46 | )))|((( | ||
| 47 | **Question variables:** | ||
| 48 | |||
| 49 | 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. | ||
| 50 | ))) | ||
| 51 | |||
| 52 | == Creating this example step by step == | ||
| 53 | |||
| 54 | Use the following steps to create the example yourself: | ||
| 55 | |||
| 56 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 57 | ((( | ||
| 58 | 1 | ||
| 59 | )))|(% style="width:965px" %)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.((( | ||
| 60 | (% class="auto-cursor-target" %) | ||
| 61 | 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. | ||
| 62 | )))|(% style="width:316px" %)((( | ||
| 63 | (% class="content-wrapper" %) | ||
| 64 | ((( | ||
| 65 | [[image:attach:Test - Lineare Navigation_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 66 | ))) | ||
| 67 | ))) | ||
| 68 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 69 | ((( | ||
| 70 | 2 | ||
| 71 | )))|(% colspan="1" style="width:965px" %)Create two text entry interactions titled A1 and A2.(% colspan="1" %) | ||
| 72 | ((( | ||
| 73 | (% class="auto-cursor-target" %) | ||
| 74 | Create two text entry interactions titled A1 and A2. | ||
| 75 | )))|(% colspan="1" style="width:316px" %)(% colspan="1" %) | ||
| 76 | ((( | ||
| 77 | (% class="content-wrapper" %) | ||
| 78 | ((( | ||
| 79 | [[image:attach:Test - Lückentextaufgaben_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 80 | ))) | ||
| 81 | ))) | ||
| 82 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 83 | ((( | ||
| 84 | 3 | ||
| 85 | )))|(% colspan="1" style="width:965px" %)Specify the gap type for the first question, e.g. "Numerical".(% colspan="1" %) | ||
| 86 | ((( | ||
| 87 | (% class="auto-cursor-target" %) | ||
| 88 | Specify the gap type for the first question, e. g. "Numeric (floating point)". | ||
| 89 | )))|(% colspan="1" style="width:316px" %)(% colspan="1" %) | ||
| 90 | ((( | ||
| 91 | (% class="content-wrapper" %) | ||
| 92 | ((( | ||
| 93 | [[image:attach:Aufgabe - Art der Lücke_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 94 | ))) | ||
| 95 | ))) | ||
| 96 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 97 | ((( | ||
| 98 | 4 | ||
| 99 | )))|(% colspan="1" style="width:965px" %)(% colspan="1" %) | ||
| 100 | ((( | ||
| 101 | 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. | ||
| 102 | |||
| 103 | Please consider the following for your own examples: The variable type must match the gap type selected for question A1: | ||
| 104 | |||
| 105 | * For text entry interactions and formula comparisons, the participant enters text, which is why “Text” must be selected as the variable type. | ||
| 106 | * 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. | ||
| 107 | )))|(% colspan="1" style="width:316px" %)(% colspan="1" %) | ||
| 108 | ((( | ||
| 109 | (% class="content-wrapper" %) | ||
| 110 | ((( | ||
| 111 | [[image:attach:Aufgabe - Variable anlegen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 112 | ))) | ||
| 113 | ))) | ||
| 114 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 115 | ((( | ||
| 116 | 5 | ||
| 117 | )))|(% style="width:965px" %)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.((( | ||
| 118 | (% class="auto-cursor-target" %) | ||
| 119 | 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. | ||
| 120 | )))|(% style="width:316px" %)((( | ||
| 121 | (% class="content-wrapper" %) | ||
| 122 | ((( | ||
| 123 | [[image:attach:Aufgabe - Anzeige der Variable im Aufgabentext_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 124 | ))) | ||
| 125 | ))) | ||
| 126 | |(% class="numberingColumn" style="width:122px" %)6|(% style="width:965px" %)((( | ||
| 127 | Adjust the type of gap and the solution for this task, as well as any other settings (points, size, etc.). | ||
| 128 | |||
| 129 | In the example described, the gap type was set to ‘Calculated’ and the variable a2_a was selected as the solution. | ||
| 130 | )))|(% style="width:316px" %)[[image:Aufgabe - Lücke anpassen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 131 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 132 | ((( | ||
| 133 | 7 | ||
| 134 | )))|(% style="width:965px" %)((( | ||
| 135 | 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. | ||
| 136 | |||
| 137 | Set the value of the variable to the learner response value (LEARNERRESPONSE_GAP_1) for question A1. | ||
| 138 | |||
| 139 | Link this post-test variable to the question variable (Item_LR1). | ||
| 140 | )))|(% style="width:316px" %)((( | ||
| 141 | (% class="content-wrapper" %) | ||
| 142 | ((( | ||
| 143 | [[image:attach:Test - Post Testvariablen anlegen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 144 | ))) | ||
| 145 | ))) | ||
| 146 | |(% class="numberingColumn" style="width:122px" %)(% class="numberingColumn" %) | ||
| 147 | ((( | ||
| 148 | 8 | ||
| 149 | )))|(% style="width:965px" %)((( | ||
| 150 | (% class="content-wrapper" %) | ||
| 151 | ((( | ||
| 152 | 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. | ||
| 153 | |||
| 154 | {{info}} | ||
| 155 | 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. | ||
| 156 | {{/info}} | ||
| 157 | ))) | ||
| 158 | )))|(% style="width:316px" %)((( | ||
| 159 | (% class="content-wrapper" %) | ||
| 160 | ((( | ||
| 161 | [[image:attach:Beispielrechnung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]] | ||
| 162 | ))) | ||
| 163 | ))) |