◆ __construct()
| __construct |
( |
|
$ruleId = '', |
|
|
|
$courseSetId = '' |
|
) |
| |
Standard constructor.
- Parameters
-
| String | ruleId If this rule has been saved previously, it will be loaded from database. |
- Returns
- AdmissionRule the current object (this).
Reimplemented from AdmissionRule.
◆ __clone()
◆ addCondition()
| addCondition |
( |
|
$condition | ) |
|
◆ delete()
Deletes the admission rule and all associated data.
Reimplemented from AdmissionRule.
◆ getAffectedUsers()
Gets all users that are matched by thís rule.
- Returns
- Array An array containing IDs of users who are matched by this rule.
Reimplemented from AdmissionRule.
◆ getConditions()
Gets all defined conditions.
- Returns
- Array
◆ getDescription()
| static getDescription |
( |
| ) |
|
|
static |
◆ getMessage()
| getMessage |
( |
|
$condition = null | ) |
|
◆ getName()
◆ getTemplate()
Gets the template that provides a configuration GUI for this rule.
- Returns
- String
Reimplemented from AdmissionRule.
◆ load()
◆ removeCondition()
| removeCondition |
( |
|
$conditionId | ) |
|
◆ ruleApplies()
| 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.
Reimplemented from AdmissionRule.
◆ setAllData()
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.
Reimplemented from AdmissionRule.
◆ store()
Helper function for storing data to DB.
Reimplemented from AdmissionRule.
◆ toString()
A textual description of the current rule.
- Returns
- String
Reimplemented from AdmissionRule.
◆ validate()
Validates if the given request data is sufficient to configure this rule (e.g. if required values are present).
- Parameters
-
- Returns
- Array Error messages.
Reimplemented from AdmissionRule.
◆ $allowed_combinations
◆ $conditions
All conditions that must be fulfilled for successful admission.
The documentation for this class was generated from the following file: