19declare(strict_types=1);
62 protected \ILIAS\DI\LoggingServices
$ilLog;
68 $this->ilLocator =
$DIC[
'ilLocator'];
69 $this->tree =
$DIC->repositoryTree();
70 $this->
toolbar = $DIC->toolbar();
72 $this->
ilias = $DIC[
'ilias'];
78 $to_int =
$dic[
'refinery']->kindlyTo()->int();
79 $this->ref_id =
$dic[
'query']->retrieve(
'ref_id', $to_int);
84 $this->
lng->loadLanguageModule(
"orgu");
86 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
87 OrgUnitToolProvider::SHOW_ORGU_TREE,
99 $cmd = $this->
ctrl->getCmd();
100 $next_class = $this->
ctrl->getNextClass($this);
101 parent::prepareOutput();
103 switch ($next_class) {
104 case 'ilorgunitglobalsettingsgui':
105 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
107 $this->
ctrl->forwardCommand($global_settings);
109 case "illocalusergui":
111 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
112 $this->
ctrl->redirect($this);
114 $this->tabs_gui->activateTab(
'administrate_users');
116 $this->
ctrl->forwardCommand($ilLocalUserGUI);
118 case "ilorgunitsimpleimportgui":
119 $this->tabs_gui->activateTab(
"view");
121 $this->tabs_gui->setSubTabActive(
'import');
123 $this->
ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
125 case "ilorgunitsimpleuserimportgui":
127 $this->
ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
132 $ilObjUserGUI =
new ilObjUserGUI(
"", $this->ref_id,
true,
false);
133 $ilObjUserGUI->setCreationMode(
true);
134 $this->
ctrl->forwardCommand($ilObjUserGUI);
135 $this->tabs_gui->setBackTarget(
136 $this->
lng->txt(
"back"),
137 $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
141 $ilObjUserGUI =
new ilObjUserGUI(
"", $this->ref_id,
true,
false);
142 $ilObjUserGUI->setCreationMode(
true);
143 $this->
ctrl->forwardCommand($ilObjUserGUI);
144 $this->tabs_gui->clearTargets();
145 $this->tabs_gui->setBackTarget(
146 $this->
lng->txt(
"back"),
147 $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
153 $ilObjUserGUI->setCreationMode(
false);
154 $this->
ctrl->forwardCommand($ilObjUserGUI);
155 $this->tabs_gui->clearTargets();
156 $this->tabs_gui->setBackTarget(
157 $this->
lng->txt(
"back"),
158 $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
162 $this->
ctrl->redirectByClass(
"illocalusergui",
"index");
166 case "ilobjuserfoldergui":
169 $this->
ctrl->redirectByClass(
"illocalusergui",
"index");
173 $ilObjUserFolderGUI->setUserOwnerId($this->ref_id);
174 $ilObjUserFolderGUI->setCreationMode(
true);
175 $this->
ctrl->forwardCommand($ilObjUserFolderGUI);
176 $this->tabs_gui->clearTargets();
177 $this->tabs_gui->setBackTarget(
178 $this->
lng->txt(
"back"),
179 $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index')
184 case "ilinfoscreengui":
185 $this->tabs_gui->activateTab(
"info_short");
190 ) and !$this->ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
191 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
199 $this->object->getOrgUnitTypeId()
201 $amd_gui->setInfoObject(
$info);
205 case 'ilpermissiongui':
206 $this->tabs_gui->activateTab(
'perm_settings');
208 $this->
ctrl->forwardCommand($ilPermissionGUI);
210 case "ilcommonactiondispatchergui":
214 case 'illearningprogressgui':
215 case 'illplistofprogressgui':
216 $this->tabs_gui->clearTargets();
217 $this->tabs_gui->setBackTarget(
218 $this->
lng->txt(
'backto_staff'),
219 $this->ctrl->getLinkTargetByClass(
220 ilOrgUnitUserAssignmentGUI::class,
225 $this->
object->getRefid(),
226 (
int)
$_GET[
'obj_id']
228 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
229 $this->
ctrl->redirectByClass(
"ilOrgUnitUserAssignmentGUI",
"index");
231 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
232 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
236 (
int)
$_GET[
'obj_id']
238 $this->
ctrl->forwardCommand($new_gui);
240 case 'ilorgunitexportgui':
242 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
243 $this->
ctrl->redirect($this);
245 $this->tabs_gui->activateTab(self::TAB_EXPORT);
247 $ilOrgUnitExportGUI->addFormat(
'xml');
248 $this->
ctrl->forwardCommand($ilOrgUnitExportGUI);
250 case strtolower(TranslationGUI::class):
251 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
266 $translations_gui->supportContentTranslation(
false);
267 $this->
ctrl->forwardCommand($translations_gui);
269 case strtolower(ilOrgUnitTypeGUI::class):
270 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
272 $this->
ctrl->forwardCommand($types_gui);
274 case strtolower(ilOrgUnitPositionGUI::class):
275 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
277 $this->
ctrl->forwardCommand($types_gui);
279 case strtolower(ilOrgUnitUserAssignmentGUI::class):
280 $this->tabs_gui->activateTab(self::TAB_STAFF);
282 $this->
ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
284 case strtolower(ilPropertyFormGUI::class):
297 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
311 case 'performPasteIntoMultipleObjects':
314 case 'keepObjectsInClipboard':
318 parent::createObject();
321 parent::saveObject();
324 $this->tabs_gui->clearTargets();
325 $this->tabs_gui->setBackTarget($this->
lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
328 case 'confirmedDelete':
332 $this->tabs_gui->clearTargets();
333 $this->tabs_gui->setBackTarget($this->
lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
337 parent::clearObject();
339 case 'enableAdministrationPanel':
340 parent::enableAdministrationPanelObject();
342 case 'disableAdministrationPanel':
343 parent::disableAdministrationPanelObject();
346 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
350 case 'updateSettings':
351 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
355 case 'editAdvancedSettings':
356 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
360 case 'updateAdvancedSettings':
361 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
365 case 'routeImportCmd':
368 case 'cancelMoveLink':
378 $new_object->writePath();
379 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
380 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
384 $this->
ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS,
"")
390 if (!$this->rbacsystem->checkAccess(
"read", $this->ref_id)) {
391 if ($this->rbacsystem->checkAccess(
"visible", $this->ref_id)) {
392 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"msg_no_perm_read"));
393 $this->
ctrl->redirectByClass(
'ilinfoscreengui',
'');
396 $this->
ilias->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->WARNING);
403 $this->
tabs->activateSubTab(
"manage");
405 $this->
tabs->activateSubTab(
"view_content");
408 $container_view->setOutput();
412 if (! $this->
ctrl->isAsynch()) {
417 $container_view->setOutput();
420 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
421 $this->tabs_gui->removeSubTab(
"page_editor");
422 $this->tabs_gui->removeSubTab(
"ordering");
428 if ($subtypes === []) {
434 array_keys($subtypes),
435 $this->
lng->txt(
'other'),
444 $subtypes = $this->obj_definition->getCreatableSubObjects(
447 $this->object->getRefId()
452 fn($key) => $this->
access->checkAccess(
'create_' . $key,
'', $this->ref_id, $this->type),
462 # all possible create permissions
463 parent::setTitleAndDescription();
464 if ($this->
object->getTitle() ===
"__OrgUnitAdministration") {
465 $this->tpl->setTitle($this->
lng->txt(
"objs_orgu"));
466 $this->tpl->setDescription($this->
lng->txt(
"objs_orgu"));
470 if ($this->
ilias->getSetting(
'custom_icons')) {
472 $icon_file = (isset($icons_cache[$this->
object->getId()])) ? $icons_cache[$this->
object->getId()] :
'';
474 $this->tpl->setTitleIcon($icon_file, $this->
lng->txt(
"obj_" . $this->object->getType()));
483 foreach ((array)
$path as $key => $row) {
484 if ($row[
"title"] ===
"__OrgUnitAdministration") {
485 $row[
"title"] = $this->
lng->txt(
"objs_orgu");
487 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $row[
"child"]);
488 $this->ilLocator->addItem(
490 $this->
ctrl->getLinkTargetByClass(
"ilobjorgunitgui",
"view"),
494 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $this->ref_id);
501 if ($obj_type !==
"orgu") {
502 parent::redirectToRefId(
$ref_id, $cmd);
504 $this->
ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $ref_id);
505 $this->
ctrl->redirectByClass(
"ilObjOrgUnitGUI", $cmd);
511 $read_access_ref_id = $this->rbacsystem->checkAccess(
'visible', $this->
object->getRefId())
512 && $this->rbacsystem->checkAccess(
'read', $this->
object->getRefId());
513 if ($read_access_ref_id) {
514 $this->tabs_gui->addTab(
515 self::TAB_VIEW_CONTENT,
516 $this->
lng->txt(
"content"),
517 $this->ctrl->getLinkTarget($this,
"")
519 $this->tabs_gui->addTab(
522 $this->
ctrl->getLinkTargetByClass([self::class, ilInfoScreenGUI::class],
"showSummary")
529 $this->tabs_gui->addTab(
531 $this->
lng->txt(self::TAB_STAFF),
532 $this->ctrl->getLinkTargetByClass(
533 [self::class, ilOrgUnitUserAssignmentGUI::class],
539 $this->tabs_gui->addTab(
541 $this->
lng->txt(self::TAB_SETTINGS),
542 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
546 $this->tabs_gui->addTab(
547 "administrate_users",
548 $this->
lng->txt(
"administrate_users"),
549 $this->ctrl->getLinkTargetByClass(
550 [self::class, ilLocalUserGUI::class],
559 $this->tabs_gui->addTab(
560 self::TAB_GLOBAL_SETTINGS,
561 $this->
lng->txt(
'settings'),
562 $this->ctrl->getLinkTargetByClass(
563 [self::class, ilOrgUnitGlobalSettingsGUI::class]
567 $this->tabs_gui->addTab(
569 $this->
lng->txt(self::TAB_EXPORT),
570 $this->ctrl->getLinkTargetByClass(
571 [self::class, ilOrgUnitExportGUI::class]
577 $this->tabs_gui->addTab(
578 self::TAB_ORGU_TYPES,
579 $this->
lng->txt(self::TAB_ORGU_TYPES),
580 $this->ctrl->getLinkTargetByClass(
581 [self::class, ilOrgUnitTypeGUI::class]
584 $this->tabs_gui->addTab(
586 $this->
lng->txt(self::TAB_POSITIONS),
587 $this->ctrl->getLinkTargetByClass(
588 [self::class, ilOrgUnitPositionGUI::class]
598 $next_class = $this->
ctrl->getNextClass($this);
599 $cmd = $this->
ctrl->getCmd();
600 $this->tabs_gui->addSubTab(
602 $this->
lng->txt(self::TAB_SETTINGS),
603 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
605 $this->tabs_gui->addSubTab(
607 $this->
lng->txt(
"obj_multilinguality"),
608 $this->ctrl->getLinkTargetByClass(TranslationGUI::class,
"listTranslations")
611 $ilOrgUnitType = $this->
object->getOrgUnitType();
613 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
614 $this->tabs_gui->addSubTab(
615 'edit_advanced_settings',
616 $this->
lng->txt(
'orgu_adv_settings'),
617 $this->ctrl->getLinkTarget($this,
'editAdvancedSettings')
622 $this->tabs_gui->setSubTabActive($active_tab_id);
623 switch ($next_class) {
624 case strtolower(TranslationGUI::class):
625 $this->tabs_gui->setSubTabActive(
"edit_translations");
630 $this->tabs_gui->setSubTabActive(
'edit_settings');
632 case 'editAdvancedSettings':
633 case 'updateAdvancedSettings':
634 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
645 $ref_id = $this->
object->getRefId();
651 $this->tabs_gui->addSubTab(
653 $this->
lng->txt(
"import"),
654 $this->ctrl->getLinkTargetByClass([self::class, ilOrgUnitSimpleImportGUI::class],
"chooseImport")
678 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
679 $this->
ctrl->redirect($this);
687 $this->object->getOrgUnitTypeId()
700 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
701 $this->
ctrl->redirect($this);
709 $this->object->getOrgUnitTypeId()
714 if (
$gui->importEditFormPostValues()) {
715 $gui->writeEditForm();
716 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
717 $this->
ctrl->redirect($this,
'editAdvancedSettings');
726 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
727 $this->
ctrl->redirect($this);
736 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
737 $this->
ctrl->redirect($this);
740 if (
$form->saveObject()) {
741 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
742 $this->
ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
750 parent::showAdministrationPanel();
752 if (empty($this->
toolbar->items) ===
false) {
753 foreach ($this->
toolbar->items as $key => $item) {
754 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy"
755 || $item[
"cmd"] ==
"download"
757 unset($this->
toolbar->items[$key]);
766 $ilCtrl =
$DIC[
'ilCtrl'];
767 $ilCtrl->setTargetScript(
'ilias.php');
768 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
769 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode", self::TAB_SETTINGS);
770 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode", self::TAB_SETTINGS);
771 $ilCtrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI"),
"view");
777 $explorer->setAjax(
false);
778 $explorer->setSelectMode(
'nodes[]',
false);
793 if ($this->clipboard->getCmd() !=
'cut') {
794 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
797 if ($this->clipboard->hasEntries()) {
801 $this->
ctrl->returnToParent($this);
818 $ids = filter_input(INPUT_POST,
'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
819 if (count($ids) > 0) {
821 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
823 $this->
ctrl->returnToParent($this);
838 $arr_ref_ids =
$_POST[
'id'];
839 } elseif (isset(
$_GET[
'item_ref_id']) && (
int)
$_GET[
'item_ref_id'] > 0) {
840 $arr_ref_ids = [(
int)
$_GET[
'item_ref_id']];
843 if (!$ru->showDeleteConfirmation($arr_ref_ids,
false)) {
844 $ilCtrl->returnToParent($this);
Render add new item selector.
GUI class for object translation handling.
Class ilAccessHandler Checks access for ILIAS objects.
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)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
ILIAS Container InternalGUIService $gui
isActiveAdministrationPanel()
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link.
performPasteIntoMultipleObjectsObject()
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
keepObjectsInClipboardObject()
Class ilCtrl provides processing control methods.
const LP_CONTEXT_ORG_UNIT
Class ilObjUserTrackingGUI.
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 _checkAccessToUserLearningProgress(int $ref_id, int $usr_id)
static _checkAccessAdministrateUsers(int $ref_id)
static _checkAccessExport(int $ref_id)
static _checkAccessSettings(int $ref_id)
static _checkAccessStaff(int $ref_id)
Class ilObjOrgUnit GUI class.
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
showAdministrationPanel()
ilAccessHandler $ilAccess
getTabs()
@abstract overwrite in derived GUI class of your object type
afterSave(ilObject $new_object)
Post (successful) object creation hook.
updateAdvancedSettings()
Update Advanced Metadata.
static _goto(string $ref_id)
redirectToRefId(int $ref_id, string $cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
getAdminTabs()
administration tabs show only permissions and trash folder
setTitleAndDescription()
called by prepare output
doUserAutoCompleteObject()
addAdminLocatorItems(bool $do_not_add_object=false)
should be overwritten to add object specific items (repository items are preloaded)
deleteObject(bool $error=false)
Display deletion confirmation screen for Org Units.
editAdvancedSettings()
Edit Advanced Metadata.
ILIAS DI LoggingServices $ilLog
showPossibleSubObjects()
show possible sub objects (pull down menu)
const TAB_GLOBAL_SETTINGS
getTreeSelectorGUI(string $cmd)
performPaste()
@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
setSubTabsSettings(string $active_tab_id)
getCreatableObjectTypes()
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
static getIconsCache()
Returns an array that maps from OrgUnit object IDs to its icon defined by the assigned OrgUnit type.
const MODE_ADMINISTRATION
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
buildGroup(string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
Class ilObject Basic functions for all objects.
static _lookupType(int $id, bool $reference=false)
Class ilOrgUnitExplorerGUI.
Class ilOrgUnitExportGUI.
Global orgunit settings GUI.
Class ilOrgUnitPositionGUI.
Class ilOrgUnitSimpleImportGUI.
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...
Class ilOrgUnitUserAssignmentGUI.
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() ...
Repository GUI Utilities.
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)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static redirect(string $a_script)
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Class ilObjForumAdministration.