__construct |
( |
|
$ruleId = '' , |
|
|
|
$courseSetId = '' |
|
) |
| |
Standard string representation of this object.
- Returns
- String
afterSeatDistribution |
( |
|
$courseset | ) |
|
Hook that can be called after the seat distribution on the courseset has completed.
- Parameters
-
beforeSeatDistribution |
( |
|
$courseset | ) |
|
Hook that can be called when the seat distribution on the courseset starts.
- Parameters
-
CourseSet | $courseset | The courseset this rule belongs to. |
Checks if we are in the rule validity time frame.
- Returns
- bool True if the rule is valid because the time frame applies, otherwise false.
Deletes the admission rule and all associated data.
Generate a new unique ID.
- Parameters
-
Gets all users that are matched by thÃs rule.
- Returns
- Array An array containing IDs of users who are matched by this rule.
static getAvailableAdmissionRules |
( |
|
$activeOnly = true | ) |
|
|
static |
Reads all available AdmissionRule subclasses and loads their definitions.
- Parameters
-
bool | $activeOnly | Show only active rules. |
- Returns
- Array
static getDescription |
( |
| ) |
|
|
static |
Gets some text that describes what this AdmissionRule (or respective subclass) does.
Get end of validity.
- Returns
- Integer
Gets the rule ID.
- Returns
- String This rule's ID.
Subclasses of AdmissionRule can require additional data to be entered on admission (like PasswordAdmission which needs a password for course access). Their corresponding method getInput only returns a HTML form fragment as the output can be concatenated with output from other rules. This static method provides the frame for rendering a full HTML form around the fragments from subclasses.
- Returns
- Array Start and end templates which wrap input form fragments from subclasses.
Gets the message that is shown to users rejected by this rule.
- Returns
- String The message.
Gets start of validity.
- Returns
- Integer
Gets the template that provides a configuration GUI for this rule.
- Returns
- String
isCombinationAllowed |
( |
|
$admission_rule | ) |
|
checks if given admission rule is allowed to be combined with this rule
- Parameters
-
- Returns
- boolean
Internal helper function for loading rule definition from database.
ruleApplies |
( |
|
$userId, |
|
|
|
$courseId |
|
) |
| |
Does the current rule allow the given user to register as participant in the given course?
- Parameters
-
String | $userId | |
String | $courseId | |
- Returns
- Array
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.
setEndTime |
( |
|
$newEndTime | ) |
|
Sets a new end time for condition validity.
- Parameters
-
- Returns
- AdmissionRule
setMessage |
( |
|
$newMessage | ) |
|
Sets a new message to show to users.
- Parameters
-
String | $newMessage | A new message text. |
- Returns
- AdmissionRule This object
setSiblings |
( |
|
$siblings = [] | ) |
|
setStartTime |
( |
|
$newStartTime | ) |
|
Sets a new start time for condition validity.
- Parameters
-
- Returns
- AdmissionRule
Helper function for storing rule definition to database.
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.
ID of the CourseSet this admission rule belongs to (is stored here for performance reasons).
default message that is shown to users that are rejected for admission because of the current rule.
When does the validity end?
A unique identifier for this rule.
A customizable message that is shown to users that are rejected for admission because of the current rule.
courseset siblings of this rule
$siblings_override = false |
Are siblings set manually?
When does the validity start?
The documentation for this class was generated from the following file: