|
static | findCurrent () |
|
static | exportUserData (StoredUserData $storage) |
|
static | findByUser ($user_id, $perms=[], $with_deputies=true) |
|
static | tableScheme ($db_table) |
|
static | expireTableScheme () |
|
static | exists ($id) |
|
static | countBySql ($sql= '1', $params=[]) |
|
static | create ($data) |
|
static | buildExisting ($data) |
|
static | import ($data) |
|
static | findBySQL ($sql, $params=[]) |
|
static | findOneBySQL ($where, $params=[]) |
|
static | findThru ($foreign_key_value, $options) |
|
static | findEachBySQL ($callable, $sql, $params=[]) |
|
static | findMany ($pks=[], $order= '', $order_params=[]) |
|
static | findEachMany ($callable, $pks=[], $order= '', $order_params=[]) |
|
static | findAndMapBySQL ($callable, $where, $params=[]) |
|
static | findAndMapMany ($callable, $pks=[], $order= '', $order_params=[]) |
|
static | deleteBySQL ($where, $params=[]) |
|
static | toObject ($id_or_object) |
|
static | __callStatic ($name, $arguments) |
|
_set_semester |
( |
|
$field, |
|
|
|
$value |
|
) |
| |
cbSetStartAndDurationTime |
( |
| ) |
|
Called directly before storing the object to edit the columns start_time and duration_time which are both deprecated but are still in use for older plugins.
static configure |
( |
|
$config = [] | ) |
|
|
staticprotected |
countMembersWithStatus |
( |
|
$status | ) |
|
Retrieves the number of all members of a status
- Parameters
-
String | Array | $status | the status to filter with |
- Returns
- int the number of all those members.
Returns a descriptive text for the range type.
- Returns
- string
Implements Range.
static findByUser |
( |
|
$user_id, |
|
|
|
$perms = [] , |
|
|
|
$with_deputies = true |
|
) |
| |
|
static |
Returns a list of courses for the specified user. Permission levels may be supplied to limit the course list.
- Parameters
-
string | $user_id | The ID of the user whose courses shall be retrieved. |
| string[] | $perms The permission levels of the user that shall be regarded when retrieving courses. |
bool | $with_deputies | Whether to include courses where the user is a deputy (true) or not (false). Defaults to true. |
- Returns
- Course[] A list of courses.
Returns the currently active course or false if none is active.
- Returns
- Course object of currently active course, null otherwise
- Since
- 3.0
returns all activated plugins/modules for this course
- Returns
- StudipModule[]
Returns the appropriate label for the completion status.
- Returns
- string
Returns the appropriate icon for the completion status.
Mapping (completion -> icon role):
- 0 => status-red
- 1 => status-yellow
- 2 => status-green
- Returns
- Icon class
{Returns the configuration object for this range.
- Returns
- RangeConfig
}
Implements Range.
getDatesWithExdates |
( |
|
$range_begin = 0 , |
|
|
|
$range_end = 0 |
|
) |
| |
Retrieves the course dates including cancelled dates ("ex-dates"). The dates can be filtered by an optional time range. By default, all dates are retrieved.
- Parameters
-
int | $range_begin | The begin timestamp of the time range. |
int | $range_end | The end timestamp of the time range. |
- Returns
- SimpleCollection A collection of all retrieved dates and cancelled dates.
Retrieves the last semester of a course, if applicable.
- Returns
- Semester|null Either the last semester of the course or null, if no semester could be found.
getFullname |
( |
|
$format = 'default' | ) |
|
Returns the full name of a course. If the important course numbers (IMPORTANT_SEMNUMBER) is set in global configs it will also display the coursenumber
- Parameters
-
string | formatting template name |
- Returns
- string Fullname
Implements Range.
Returns the URL to the avatar image or icon of the object, if applicable.
- Returns
- string|null Either the URL to the object's avatar or icon or null, if the object does not have an avatar.
Implements StudipItem.
getItemName |
( |
|
$long_format = true | ) |
|
Returns a human-readable name of the object.
- Parameters
-
bool | $long_format | If set to true, a long format that has the object type as a prefix (course, room etc.) is returned. Otherwise only the name is returned. |
- Returns
- string A human-readable string of the object's name.
Implements StudipItem.
Returns an URL that points to a page describing or displaying the object.
- Returns
- string|null Either the URL to a descriptive page for the object or null, if the object does not have such an URL.
Implements StudipItem.
getMembersWithStatus |
( |
|
$status, |
|
|
|
$as_collection = false |
|
) |
| |
Retrieves all members of a status
- Parameters
-
String | Array | $status | the status to filter with |
bool | $as_collection | return collection instead of array? |
- Returns
- Array|SimpleCollection an array of all those members.
getNumPrelimParticipants |
( |
| ) |
|
getParticipantStatus |
( |
|
$user_id | ) |
|
Returns the id of the current range
- Returns
- string
Implements Range.
Returns a unique identificator for the range type.
- Returns
- string
Implements Range.
Returns the URL of FeedbackRange view, where the object instance is visible together with the related feedback element(s).
- Returns
- string Path that is usable with the url_for and link_for methods.
Implements FeedbackRange.
Returns the SemClass object that is defined for the course
- Returns
- SemClass The SemClassObject for the course
Returns the semType object that is defined for the course
- Returns
- SemType The semTypeObject for the course
Retrieves the first semester of a course, if applicable.
- Returns
- Semester|null Either the first semester of the course or null, if no semester could be found.
Returns the readable semester duration as as string
- Returns
- string : readable semester
isAccessibleToUser |
( |
|
$user_id = null | ) |
|
Decides whether the user may access the range.
- Parameters
-
string | null | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
Implements Range.
isEditableByUser |
( |
|
$user_id = null | ) |
|
Decides whether the user may edit/alter the range.
- Parameters
-
string | null | $user_id | Optional id of a user, defaults to current user |
- Returns
- bool
Implements Range.
Returns if this course is in the given semester
- Parameters
-
Semester | $semester | : instance of the given semester |
- Returns
- bool : true if this course is part of this semester
Returns true if this course has no end-semester. Else false.
- Returns
- bool : true if there is no end-semester
isRangeAccessible |
( |
string |
$user_id = null | ) |
|
Returns the accessebility of FeedbackRange object instance for current active user
- Parameters
-
string | $user_id | optional; use this ID instead of $GLOBALS['user']->id |
- Returns
- bool range object accessebility
Implements FeedbackRange.
Returns whether this course is a studygroup
- Returns
- bool
- Parameters
-
$name | string name of tool / plugin |
- Returns
- bool
isVisibleForUser |
( |
|
$user_id = null | ) |
|
Is the current course visible for the current user?
- Parameters
-
- Returns
- bool Visible?
Generates a general log entry if the course were changed. Furthermore, this method emits notifications when the start and/or the end semester has/have changed.
Sets this courses study areas to the given values.
- Parameters
-
array | $ids | the new study areas |
- Returns
- bool Changes successfully saved?
The documentation for this class was generated from the following file: