19 declare(strict_types=1);
61 protected \ILIAS\DI\LoggingServices
$ilLog;
67 $this->ilLocator = $DIC[
'ilLocator'];
68 $this->tree = $DIC->repositoryTree();
69 $this->
toolbar = $DIC->toolbar();
70 $this->
ilLog = $DIC->logger();
71 $this->
ilias = $DIC[
'ilias'];
77 $to_int =
$dic[
'refinery']->kindlyTo()->int();
78 $this->ref_id =
$dic[
'query']->retrieve(
'ref_id', $to_int);
83 $this->
lng->loadLanguageModule(
"orgu");
85 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
86 OrgUnitToolProvider::SHOW_ORGU_TREE,
98 $cmd = $this->
ctrl->getCmd();
99 $next_class = $this->
ctrl->getNextClass($this);
100 parent::prepareOutput();
102 switch ($next_class) {
103 case 'ilorgunitglobalsettingsgui':
104 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
106 $this->
ctrl->forwardCommand($global_settings);
108 case "illocalusergui":
110 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
111 $this->
ctrl->redirect($this);
113 $this->tabs_gui->activateTab(
'administrate_users');
115 $this->
ctrl->forwardCommand($ilLocalUserGUI);
117 case "ilorgunitsimpleimportgui":
118 $this->tabs_gui->activateTab(
"view");
120 $this->tabs_gui->setSubTabActive(
'import');
122 $this->
ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
124 case "ilorgunitsimpleuserimportgui":
126 $this->
ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
131 $ilObjUserGUI =
new ilObjUserGUI(
"", $this->ref_id,
true,
false);
132 $ilObjUserGUI->setCreationMode(
true);
133 $this->
ctrl->forwardCommand($ilObjUserGUI);
134 $this->tabs_gui->setBackTarget(
135 $this->
lng->txt(
"back"),
136 $this->
ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
140 $ilObjUserGUI =
new ilObjUserGUI(
"", $this->ref_id,
true,
false);
141 $ilObjUserGUI->setCreationMode(
true);
142 $this->
ctrl->forwardCommand($ilObjUserGUI);
143 $this->tabs_gui->clearTargets();
144 $this->tabs_gui->setBackTarget(
145 $this->
lng->txt(
"back"),
146 $this->
ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
152 $ilObjUserGUI->setCreationMode(
false);
153 $this->
ctrl->forwardCommand($ilObjUserGUI);
154 $this->tabs_gui->clearTargets();
155 $this->tabs_gui->setBackTarget(
156 $this->
lng->txt(
"back"),
157 $this->
ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
161 $this->
ctrl->redirectByClass(
"illocalusergui",
"index");
165 case "ilobjuserfoldergui":
168 $this->
ctrl->redirectByClass(
"illocalusergui",
"index");
172 $ilObjUserFolderGUI->setUserOwnerId($this->ref_id);
173 $ilObjUserFolderGUI->setCreationMode(
true);
174 $this->
ctrl->forwardCommand($ilObjUserFolderGUI);
175 $this->tabs_gui->clearTargets();
176 $this->tabs_gui->setBackTarget(
177 $this->
lng->txt(
"back"),
178 $this->
ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
183 case "ilinfoscreengui":
184 $this->tabs_gui->activateTab(
"info_short");
189 ) and !$this->
ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
190 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->MESSAGE);
198 $this->
object->getOrgUnitTypeId()
202 $this->
ctrl->forwardCommand($info);
204 case 'ilpermissiongui':
205 $this->tabs_gui->activateTab(
'perm_settings');
207 $this->
ctrl->forwardCommand($ilPermissionGUI);
209 case "ilcommonactiondispatchergui":
213 case 'illearningprogressgui':
214 case 'illplistofprogressgui':
215 $this->tabs_gui->clearTargets();
216 $this->tabs_gui->setBackTarget(
217 $this->
lng->txt(
'backto_staff'),
218 $this->
ctrl->getLinkTargetByClass(
219 ilOrgUnitUserAssignmentGUI::class,
224 $this->
object->getRefid(),
227 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
228 $this->
ctrl->redirectByClass(
"ilOrgUnitUserAssignmentGUI",
"index");
230 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
231 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
237 $this->
ctrl->forwardCommand($new_gui);
239 case 'ilorgunitexportgui':
241 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
242 $this->
ctrl->redirect($this);
244 $this->tabs_gui->activateTab(self::TAB_EXPORT);
246 $ilOrgUnitExportGUI->addFormat(
'xml');
247 $this->
ctrl->forwardCommand($ilOrgUnitExportGUI);
249 case strtolower(ilObjectTranslationGUI::class):
250 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
253 $translations_gui->supportContentTranslation(
false);
254 $this->
ctrl->forwardCommand($translations_gui);
256 case strtolower(ilOrgUnitTypeGUI::class):
257 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
259 $this->
ctrl->forwardCommand($types_gui);
261 case strtolower(ilOrgUnitPositionGUI::class):
262 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
264 $this->
ctrl->forwardCommand($types_gui);
266 case strtolower(ilOrgUnitUserAssignmentGUI::class):
267 $this->tabs_gui->activateTab(self::TAB_STAFF);
269 $this->
ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
271 case strtolower(ilPropertyFormGUI::class):
284 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
297 case 'performPasteIntoMultipleObjects':
300 case 'keepObjectsInClipboard':
304 parent::createObject();
307 parent::saveObject();
310 $this->tabs_gui->clearTargets();
311 $this->tabs_gui->setBackTarget($this->
lng->txt(
"back"), $this->
ctrl->getLinkTarget($this));
314 case 'confirmedDelete':
318 $this->tabs_gui->clearTargets();
319 $this->tabs_gui->setBackTarget($this->
lng->txt(
"back"), $this->
ctrl->getLinkTarget($this));
323 parent::clearObject();
325 case 'enableAdministrationPanel':
326 parent::enableAdministrationPanelObject();
328 case 'disableAdministrationPanel':
329 parent::disableAdministrationPanelObject();
331 case 'getAsynchItemList':
332 parent::getAsynchItemListObject();
334 case self::CMD_EDIT_SETTINGS:
335 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
339 case 'updateSettings':
340 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
344 case 'editAdvancedSettings':
345 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
349 case 'updateAdvancedSettings':
350 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
357 case 'cancelMoveLink':
367 $new_object->writePath();
368 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
369 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
373 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS,
"")
379 if (!$this->rbacsystem->checkAccess(
"read", $this->ref_id)) {
380 if ($this->rbacsystem->checkAccess(
"visible", $this->ref_id)) {
381 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"msg_no_perm_read"));
382 $this->
ctrl->redirectByClass(
'ilinfoscreengui',
'');
385 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
392 $this->
tabs->activateSubTab(
"manage");
394 $this->
tabs->activateSubTab(
"view_content");
399 if (! $this->
ctrl->isAsynch()) {
404 $container_view->setOutput();
407 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
408 $this->tabs_gui->removeSubTab(
"page_editor");
409 $this->tabs_gui->removeSubTab(
"ordering");
432 $gui->setCreationUrl($this->
ctrl->getLinkTarget($this,
'create'));
441 # all possible create permissions 442 parent::setTitleAndDescription();
443 if ($this->
object->getTitle() ===
"__OrgUnitAdministration") {
444 $this->tpl->setTitle($this->
lng->txt(
"objs_orgu"));
445 $this->tpl->setDescription($this->
lng->txt(
"objs_orgu"));
449 if ($this->
ilias->getSetting(
'custom_icons')) {
451 $icon_file = (isset($icons_cache[$this->
object->getId()])) ? $icons_cache[$this->
object->getId()] :
'';
453 $this->tpl->setTitleIcon($icon_file, $this->
lng->txt(
"obj_" . $this->object->getType()));
462 foreach ((array)
$path as
$key => $row) {
463 if ($row[
"title"] ===
"__OrgUnitAdministration") {
464 $row[
"title"] = $this->
lng->txt(
"objs_orgu");
466 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $row[
"child"]);
467 $this->ilLocator->addItem(
469 $this->
ctrl->getLinkTargetByClass(
"ilobjorgunitgui",
"view"),
473 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $this->ref_id);
480 if ($obj_type !==
"orgu") {
481 parent::redirectToRefId($ref_id, $cmd);
483 $this->
ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $ref_id);
484 $this->
ctrl->redirectByClass(
"ilObjOrgUnitGUI", $cmd);
490 $read_access_ref_id = $this->rbacsystem->checkAccess(
'visible', $this->
object->getRefId())
491 && $this->rbacsystem->checkAccess(
'read', $this->object->getRefId());
492 if ($read_access_ref_id) {
493 $this->tabs_gui->addTab(
494 self::TAB_VIEW_CONTENT,
495 $this->
lng->txt(
"content"),
496 $this->
ctrl->getLinkTarget($this,
"")
498 $this->tabs_gui->addTab(
501 $this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
508 $this->tabs_gui->addTab(
510 $this->
lng->txt(self::TAB_STAFF),
511 $this->
ctrl->getLinkTargetByClass(
512 ilOrgUnitUserAssignmentGUI::class,
518 $this->tabs_gui->addTab(
520 $this->
lng->txt(self::TAB_SETTINGS),
521 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
525 $this->tabs_gui->addTab(
526 "administrate_users",
527 $this->
lng->txt(
"administrate_users"),
528 $this->
ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index")
535 $this->tabs_gui->addTab(
536 self::TAB_GLOBAL_SETTINGS,
537 $this->
lng->txt(
'settings'),
538 $this->
ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class)
541 $this->tabs_gui->addTab(
543 $this->
lng->txt(self::TAB_EXPORT),
544 $this->
ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class)
549 $this->tabs_gui->addTab(
550 self::TAB_ORGU_TYPES,
551 $this->
lng->txt(self::TAB_ORGU_TYPES),
552 $this->
ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class)
554 $this->tabs_gui->addTab(
556 $this->
lng->txt(self::TAB_POSITIONS),
557 $this->
ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class)
566 $next_class = $this->
ctrl->getNextClass($this);
567 $cmd = $this->
ctrl->getCmd();
568 $this->tabs_gui->addSubTab(
570 $this->
lng->txt(self::TAB_SETTINGS),
571 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
573 $this->tabs_gui->addSubTab(
575 $this->
lng->txt(
"obj_multilinguality"),
576 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"listTranslations")
579 $ilOrgUnitType = $this->
object->getOrgUnitType();
581 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
582 $this->tabs_gui->addSubTab(
583 'edit_advanced_settings',
584 $this->
lng->txt(
'orgu_adv_settings'),
585 $this->
ctrl->getLinkTarget($this,
'editAdvancedSettings')
590 $this->tabs_gui->setSubTabActive($active_tab_id);
591 switch ($next_class) {
592 case 'iltranslationgui':
593 $this->tabs_gui->setSubTabActive(
"edit_translations");
597 case self::CMD_EDIT_SETTINGS:
598 $this->tabs_gui->setSubTabActive(
'edit_settings');
600 case 'editAdvancedSettings':
601 case 'updateAdvancedSettings':
602 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
613 $ref_id = $this->
object->getRefId();
614 $may_create_orgus = $this->
ilAccess->checkAccess(
"create_orgu",
"",
$ref_id,
'orgu');
619 $this->tabs_gui->addSubTab(
621 $this->
lng->txt(
"import"),
622 $this->
ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"chooseImport")
645 if ($this->
ilAccess->checkAccess(
"write",
"", $this->ref_id) ===
false) {
646 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
647 $this->
ctrl->redirect($this);
655 $this->
object->getOrgUnitTypeId()
667 if (!$this->
ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
668 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
669 $this->
ctrl->redirect($this);
677 $this->
object->getOrgUnitTypeId()
682 if (
$gui->importEditFormPostValues()) {
683 $gui->writeEditForm();
684 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
685 $this->
ctrl->redirect($this,
'editAdvancedSettings');
693 if (!$this->
ilAccess->checkAccess(
'write',
"", $this->ref_id)) {
694 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
695 $this->
ctrl->redirect($this);
703 if (!$this->
ilAccess->checkAccess(
'write',
'', $this->ref_id)) {
704 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
705 $this->
ctrl->redirect($this);
708 if (
$form->saveObject()) {
709 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
710 $this->
ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
718 parent::showAdministrationPanel();
720 if (empty($this->
toolbar->items) ===
false) {
722 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy" 723 || $item[
"cmd"] ==
"download" 734 $ilCtrl = $DIC[
'ilCtrl'];
735 $ilCtrl->setTargetScript(
'ilias.php');
736 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $ref_id);
737 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode", self::TAB_SETTINGS);
738 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode", self::TAB_SETTINGS);
739 $ilCtrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI"),
"view");
745 $explorer->setAjax(
false);
746 $explorer->setSelectMode(
'nodes[]',
false);
761 if ($this->clipboard->getCmd() !=
'cut') {
762 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
765 if ($this->clipboard->hasEntries()) {
769 $this->
ctrl->returnToParent($this);
786 $ids = filter_input(INPUT_POST,
'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
787 if (count($ids) > 0) {
789 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
791 $this->
ctrl->returnToParent($this);
805 if (isset($_POST[
"id"]) && is_array($_POST[
'id']) && count($_POST[
'id']) > 0) {
806 $arr_ref_ids = $_POST[
'id'];
807 } elseif (isset(
$_GET[
'item_ref_id']) && (
int)
$_GET[
'item_ref_id'] > 0) {
808 $arr_ref_ids = [(
int)
$_GET[
'item_ref_id']];
811 if (!$ru->showDeleteConfirmation($arr_ref_ids,
false)) {
812 $ilCtrl->returnToParent($this);
static getIconsCache()
Returns an array that maps from OrgUnit object IDs to its icon defined by the assigned OrgUnit type...
initImportForm(string $new_type)
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _checkAccessSettings(int $ref_id)
Class ilOrgUnitUserAssignmentGUI.
Class ilOrgUnitPositionGUI.
setSubTabsSettings(string $active_tab_id)
static _checkAccessExport(int $ref_id)
static _checkAccessAdministrateUsers(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitSimpleImportGUI.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitExportGUI.
afterSave(ilObject $new_object)
isActiveAdministrationPanel()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
importFileObject(int $parent_id=null)
initCreationForms(string $new_type)
initCreationForms We override the method of class.ilObjectGUI because we have no copy functionality a...
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
const MODE_ADMINISTRATION
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link...
addAdminLocatorItems(bool $do_not_add_object=false)
updateAdvancedSettings()
Update Advanced Metadata.
ilAccessHandler $ilAccess
setTitleAndDescription()
called by prepare output
Repository GUI Utilities.
deleteObject(bool $error=false)
Display deletion confirmation screen for Org Units.
header include for all ilias files.
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
doUserAutoCompleteObject()
editAdvancedSettings()
Edit Advanced Metadata.
const LP_CONTEXT_ORG_UNIT
static removeObjectsFromSystem(array $a_ref_ids, bool $a_from_recovery_folder=false)
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
static _checkAccessStaff(int $ref_id)
static _goto(string $ref_id)
static redirect(string $a_script)
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
static _checkAccessToUserLearningProgress(int $ref_id, int $usr_id)
performPasteIntoMultipleObjectsObject()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Explorer class that works on tree objects (Services/Tree)
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
initCreateForm(string $new_type)
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
ILIAS DI LoggingServices $ilLog
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
showAdministrationPanel()
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
redirectToRefId(int $ref_id, string $cmd="")
const TAB_GLOBAL_SETTINGS
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
keepObjectsInClipboardObject()
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
GUI class for object translation handling.
getTreeSelectorGUI(string $cmd)