Constructor & Destructor Documentation
| __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.
Member Function Documentation
| addCondition |
( |
|
$condition | ) |
|
Deletes the admission rule and all associated data.
Reimplemented from AdmissionRule.
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.
Gets all defined conditions.
- Returns
- Array
| static getDescription |
( |
| ) |
|
|
static |
| getMessage |
( |
|
$condition = null | ) |
|
Gets the template that provides a configuration GUI for this rule.
- Returns
- String
Reimplemented from AdmissionRule.
| removeCondition |
( |
|
$conditionId | ) |
|
| 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.
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.
Helper function for storing data to DB.
Reimplemented from AdmissionRule.
A textual description of the current rule.
- Returns
- String
Reimplemented from AdmissionRule.
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.
Field Documentation
All conditions that must be fulfilled for successful admission.
The documentation for this class was generated from the following file: