ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
getEmployees (int $ref_id, bool $recursive=false) | |
getAssignements (int $ref_id, ilOrgUnitPosition $ilOrgUnitPosition) | |
getSuperiors (int $ref_id, bool $recursive=false) | |
getAllChildren (int $ref_id) | |
getOrgusWhereUserHasPermissionForOperation ($operation) | |
If you want to have all orgunits where the current user has the write permission: use this with the parameter "write". More... | |
getOrgusWhereUserHasPermissionForOperationId (string $operation_id) | |
If you want to have all orgunits where the current user has the write permission: use this with the parameter 3 (3 is the "write" permission as in rbac_operations). More... | |
getAllOrgunitsOnLevelX (int $level) | |
getEmployeesUnderUser (int $user_id, bool $recursive=true) | |
getSuperiorsOfUser (int $user_id, bool $recursive=true) | |
getLevelXOfUser (int $user_id, int $level) | |
for additional info see the other getLevelX method. More... | |
getOrgUnitOfUser (int $user_id) | |
buildTempTableWithUsrAssignements (string $temporary_table_name='orgu_usr_assignements') | |
Creates a temporary table with all orgu/user assignements. More... | |
dropTempTable (string $temporary_table_name) | |
getTitles (array $org_refs) | |
getEmployeeRoles () | |
getSuperiorRoles () | |
flushCache () | |
getLevelXOfTreenode (int $orgu_ref, int $level) | |
Specify eg. More... | |
getParent (int $orgu_ref) | |
Static Public Member Functions | |
static | _getInstance () |
Static Protected Attributes | |
static string | $temporary_table_name_getOrgUnitOfUser = null |
static string | $temporary_table_name = null |
static ilObjOrgUnitTree | $instance = null |
Private Member Functions | |
__construct () | |
loadArrayOfStaff (string $title, array $ref_ids) | |
getChildren (int $ref_id) | |
loadChildren (int $ref_id) | |
loadRoles (string $role) | |
loadRolesQuery (string $role) | |
getRefIdFromRoleTitle (string $role_title) | |
Private Attributes | |
array | $roles |
array | $role_to_orgu |
$staff | |
array | $tree_childs = [] |
array | $parent = [] |
ilDBInterface | $db |
ilObjUser | $ilUser |
ilTree | $tree |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilObjOrgUnitTree Implements a singleton pattern for caching.
Definition at line 25 of file class.ilObjOrgUnitTree.php.
|
private |
|
static |
Definition at line 54 of file class.ilObjOrgUnitTree.php.
Referenced by ilOrgUnitExtension\__construct(), ilLikeUserOrgUnitSearch\__construct(), ilObjOrgUnitAccess\_checkAccessToUserLearningProgress(), ilOrgUnitStaffTableGUI\fillRow(), ilOrgUnitUserAssignmentQueries\getOrgUnitIdsOfUsersPosition(), OrgUnit\Positions\UserAssignment\ilOrgUnitUserAssignmentRepository\getOrgUnitIdsOfUsersPosition(), ilStudyProgrammeMembershipSourceReaderFactory\getReaderFor(), ilOrgUnitStaffTableGUI\getRowForUser(), ilOrgUnitPathStorage\getTextRepresentationOfOrgUnits(), ilOrgUnitRecursiveUserAssignmentTableGUI\loadData(), ilGroupParticipantsTableGUI\parse(), ilCourseParticipantsTableGUI\parse(), ilOrgUnitUserAssignmentTableGUI\parseData(), ilOrgUnitStaffTableGUI\parseData(), and ilOrgUnitPathStorage\store().
ilObjOrgUnitTree::buildTempTableWithUsrAssignements | ( | string | $temporary_table_name = 'orgu_usr_assignements' | ) |
Creates a temporary table with all orgu/user assignements.
there will be three columns in the table orgu_usr_assignements (or specified table-name): ref_id: Reference-IDs of OrgUnits user_id: Assigned User-IDs path: Path-representation of the OrgUnit Usage:
string | $temporary_table_name |
ilException |
Definition at line 401 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name, and dropTempTable().
ilObjOrgUnitTree::dropTempTable | ( | string | $temporary_table_name | ) |
Definition at line 426 of file class.ilObjOrgUnitTree.php.
References $temporary_table_name.
Referenced by buildTempTableWithUsrAssignements().
ilObjOrgUnitTree::flushCache | ( | ) |
Definition at line 477 of file class.ilObjOrgUnitTree.php.
ilObjOrgUnitTree::getAllChildren | ( | int | $ref_id | ) |
Definition at line 159 of file class.ilObjOrgUnitTree.php.
References getChildren().
Referenced by getEmployees(), getEmployeesUnderUser(), and getSuperiors().
ilObjOrgUnitTree::getAllOrgunitsOnLevelX | ( | int | $level | ) |
Definition at line 267 of file class.ilObjOrgUnitTree.php.
References getChildren(), and ilObjOrgUnit\getRootOrgRefId().
ilObjOrgUnitTree::getAssignements | ( | int | $ref_id, |
ilOrgUnitPosition | $ilOrgUnitPosition | ||
) |
Definition at line 90 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\getId(), and ActiveRecord\where().
Referenced by getEmployees(), and getSuperiors().
|
private |
Definition at line 248 of file class.ilObjOrgUnitTree.php.
References $ref_id, and loadChildren().
Referenced by getAllChildren(), and getAllOrgunitsOnLevelX().
ilObjOrgUnitTree::getEmployeeRoles | ( | ) |
Definition at line 454 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getEmployees | ( | int | $ref_id, |
bool | $recursive = false |
||
) |
int | $ref_id | the reference id of the organisational unit. |
bool | $recursive | if true you get the ids of the subsequent orgunits employees too |
Definition at line 67 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, getAllChildren(), getAssignements(), ilOrgUnitPosition\getCorePosition(), and ilOrgUnitUserAssignmentQueries\getInstance().
ilObjOrgUnitTree::getEmployeesUnderUser | ( | int | $user_id, |
bool | $recursive = true |
||
) |
bool | $recursive | if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 290 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_EMPLOYEE, ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAllChildren(), and ilOrgUnitUserAssignmentQueries\getInstance().
ilObjOrgUnitTree::getLevelXOfTreenode | ( | int | $orgu_ref, |
int | $level | ||
) |
Specify eg.
level 1 and it will return on which orgunit on the first level after the root node the specified orgu_ref is a subunit of. eg: 0
Exception | in case there's a thread of an infinite loop or if you try to fetch the third level but there are only two (e.g. you want to fetch lvl 1 but give the root node as reference). |
Definition at line 517 of file class.ilObjOrgUnitTree.php.
References getParent(), and ilObjOrgUnit\getRootOrgRefId().
Referenced by getLevelXOfUser().
ilObjOrgUnitTree::getLevelXOfUser | ( | int | $user_id, |
int | $level | ||
) |
for additional info see the other getLevelX method.
int | $user_id |
Definition at line 348 of file class.ilObjOrgUnitTree.php.
References Vendor\Package\$e, $res, and getLevelXOfTreenode().
ilObjOrgUnitTree::getOrgUnitOfUser | ( | int | $user_id | ) |
int | $ref_id | if given, only OrgUnits under this ID are returned (including $ref_id) |
Definition at line 377 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitUserAssignmentQueries\getInstance().
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperation | ( | $operation | ) |
If you want to have all orgunits where the current user has the write permission: use this with the parameter "write".
Definition at line 181 of file class.ilObjOrgUnitTree.php.
References $res.
ilObjOrgUnitTree::getOrgusWhereUserHasPermissionForOperationId | ( | string | $operation_id | ) |
If you want to have all orgunits where the current user has the write permission: use this with the parameter 3 (3 is the "write" permission as in rbac_operations).
Definition at line 220 of file class.ilObjOrgUnitTree.php.
References $res.
ilObjOrgUnitTree::getParent | ( | int | $orgu_ref | ) |
Definition at line 541 of file class.ilObjOrgUnitTree.php.
Referenced by getLevelXOfTreenode(), and ilOrgUnitRecursiveUserAssignmentTableGUI\mayViewLPIn().
|
private |
Definition at line 494 of file class.ilObjOrgUnitTree.php.
Referenced by loadRolesQuery().
ilObjOrgUnitTree::getSuperiorRoles | ( | ) |
Definition at line 463 of file class.ilObjOrgUnitTree.php.
References loadRoles().
ilObjOrgUnitTree::getSuperiors | ( | int | $ref_id, |
bool | $recursive = false |
||
) |
int | $ref_id | the reference id of the organisational unit. |
bool | $recursive | if true you get the ids of the subsequent orgunits superiors too |
Definition at line 103 of file class.ilObjOrgUnitTree.php.
References ilOrgUnitPosition\CORE_POSITION_SUPERIOR, getAllChildren(), getAssignements(), and ilOrgUnitPosition\getCorePosition().
Referenced by getSuperiorsOfUser().
ilObjOrgUnitTree::getSuperiorsOfUser | ( | int | $user_id, |
bool | $recursive = true |
||
) |
bool | $recursive | if this is true subsequent orgunits of this users superior role get searched as well. |
Definition at line 322 of file class.ilObjOrgUnitTree.php.
References $res, and getSuperiors().
ilObjOrgUnitTree::getTitles | ( | array | $org_refs | ) |
Definition at line 441 of file class.ilObjOrgUnitTree.php.
References ilObject\_lookupObjId(), and ilObject\_lookupTitle().
|
private |
string | $title | "employee" or "superior" |
int[] | $ref_ids array of orgu object ref ids. |
Definition at line 127 of file class.ilObjOrgUnitTree.php.
References $id, $ref_id, $res, and loadRoles().
|
private |
Definition at line 254 of file class.ilObjOrgUnitTree.php.
References $ref_id.
Referenced by getChildren().
|
private |
Definition at line 470 of file class.ilObjOrgUnitTree.php.
References loadRolesQuery().
Referenced by getEmployeeRoles(), getSuperiorRoles(), and loadArrayOfStaff().
|
private |
Definition at line 482 of file class.ilObjOrgUnitTree.php.
References $res, and getRefIdFromRoleTitle().
Referenced by loadRoles().
|
private |
Definition at line 40 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 41 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 29 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 39 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 33 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 31 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 35 of file class.ilObjOrgUnitTree.php.
|
staticprotected |
Definition at line 28 of file class.ilObjOrgUnitTree.php.
Referenced by buildTempTableWithUsrAssignements(), and dropTempTable().
|
staticprotected |
Definition at line 27 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 42 of file class.ilObjOrgUnitTree.php.
|
private |
Definition at line 37 of file class.ilObjOrgUnitTree.php.