Expert Mode
Application examples of expert rules
In the following, you will find examples of how to use the expert syntax.
Typical application examples
)))|
date("[date]")
|
Query date
inLearningGroup("[string]") | Returns TRUE for all members of the learning group with the title [string] of the current course. | |
inLearningGroup("[string1]","[string2]") | Returns TRUE for all members of the specified learning group [string1] of the course with the specified course ID=[string2]. | |
inLearningGroupWaitingList("[string]") | Returns TRUE for all users on the waiting list of the learning group [string] of the current course. | |
inLearningGroupWaitingList("[string1]","[string2]" ) | Returns TRUE for all users on the waiting list of the learning group [string1] of the course with the specified course ID=[string2]. | |
inRightGroup("[string]") | Returns TRUE for all members of the right group [string]. | |
isLearningGroupFull("[string]") | Returns the Boolean TRUE (=full) or FALSE (=not full) for the specified learning group in the current course. | |
isLearningGroupFull("[string1]","[string2]") | Returns the Boolean TRUE (=full) or FALSE (=not full) for the specified learning group=[string1] of the course with the course ID=[string2]. | |
isUser("[string]") | Returns TRUE for the user with the user name [string]. | |
inLearningArea("[string]") | Returns TRUE for all members of the groups in the learning area [string] of the current course. | |
inLearningArea("[string1]","[string2]") | Returns TRUE for all members of the groups in the specified learning area [string1] of the course with the specified course ID=[string2]. | |
getNumberOfEnrollments("[string1]*") | Returns TRUE, when the configured number of learning group members is reached in the learning area (string1). | |
isGlobalAuthor() | Returns TRUE for all members of the OPAL author group. | |
isCourseAdministrator() | Returns TRUE for all owners of your course (learning resource). | |
isCourseCoach() | Returns TRUE for all users who supervise a learning group. | |
isGuest() | Returns TRUE for all users who visit OPAL as guests. | |
isExternalUser() | Returns TRUE for everyone who uses OPAL as an external user. | |
hasAttribute("[AttrName]","[string]") | Returns TRUE if [string] matches the value of the AAI attribute [AttrName] of the respective user. | |
isInAttribute("[AttrName]","[substring]") | Returns TRUE if [substring] matches a portion of the value of the AAI attribute [AttrName] of the respective user. | |
getUserProperty("[string]") | Returns the specified user property of the executing user. | |
getPassed("[integer]") | Returns the Boolean TRUE (=passed) or FALSE (=not passed) from the course element with the specified ID. | |
getScore("[integer]") | Returns the number of points from the course element with the specified ID. | |
getAttempts("[integer]") | Returns the number of completed attempts from the course element with the specified ID. Can be applied to course elements of the type Test, Self-test, Survey (possible return values 0 or 1), and Task (return value = number of submitted files). | |
getInitialEnrollmentDate("[integer]") | Returns the date of the respective course participant's first-time enrolment from the Enrolment course element with the specified ID. | |
getRecentEnrollmentDate("[integer]") | Returns the date of the respective course participant's last enrolment from the Enrolment course element with the specified ID. | |
getInitialCourseLaunchDate() | Returns the date of the first-time course visit of the respective course participant. | |
getRecentCourseLaunchDate() | Returns the date of the last course visit of the respective course participant. | |
getPassedWithCourseId("[integer-1]","[integer- 2]") | Returns the Boolean TRUE (=passed) or FALSE (=not passed) from the course element with the ID=[integer-2] of the course with the ID=[integer-1]. | |
getScoreWithCourseId("[integer-1]","[integer-2]") | Returns the number of points from the course element with the ID=[integer-2] of the course with the ID=[integer-1]. | |
getMarkWithCourseId(" [integer-1]","[integer-2]") | Returns the mark from the course element with the ID=[integer-2] of the course with the ID=[integer-1]. | |
hasEvaluationCompleted("KB-ID") | Returns TRUE for all users who have successfully completed the specified course element. | |
getNumberOfEnrollments("[string1]*") | Returns TRUE, when the configured number of learning group members is reached in the learning area (string1). | |
getOnyxTestOutcome("[string1]","[string2]") | Returns from the ONYX test course element with the specified ID (string1) and the specified output variable (string2) the value of this variable. The return value will be a number. | |
getOnyxTestOutcomeZK("[string1]","[string2]") | Returns from the ONYX test course element with the specified ID (string1) and the specified output variable (string2) the value of this variable. The return value will be a string. | |
getProgress("[integer]") | Returns the progress from the course element with the specified ID as a numerical value between 0 and 100 (percent). | |
isPasswordConfirmed("[string]") | Returns TRUE after entering the correct password (string1). Can only be used with course elements that allow a password restriction even in simple mode. | |
comesFrom("[string]") | Returns TRUE if the user has a linked account to OLAT with the specified system ID. | |
Units
| min | Minutes |
h | Hours | |
w | Weeks | |
m | Months | |
Operators
| = | Equal to |
> | Greater than | |
< | Less than | |
>= | Greater than or equal to | |
<= | Less than or equal to | |
* | Multiplication | |
/ | Division | |
+ | Addition | |
- | Subtraction | |
Booleans
| & | Logical AND |
| | Logical OR | |
! | Logical NOT |



