Controlling based on the Output Variables of a Test (ONYX)

Last modified by Carina Enke on 15.01.2024

If global test variables are used in a course element test, they can also be used to control visibility and access. To do this, use the expert rule getOnyxTestOutcome or getOnyxTestOutcomeZK . All test variables available for the selected course element are displayed in tab KB Test - Variablen by means of the entry output variables of this resource. In addition to visibility and access rules (expert syntax), they can also be used as placeholders in Certificate templates.

In addition, controlling is also possible by transferring assessment data to an ONYX test. For more information, see the section KB Test - Variablen on the course element test.

All of the following example rules can be created for both the visibility and access of a course element. To simplify matters, only one scenario is described in each of the following examples. To learn more about the difference between visibility and access, see the page Freigabe innerhalb von Kursen Sichtbarkeit und Zugang.

Syntax in General

Example of an expert rule

Result of this rule

getOnyxTestOutcome("[KB-ID]","[test variable]")

getOnyxTestOutcome("84692289655276","S1_max") > 10

If used in the Visibility tab, this example will make the course element visible once the user has reached a value greater than 10 for the test variable "S1_max" in the indicated course element test (course element ID "69742969114730").

getOnyxTestOutcomeZK("[KB-ID]","[test variable]")

getOnyxTestOutcomeZK("84692289655276","T2")="A" 

Bei Eintrag im Tab Sichtbarkeit ist der Kursbaustein sichtbar, wenn der Nutzer im angegebenen Kursbaustein Test (Kursbaustein-ID "84692289655276") für die Testvariable "T2" genau den Wert "A" hat.

Create additional rules by using expert syntax. A tabular overview is provided on the page Expertensyntax.