39 $this->
ctrl = $DIC->ctrl();
43 $this->orgu_ref_id = filter_input(INPUT_GET,
"ref_id", FILTER_SANITIZE_NUMBER_INT);
62 $this->
addColumn($this->
lng->txt(
"firstname"),
"first_name");
63 $this->
addColumn($this->
lng->txt(
"lastname"),
"last_name");
72 $access = $DIC[
'ilAccess'];
77 $parent = (
int) $orgu_tree->getParent($this->orgu_ref_id);
79 while ($parent !== $root) {
82 self::$permission_access_staff_recursive,
83 $orgu_tree->getAllChildren($parent)
86 $parent = (
int) $orgu_tree->getParent($parent);
89 foreach ($orgu_tree->getAllChildren($this->orgu_ref_id) as
$ref_id) {
90 $recursive = in_array(
$ref_id, self::$permission_access_staff_recursive);
96 self::$permission_access_staff_recursive,
97 $orgu_tree->getAllChildren(
$ref_id)
105 foreach ($orgu_tree->getAssignements(
$ref_id, $this->ilOrgUnitPosition) as $usr_id) {
106 $usr_id = (
int) $usr_id;
107 if (!array_key_exists($usr_id,
$data)) {
110 'login' => $user->getLogin(),
111 'first_name' => $user->getFirstname(),
112 'last_name' => $user->getLastname(),
113 'user_id' => $usr_id,
114 'active' => $user->getActive(),
115 'orgu_assignments' => [],
118 $data[$usr_id] = $set;
123 $data[$usr_id][
'view_lp'] = $permission_view_lp ||
$data[$usr_id][
'view_lp'];
132 if ($access->
checkAccess(
"view_learning_progress",
"", $ref_id)) {
137 $checked_children = [];
138 while ($current !== $root) {
139 if (!array_key_exists($current, self::$permission_view_lp_recursive)) {
140 self::$permission_view_lp_recursive[$current]
141 = $access->
checkAccess(
"view_learning_progress_rec",
"", $current);
143 if (self::$permission_view_lp_recursive[$current]) {
145 foreach ($checked_children as $child) {
146 self::$permission_view_lp_recursive[$child] =
true;
151 $checked_children[] = $current;
163 $ilAccess = $DIC[
'ilAccess'];
164 $this->tpl->setVariable(
"LOGIN", $a_set[
"login"]);
165 $this->tpl->setVariable(
"FIRST_NAME", $a_set[
"first_name"]);
166 $this->tpl->setVariable(
"LAST_NAME", $a_set[
"last_name"]);
167 if($a_set[
"active"] ===
false) {
168 $this->tpl->setVariable(
"INACTIVE", $this->
lng->txt(
'usr_account_inactive'));
171 $orgus = $a_set[
'orgu_assignments'];
173 $this->tpl->setVariable(
"ORG_UNITS", implode(
',', $orgus));
174 $this->
ctrl->setParameterByClass(ilOrgUnitUserAssignmentGUI::class,
'usr_id', $a_set[
"user_id"]);
175 $this->
ctrl->setParameterByClass(
176 ilOrgUnitUserAssignmentGUI::class,
181 $selection->setListTitle(
$lng->
txt(
"Actions"));
182 $selection->setId(
"selection_list_user_lp_" . $a_set[
"user_id"]);
183 if ($a_set[
'view_lp']
188 $lng->
txt(
"show_learning_progress"),
189 "show_learning_progress",
190 $this->
ctrl->getLinkTargetByClass(array(
191 ilAdministrationGUI::class,
192 ilObjOrgUnitGUI::class,
193 ilLearningProgressGUI::class,
197 if ($ilAccess->checkAccess(
"write",
"",
$_GET[
"ref_id"])) {
200 $this->tpl->setVariable(
"ACTIONS", $selection->getHTML());
static _checkAccessStaffRec(int $ref_id)
static array $permission_access_staff_recursive
setTopCommands(bool $a_val)
mayViewLPIn(int $ref_id, ilAccess $access, ilObjOrgUnitTree $orgu_tree)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
setShowTemplates(bool $a_value)
__construct(BaseCommands $parent_obj, string $parent_cmd, ilOrgUnitPosition $position)
setFormName(string $a_name="")
addItem(string $a_title, string $a_value="", string $a_link="", string $a_img="", string $a_alt="", string $a_frame="", string $a_html="", bool $a_prevent_background_click=false, string $a_onclick="", string $a_ttip="", string $a_tt_my="right center", string $a_tt_at="left center", bool $a_tt_use_htmlspecialchars=true, array $a_data=array())
static _lookupObjId(int $ref_id)
static _enabledUserRelatedData()
static _enabledLearningProgress()
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
const CMD_CONFIRM_RECURSIVE
addActions(ilAdvancedSelectionListGUI $selection)
static _checkAccessStaff(int $ref_id)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
Class ilOrgUnitRecursiveUserAssignmentTableGUI.
static array $permission_view_lp_recursive
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
setEnableHeader(bool $a_enableheader)
static _lookupActive(int $a_usr_id)
ilOrgUnitPosition $ilOrgUnitPosition
setPrefix(string $a_prefix)