__construct |
( |
|
$setId = '' | ) |
|
addAdmissionRule |
( |
|
$rule | ) |
|
Adds the given admission rule to the list of rules for the course set.
- Parameters
-
- Returns
- CourseSet
Adds the course with the given ID to the course set.
- Parameters
-
- Returns
- CourseSet
static addCourseToSet |
( |
|
$set_id, |
|
|
|
$course_id |
|
) |
| |
|
static |
Adds a new institute ID.
- Parameters
-
- Returns
- CourseSet
Adds several institute IDs to the existing institute assignments.
- Parameters
-
- Returns
- CourseSet
Adds a UserList to the course set. The list contains several users and a factor that changes seat distribution chances for these users;
- Parameters
-
- Returns
- CourseSet
checkAdmission |
( |
|
$userId, |
|
|
|
$courseId |
|
) |
| |
Is the given user allowed to register as participant in the given course according to the rules of this course set?
- Parameters
-
String | userId |
String | courseId |
- Returns
- Array Optional error messages from rules if something went wrong.
Removes all admission rules at once.
- Returns
- CourseSet
Deletes the course set and all associated data.
Starts the seat distribution algorithm.
getAdmissionRule |
( |
|
$class_name | ) |
|
Get all admission rules belonging to the course set.
- Returns
- AdmissionRule[]
How many users will be allowed to register according to the defined rules? This can help in estimating whether the combination of the defined rules makes sense.
- Returns
- int
Returns the date of the last change.
- Returns
- int
Gets the course IDs belonging to the course set.
- Returns
- Array
static getCoursesByCourseSetId |
( |
|
$courseSetId | ) |
|
|
static |
Gets all courses belonging to the given course set ID.
- Parameters
-
- Returns
- Array
static getCoursesetsByInstituteId |
( |
|
$instituteId, |
|
|
|
$filter = [] |
|
) |
| |
|
static |
Gets all course sets belonging to the given institute ID.
- Parameters
-
- Returns
- Array
static getGlobalCoursesets |
( |
|
$filter = [] | ) |
|
|
static |
Gets all global course sets
- Parameters
-
- Returns
- Array
static getGlobalLockedAdmissionSetId |
( |
| ) |
|
|
static |
Get the identifier of the course set.
- Returns
- String
Get the course set's info text.
- Returns
- String
Which institutes does the rule belong to?
- Returns
- Array
Gets this course set's display name.
Retrieves the priorities given to the courses in this set.
- Returns
- Array
Is the current courseset private?
- Returns
- bool
getSeatDistributionTime |
( |
| ) |
|
returns timestamp of distribution time or null if no distribution time available may return 0 if first-come-first-serve is enabled
- Returns
- integer|null timestamp of distribution
returns latest semester id from assigned courses if no courses are assigned current semester
- Returns
- string id of semester
static getSetForCourse |
( |
|
$courseId | ) |
|
|
static |
Gets the course sets the given course belongs to.
- Parameters
-
- Returns
- CourseSet
static getSetForRule |
( |
|
$rule_id | ) |
|
|
static |
Gets the course sets the given rule belongs to.
- Parameters
-
- Returns
- CourseSet
Gets the owner of this course set.
Retrieves the lists of users that are considered specially in seat distribution.
- Returns
- Array
hasAdmissionRule |
( |
|
$rule | ) |
|
check if course set has given admission rule
- Parameters
-
- Returns
- boolean
Evaluates whether the seat distribution algorithm has already been executed on this course set.
- Returns
- boolean True if algorithm has already run, otherwise false.
isAdmissionRuleAllowed |
( |
|
$admission_rule | ) |
|
checks if given rule is allowed to be added to current set of rules
- Parameters
-
- Returns
- boolean
isSeatDistributionEnabled |
( |
| ) |
|
returns true if the set allows only a limited number of places
- Returns
- boolean
isUserAllowedToAssignCourse |
( |
|
$user_id, |
|
|
|
$course_id |
|
) |
| |
is user with given user id allowed to assign/unassign given course to courseset
- Parameters
-
string | $user_id | |
string | $course_id | |
- Returns
- boolean
isUserAllowedToEdit |
( |
|
$user_id | ) |
|
is user with given user id allowed to edit or delete the courseset
- Parameters
-
- Returns
- boolean
Helper function for loading data from DB.
removeAdmissionRule |
( |
|
$ruleId | ) |
|
Removes the rule with the given ID from the set.
- Parameters
-
- Returns
- CourseSet
removeCourse |
( |
|
$courseId | ) |
|
Removes the course with the given ID from the set.
- Parameters
-
- Returns
- CourseSet
static removeCourseFromSet |
( |
|
$set_id, |
|
|
|
$course_id |
|
) |
| |
|
static |
removeInstitute |
( |
|
$instituteId | ) |
|
Removes the institute with the given ID from the set.
- Parameters
-
- Returns
- CourseSet
removeUserlist |
( |
|
$listId | ) |
|
Removes the user list with the given ID from the set.
- Parameters
-
- Returns
- CourseSet
setAdmissionRules |
( |
|
$newRules | ) |
|
Adds several admission rules after clearing the existing rule assignments.
- Parameters
-
- Returns
- CourseSet
setAlgorithm |
( |
|
$newAlgorithm | ) |
|
Sets a seat distribution algorithm for this course set. This will only have an effect in conjunction with a TimedAdmission, as the algorithm needs a defined point in time where it will start.
- Parameters
-
- Returns
- CourseSet
setAlgorithmRun |
( |
|
$state | ) |
|
Adds several course IDs after clearing the existing course assignments.
- Parameters
-
- Returns
- CourseSet
Set the course set's info text.
- Returns
- CourseSet
Adds several institute IDs after clearing the existing institute assignments.
- Parameters
-
- Returns
- CourseSet
setPrivate |
( |
|
$newPrivate | ) |
|
Set a new value for courseset privacy.
- Parameters
-
- Returns
- CourseSet
Adds several user list IDs after clearing the existing user list assignments.
- Parameters
-
- Returns
- CourseSet
toString |
( |
|
$short = false | ) |
|
A textual description of the current rule.
- Parameters
-
bool | short Show only short info without overview of assigned courses and institutes. |
- Returns
- String
Admission rules that are applied to the courses belonging to this set.
Seat distribution algorithm.
When was the course set changed?
IDs of courses that are aggregated into this set. The array is in the form ($courseId1 => true, $courseId2 => true).
Has the seat distribution algorithm already been executed?
Unique identifier for this set.
Some extensive descriptional text for informing confused students.
Which Stud.IP institute does the course set belong to?
Some display name for this course set.
Is the course set only visible for the creator?
Who owns this course set?
The documentation for this class was generated from the following file: