__construct |
( |
|
$ruleId = '' , |
|
|
|
$courseSetId = '' |
|
) |
| |
Standard constructor.
- Parameters
-
String | $ruleId | If this rule has been saved previously, it will be loaded from database. |
- Returns
- ConditionalAdmission the current object (this).
addCondition |
( |
|
$condition, |
|
|
|
$group = '' , |
|
|
|
$quota = 0 |
|
) |
| |
conditiongroupsAllowed |
( |
| ) |
|
Checks if condition groups are allowed.
- Returns
- Boolean
Deletes the admission rule and all associated data.
Gets all users that are matched by thÃs rule.
- Returns
- Array An array containing IDs of users who are matched by this rule.
Gets all grouped conditiongroups.
- Returns
- Array
Gets all defined conditions.
- Returns
- Array
static getDescription |
( |
| ) |
|
|
static |
Gets some text that describes what this AdmissionRule (or respective subclass) does.
getMessage |
( |
|
$condition = null | ) |
|
Gets quota for given conditiongroup.
- Returns
- Array
Gets the template that provides a configuration GUI for this rule.
- Returns
- String
getUngroupedConditions |
( |
| ) |
|
Gets all grouped conditiongroups.
- Returns
- Array
removeCondition |
( |
|
$conditionId | ) |
|
removeConditionGroups |
( |
| ) |
|
Removes condition groups and sets all conditions as ungrouped.
ruleApplies |
( |
|
$userId, |
|
|
|
$courseId |
|
) |
| |
Checks whether the given user fulfills the configured admission conditions. Only one of the conditions needs to be fulfilled (logical operator OR). The fields in a condition are in conjunction (logical operator AND).
- Parameters
-
String | $userId | |
String | $courseId | |
- Returns
- Array Array with conditions that have failed. If array is empty, everything's all right.
Uses the given data to fill the object values. This can be used as a generic function for storing data if the concrete rule type isn't known in advance.
- Parameters
-
- Returns
- AdmissionRule This object.
setSiblings |
( |
|
$siblings = [] | ) |
|
Helper function for storing data to DB.
A textual description of the current rule.
- Returns
- String
Validates if the given request data is sufficient to configure this rule (e.g. if required values are present).
- Parameters
-
- Returns
- Array Error messages.
Grouped conditions that must be fulfilled for successful admission.
$conditiongroups_allowed = null |
Are condition groups allowed?
All conditions that must be fulfilled for successful admission.
Quota for grouped conditions
courseset siblings of this rule
$ungrouped_conditions = [] |
Conditions that must be fulfilled for successful admission.
The documentation for this class was generated from the following file: