Skip to end of metadata
Go to start of metadata

How to configure a test so that after completing it and when the test result is successful, the user will automatically jump to a specific course element, and the target course element will differ depending on the test result?


Enable the option "Jump to another course node after finishing the test" and combine it with expert rules.

By using the function Jump to another course node after finishing the test, you can already determine which course element will be displayed to the user immediately after completing a test attempt, without the user having to actively click on an area in the navigation. However, this function does not distinguish how successfully the test has been performed in order to allow the possibility for a direct distinction between different course elements.

To implement the desired behaviour, deploy expert rules and a structure course element. In the example course Activation according to test result, you can test the effect. See the expandable area below for a description of all necessary configuration steps.

Expert rules are very versatile. For more general information about the expert syntax, see the help page Publishing within courses (expert mode).


Create or open a test course element. Write down the ID of the course element. You can find it in the bottom right corner of the Title and Description


Create a new structure course element and give it a suitable title. Switch to expert mode in the Visibility tab.


Enter the expert rule 

getAttempts("101828111911807") > 0

in the appropriate field. Adjust the course element ID in this rule by replacing the ID 101828111911807 used here as an example with the ID that matches your test.

The expert rule configured in this way will now determine the number of performed test attempts. In this example, it causes the structure course element to become visible to users only after the test has been performed for the first time.


In the structure course element, create the corresponding elements to which the user would be directed upon completion of the test. If several elements are desired per test result, you can again use structure course elements for a clear outline. In the example, three different learning paths should be provided:

  • Section “Subject A” if the test was completed with less than 5 points and thus failed.
  • Section “Subject B” if the test was completed with 5 points and thus passed.
  • Section “Subject C” if the test was completed with 10 points and thus passed with a full score.


For each element, set an appropriate visibility rule that will react to the possible test result.

In the example,

getOnyxTestOutcomeZK("101828111911807","PASS") ="false"

is used to display a section with notes for test attempts the learner did not pass.

To differentiate “passed tests” from failed tests, the expert rule 

getOnyxTestOutcomeZK("101828111911807","PASS") ="true"

can be used.

However, in the example, 

getOnyxTestOutcome("101828111911807","SCORE") = 5

was used to check for the score achieved to pass this test. If a full score of 10 points is reached, another specific element will be displayed in the example.


Lastly, enable the option Jump to another course node after finishing the test in the Test configuration tab of the test course element and select the structure course element which is followed by the configured subjects.


Publish your changes.