Wiki source code of Beispiel Variable Lösung

Last modified by Anna Paul-Hasenfuss on 15.09.2025

Hide last authors
Carina Enke 13.2 1 {{section}}
2 {{column width="60%"}}
Carina Enke 18.1 3 In addition to questions and answers, you can also define the correct solution dynamically for each test run. As a result, a wide variety of question templates are possible, which generate different, equivalent questions through the use of random values and provide the appropriate solution in each case.
Carina Enke 1.1 4
Hendrik Zschocke 10.1 5 [[image:attach:Player - Beispielaufgabe Möglichkeiten zur variablenabhängigen Änderung der korrekten Lösung.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 16.2 6
Carina Enke 18.1 7 This variable-dependent adjustment of the correct solution is available for choice, matching, and hotspot interactions. To access this feature, you need to enable the ID display in your user settings.
Carina Enke 13.2 8 {{/column}}
Carina Enke 1.1 9
Carina Enke 13.2 10 {{column width="30%"}}
Carina Enke 18.1 11 {{panel title="Content"}}
Carina Enke 13.2 12 {{toc start="2"/}}
13 {{/panel}}
Carina Enke 1.1 14
Carina Enke 18.1 15 {{panel title="Related topics"}}
16 * [[User Profile and Settings>>doc:ONYX.Anmeldung.Benutzerprofil.WebHome]]
Carina Enke 1.1 17 {{/panel}}
Carina Enke 13.2 18 {{/column}}
19 {{/section}}
Carina Enke 1.1 20
Carina Enke 13.2 21
Carina Enke 18.1 22 == Explanation of the example’s function ==
Carina Enke 1.1 23
Carina Enke 18.1 24 === **Configuration in the “Variables processed before display” area: ** ===
Carina Enke 1.1 25
Carina Enke 18.1 26 You will need the following variables and conditions to implement this:
Carina Enke 1.1 27
Carina Enke 18.1 28 * A text variable used in the question that contains the random values for the question.
29 * A text variable able to hold the correct solution. This variable is initialized with an empty value.
30 * A condition in which the values of the question are linked to the corresponding IDs of the answers.
Carina Enke 14.2 31
Hendrik Zschocke 10.1 32 [[image:attach:Beispiel - Variable korrekte Lösung Pre Variablen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 13.4 33
Carina Enke 14.2 34
35
Carina Enke 18.1 36 === **Configuration in the questions area:** ===
Carina Enke 1.1 37
Carina Enke 18.1 38 You need to include the text variable to display the random values in the question.
Carina Enke 17.1 39
Hendrik Zschocke 10.1 40 [[image:attach:Beispiel - Variable korrekte Lösung Aufgabenstellung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 1.1 41
Carina Enke 18.1 42 By changing the solution variable in the **ID of the correct answer** section, the previous setting of the correct solution to the task is replaced by the answers specified in the condition.
Carina Enke 1.1 43
Hendrik Zschocke 10.1 44 [[image:attach:Beispiel - Variable korrekte Lösung ID_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 1.1 45
Carina Enke 13.4 46
47
Carina Enke 18.1 48 == Using the pre-configured question example ==
Carina Enke 1.1 49
Carina Enke 18.1 50 |(% style="width:770px" %)Import the question example: [[Sächsische_Städte.zip>>attach:Sächsische_Städte.zip]]. For instructions on how to import a question, see the help page [[Create or Import Content>>doc:ONYX.Erstellung von Testinhalten.Inhalte erstellen oder importieren.WebHome]].|(% style="width:749px" %)[[image:attach:Editor - Import Beispiel Städte_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 16.1 51 |(% style="width:770px" %)(((
Carina Enke 18.1 52 Change the question title and adjust the text accordingly. If you change the title of the variable “city,” you also have to make this change in the Variables tab.
Carina Enke 1.1 53
Carina Enke 18.1 54
55 )))|(% style="width:749px" %)[[image:attach:Editor - Änderung Aufgabenstellung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
56 |(% style="width:770px" %)(((
57 Adjust the background image and the corresponding hotspot areas to suit your question. You can delete existing hotspots and add new ones.
58
59 For newly added hotspots, an ID is automatically assigned to these new answer options. You can customize the default name of the ID. Keep in mind that the ID must start with a letter.
60
61 )))|(% style="width:749px" %)[[image:attach:Editor - ID individualisieren_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
62 |(% style="width:770px" %)(((
63 Check the condition in the Variables tab and adjust it to match your question and solutions.
64
65
66 )))|(% style="width:749px" %)[[image:attach:Editor - Änderung Bedingung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
67 |(% style="width:770px" %)The Feedback tab contains reference texts relevant to the city question. Make sure to adapt these to your question as well.|(% style="width:749px" %)[[image:attach:Editor - Anpassung Feedbacktexte_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
68 |(% style="width:770px" %)(((
69 Save your question and use the preview to check if it is correct.
Carina Enke 16.1 70 )))|(% style="width:749px" %)[[image:attach:Player - Vorschau zur Aufgabe_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
Carina Enke 1.1 71
72
73
74
75
76
77
78
Carina Enke 16.2 79