|
Stud.IP
jlu_3.3 Revision
|


Public Member Functions | |
| __construct ($ruleId='', $courseSetId='') | |
| afterSeatDistribution (&$courseset) | |
| checkTimeFrame () | |
| delete () | |
| generateId ($tableName) | |
| getAffectedUsers () | |
| getEndTime () | |
| getInput () | |
| getId () | |
| getMessage () | |
| getStartTime () | |
| getTemplate () | |
| load () | |
| beforeSeatDistribution (&$courseset) | |
| ruleApplies ($userId, $courseId) | |
| setAllData ($data) | |
| setEndTime ($newEndTime) | |
| setMessage ($newMessage) | |
| setStartTime ($newStartTime) | |
| store () | |
| toString () | |
| validate ($data) | |
| __toString () | |
| isCombinationAllowed ($admission_rule) | |
| __clone () | |
Static Public Member Functions | |
| static | getAvailableAdmissionRules ($activeOnly=true) |
| static | getInputFrame () |
| static | getDescription () |
| static | getName () |
Data Fields | |
| $endTime = 0 | |
| $id = '' | |
| $message = '' | |
| $default_message = '' | |
| $startTime = 0 | |
| $courseSetId = '' | |
| $allowed_combinations = array() | |
| __construct | ( | $ruleId = '', |
|
$courseSetId = '' |
|||
| ) |
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| __clone | ( | ) |
Reimplemented in ConditionalAdmission.
| __toString | ( | ) |
Standard string representation of this object.

| afterSeatDistribution | ( | & | $courseset | ) |
Hook that can be called after the seat distribution on the courseset has completed.
| CourseSet | $courseset | Current courseset. |
| beforeSeatDistribution | ( | & | $courseset | ) |
Hook that can be called when the seat distribution on the courseset starts.
| CourseSet | The courseset this rule belongs to. |
| checkTimeFrame | ( | ) |
Checks if we are in the rule validity time frame.

| delete | ( | ) |
Deletes the admission rule and all associated data.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.

| generateId | ( | $tableName | ) |
Generate a new unique ID.
| String | tableName |


| getAffectedUsers | ( | ) |
Gets all users that are matched by thís rule.
Reimplemented in ConditionalAdmission.
|
static |
Reads all available AdmissionRule subclasses and loads their definitions.
| bool | $activeOnly | Show only active rules. |


|
static |
Gets some text that describes what this AdmissionRule (or respective subclass) does.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| getEndTime | ( | ) |
| getId | ( | ) |
Gets the rule ID.
| getInput | ( | ) |
Reimplemented in PasswordAdmission.
|
staticfinal |
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.
| getMessage | ( | ) |
Gets the message that is shown to users rejected by this rule.

|
static |
Return this rule's name.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| getStartTime | ( | ) |
| getTemplate | ( | ) |
Gets the template that provides a configuration GUI for this rule.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| isCombinationAllowed | ( | $admission_rule | ) |
checks if given admission rule is allowed to be combined with this rule
| AdmissionRule | string | $admission_rule |
| load | ( | ) |
Internal helper function for loading rule definition from database.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| ruleApplies | ( | $userId, | |
| $courseId | |||
| ) |
Does the current rule allow the given user to register as participant in the given course?
| String | userId |
| String | courseId |
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, PasswordAdmission, and TimedAdmission.
| setAllData | ( | $data | ) |
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.
| Array | $data |
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.

| setEndTime | ( | $newEndTime | ) |
Sets a new end time for condition validity.
| Integer | newEndTime |
Reimplemented in TimedAdmission.
| setMessage | ( | $newMessage | ) |
Sets a new message to show to users.
| String | newMessage A new message text. |
| setStartTime | ( | $newStartTime | ) |
Sets a new start time for condition validity.
| Integer | newStartTime |
Reimplemented in TimedAdmission.
| store | ( | ) |
Helper function for storing rule definition to database.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| toString | ( | ) |
A textual description of the current rule.
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, LockedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.

| validate | ( | $data | ) |
Validates if the given request data is sufficient to configure this rule (e.g. if required values are present).
| Array | Request data |
Reimplemented in ConditionalAdmission, CourseMemberAdmission, LimitedAdmission, ParticipantRestrictedAdmission, PasswordAdmission, and TimedAdmission.
| $allowed_combinations = array() |
| $courseSetId = '' |
ID of the CourseSet this admission rule belongs to (is stored here for performance reasons).
| $default_message = '' |
default message that is shown to users that are rejected for admission because of the current rule.
| $endTime = 0 |
When does the validity end?
| $id = '' |
A unique identifier for this rule.
| $message = '' |
A customizable message that is shown to users that are rejected for admission because of the current rule.
| $startTime = 0 |
When does the validity start?