Stud.IP
6.0
|
Static Public Member Functions | |
static | findAllByRangeId ($range_id, $as_collection=false) |
static | createOrUpdate (?string $id, string $name, ?int $position, string $range_id, int $size, bool $selfassign, int $selfassign_start, int $selfassign_end, bool $makefolder, ?array $dates=null, bool $make_blubber=false) |
static | findBySeminar_id ($course_id) |
static | findByTermin_id ($termin_id) |
static | findContactGroups ($user_id=null) |
static | findJoinableGroups ($range_id, $user_id) |
static | reorderPositionsForRange ($range_id) |
static | getUserRoles ($context, $user) |
static | exportUserData (StoredUserData $storage) |
static | isMemberOf (string $gruppenId, string $userId) |
Static Public Member Functions inherited from SimpleORMap | |
static | tableScheme ($db_table) |
static | expireTableScheme () |
static | exists ($id) |
static | countBySql ($sql='1', $params=[]) |
static | create ($data) |
static | build ($data, $is_new=true) |
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 (string $name, array $arguments) |
Data Fields | |
$keep_children = false | |
Data Fields inherited from SimpleORMap | |
const | ID_SEPARATOR = '_' |
Static Protected Member Functions | |
static | configure ($config=[]) |
Static Protected Member Functions inherited from SimpleORMap | |
static | db_table () |
static | db_fields () |
static | pk () |
static | default_values () |
static | serialized_fields () |
static | alias_fields () |
static | i18n_fields () |
static | additional_fields () |
static | has_many () |
static | has_one () |
static | belongs_to () |
static | has_and_belongs_to_many () |
static | registered_callbacks () |
static | known_slots () |
static | notification_map () |
static | getter_setter_map () |
static | configure ($config=[]) |
static | config ($key) |
static | registerCallback ($types, $cb) |
static | unregisterCallback ($types, $cb) |
Additional Inherited Members | |
Static Public Attributes inherited from SimpleORMap | |
static | $schemes = null |
Protected Member Functions inherited from SimpleORMap | |
_getId ($field) | |
_setId ($field, $value) | |
_getAdditionalValueFromRelation ($field) | |
_setAdditionalValueFromRelation ($field, $value) | |
_getAdditionalValue ($field) | |
_setAdditionalValue ($field, $value) | |
parseRelationOptions ($type, $name, $options) | |
storeRelations ($only_these=null) | |
deleteRelations () | |
initializeContent () | |
applyCallbacks ($type) | |
cbNotificationMapper ($cb_type) | |
cbAfterInitialize ($cb_type) | |
setSerializedValue ($field, $value) | |
setI18nValue ($field, $value) | |
Protected Attributes inherited from SimpleORMap | |
$content = [] | |
$content_db = [] | |
$is_new = true | |
$is_deleted = false | |
$relations = [] | |
$additional_data = [] | |
Static Protected Attributes inherited from SimpleORMap | |
static | $config = [] |
static | $reserved_slots = ['value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id'] |
static | $performs_batch_operation = false |
addUser | ( | $user_id, | |
$check = false |
|||
) |
Adds a user to a group
string | $user_id | The user id |
boolean | $check | if true checks if there is space left in this group |
cbAddPosition | ( | ) |
Adds the next free position if position is null.
cbRemoveTasks | ( | ) |
This callback is called after deleting a User. It removes courseware task entries that are associated with the group.
cbReorderPositions | ( | ) |
Reorders position after delete or for the assoicated range_id.
|
staticprotected |
|
static |
Creates or updates a statusgroup.
string | null | $id | ID of an existing group or empty if new group |
string | $name | group name |
int | null | $position | position or null if automatic position after other groups |
string | $range_id | ID of the object this group belongs to |
int | $size | max number of members or 0 if unlimited |
bool | $selfassign | may users join this group by themselves? |
int | $selfassign_start | group joining is possible starting at ... |
int | $selfassign_end | group joining is possible until ... |
bool | $makefolder | create a document folder assigned to this group? |
array | null | $dates | dates assigned to this group. Defaults to null which means already assigned dates are not changed. |
bool | $make_blubber | create a blubber thread for this group? |
Exception |
delete | ( | ) |
Deletes a status group and all it's child groups.
|
static |
Export available data of a given user into a storage object (an instance of the StoredUserData class) for that user.
StoredUserData | $storage | object to store data into |
Implements PrivacyObject.
|
static |
|
static |
Finds all statusgroups by a course id
string | The course id |
|
static |
|
static |
|
static |
Find all groups belonging to the given range_id that may be joined by the given user.
String | $range_id | range_id the groups shall belong to |
String | $user_id | user to check |
findLecturers | ( | ) |
Finds Lecturers assigned to this group via course dates.
findTopics | ( | ) |
Finds CourseTopics assigned to this group via course dates.
getChildren | ( | ) |
getDatafields | ( | ) |
getFolder | ( | ) |
Gets the folder assigned to this statusgroup.
getFullGenderedName | ( | $user_id, | |
$seperator = ' , |
|||
' | |||
) |
Produces string of all statusgroups a user is in (upwards from the current group)
string | $user_id | The user_id |
string | $seperator | The sign between the full paths |
getFullGenderedPaths | ( | $user_id, | |
$seperator = " > " , |
|||
$pre = "" |
|||
) |
Produces an array of all statusgroups a user is in
string | $user_id | The user_id |
string | $seperator | The sign between the full paths |
string | $pre | Preface of the outputted string (used for recursion) |
getGenderedName | ( | $user_or_id | ) |
Returns the gendered name of a statusgroup
string | User | $user_id | The user_id |
getName | ( | ) |
getPlaces | ( | ) |
Displayfunction to show the places left in this group
|
static |
Puts out an array of all gendered userroles for a user in a certain context
string | $context | The context |
string | $user | The user id |
hasBlubber | ( | ) |
Returns whether the group has an associated blubber thread.
hasFolder | ( | ) |
Checks if a statusgroup has a folder.
hasSpace | ( | ) |
Checks if there is free space in this group
isMember | ( | $user_id = null | ) |
Checks if a user is a member of this group
string | $user_id | The user id |
|
static |
Checks if a user is a member of a group.
string | $user_id | The user id |
(PHPMD.StaticAccess)
moveUser | ( | $user_id, | |
$pos | |||
) |
Move a user to a position of a group
string | $user | |
type | $pos |
remove | ( | ) |
Deletes a status group. Any associated child group will move upwards in the tree.
removeAllUsers | ( | ) |
Remove all users of this group
removeUser | ( | $user_id, | |
$deep = false |
|||
) |
Remove one user from this group
string | $user_id | The user id |
bool | $deep | Remove user from children as well? |
|
static |
Reorders the positions in numeric order without gaps (e.g. after a delete).
string | $range_id | Id of range |
setDatafields | ( | $data | ) |
sortMembersAlphabetic | ( | ) |
Sorts the member of a group alphabetic
sortSubGroupsAlphabetic | ( | ) |
Sorts subgroups alphabetical
updateBlubber | ( | bool | $set | ) |
Delete or create blubber thread
bool | $set | Whether to create a blubber thread or not; an existing blubber thread will be deleted if $set is false |
updateFolder | ( | $set | ) |
Delete or create a folder
boolean | $set | true Create a folder false Unlink the existing folder from the group |
userHasExclusiveGroup | ( | $user_id | ) |
Checks if the user is already in an exclusive group of this range
string | $user_id | The user id |
userMayJoin | ( | $user_id | ) |
Checks if a user could join this group
string | $user_id | The user id |
userMayLeave | ( | $user_id | ) |
Checks if a user could leave this group
string | $user_id | The user id |
$keep_children = false |