Stud.IP
2.0 Revision 48548
|
Namespaces | |
namespace | studip_core |
Functions | |
getDeputies ($range_id, $name_format='full_rev') | |
getDeputyBosses ($user_id, $name_format='full_rev') | |
addDeputy ($user_id, $range_id) | |
deleteDeputy ($user_id, $range_id) | |
deleteAllDeputies ($range_id) | |
isDeputy ($user_id, $range_id, $check_edit_about=false) | |
setDeputyHomepageRights ($user_id, $range_id, $rights) | |
getValidDeputyPerms ($min_perm_only=false) | |
haveDeputyPerm ($user_id='') | |
getMyDeputySeminarsQuery ($type, $sem_number_sql, $sem_number_end_sql, $add_fields, $add_query) | |
isDefaultDeputyActivated () | |
isDeputyEditAboutActivated () |
addDeputy | ( | $user_id, | |
$range_id | |||
) |
Adds a person as deputy of a course or another person.
string | $user_id | person to add as deputy |
string | $range_id | ID of a course or a person |
deleteAllDeputies | ( | $range_id | ) |
Remove all deputies of the given course or person at once.
string | $range_id | course or person ID |
deleteDeputy | ( | $user_id, | |
$range_id | |||
) |
Removes a person as deputy in the given context (course or person).
mixed | $user_id | which person(s) to remove, can be a single ID or an array of IDs |
string | $range_id | where to remove as deputy (course or person ID) |
getDeputies | ( | $range_id, | |
$name_format = 'full_rev' |
|||
) |
Fetches all deputies of the given course or person.
string | $range_id | ID of a course or person |
string | $name_format | defines which format the full name of a deputy should have |
getDeputyBosses | ( | $user_id, | |
$name_format = 'full_rev' |
|||
) |
Fetches all persons of which the given person is default deputy.
string | $user_id | the user to check |
string | $name_format | what format should full name entries have? |
getMyDeputySeminarsQuery | ( | $type, | |
$sem_number_sql, | |||
$sem_number_end_sql, | |||
$add_fields, | |||
$add_query | |||
) |
Database query for retrieving all courses where the current user is deputy in.
string | $type | are we in the "My courses" list (='meine_seminare') or in grouping or notification view ('gruppe', 'notification') or outside Stud.IP in the notification cronjob (='notification_cli')? |
string | $sem_number_sql | SQL for specifying the semester for a course |
string | $sem_number_end_sql | SQL for specifying the last semester a course is in |
string | $add_fields | optionally necessary fields from database |
string | $add_query | additional joins |
getValidDeputyPerms | ( | $min_perm_only = false | ) |
Shows which permission level a person must have in order to be available as deputy.
boolean | $min_perm_only | whether to give only the minimum permission or a set of all valid permissions available for being deputy |
haveDeputyPerm | ( | $user_id = '' | ) |
Checks whether the given user has the necessary permission in order to be deputy.
string | $user_id | user ID to check |
isDefaultDeputyActivated | ( | ) |
Checks if persons may be assigned as default deputy of other persons.
isDeputy | ( | $user_id, | |
$range_id, | |||
$check_edit_about = false |
|||
) |
Checks whether the given person is a deputy in the given context (course or person).
string | $user_id | person ID to check |
string | $range_id | course or person ID |
boolean | $check_edit_about | check if the given person may edit the other person's profile |
isDeputyEditAboutActivated | ( | ) |
Checks if default deputies may get the rights to edit their bosses profile page.
setDeputyHomepageRights | ( | $user_id, | |
$range_id, | |||
$rights | |||
) |
Set whether the given person my edit the bosses profile page.
string | $user_id | person ID to grant or remove rights |
string | $range_id | which person's profile are we talking about? |
int | $rights | editing allowed? 0 or 1 |