60 protected \ILIAS\DI\LoggingServices
$ilLog;
66 $this->
ctrl = $DIC->ctrl();
68 $this->ilLocator =
$DIC[
'ilLocator'];
69 $this->tree =
$DIC->repositoryTree();
70 $this->
toolbar = $DIC->toolbar();
72 $this->
ilias = $DIC[
'ilias'];
80 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(
81 OrgUnitToolProvider::SHOW_ORGU_TREE,
93 $cmd = $this->
ctrl->getCmd();
94 $next_class = $this->
ctrl->getNextClass($this);
95 parent::prepareOutput();
97 switch ($next_class) {
98 case 'ilorgunitglobalsettingsgui':
99 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
101 $this->
ctrl->forwardCommand($global_settings);
103 case "illocalusergui":
105 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
106 $this->
ctrl->redirect($this);
108 $this->tabs_gui->activateTab(
'administrate_users');
110 $this->
ctrl->forwardCommand($ilLocalUserGUI);
112 case "ilorgunitsimpleimportgui":
113 $this->tabs_gui->activateTab(
"view");
115 $this->tabs_gui->setSubTabActive(
'import');
117 $this->
ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
119 case "ilorgunitsimpleuserimportgui":
121 $this->
ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
123 case "ilorgunitstaffgui":
124 case "ilrepositorysearchgui":
125 $this->tabs_gui->activateTab(self::TAB_STAFF);
127 $this->
ctrl->forwardCommand($ilOrgUnitStaffGUI);
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')
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((
int)
$_GET[
'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);
203 $this->
ctrl->forwardCommand($info);
205 case 'ilpermissiongui':
206 $this->tabs_gui->activateTab(
'perm_settings');
208 $this->
ctrl->forwardCommand($ilPermissionGUI);
210 case "ilcommonactiondispatchergui":
212 $this->
ctrl->forwardCommand($gui);
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(),
228 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
229 $this->
ctrl->redirectByClass(
"ilOrgUnitStaffGUI",
"showStaff");
231 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
232 $this->
ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
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(ilTranslationGUI::class):
251 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
254 $this->
ctrl->forwardCommand($ilTranslationGui);
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):
279 $gui->setPropertyForm(
$form);
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();
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",
$_GET[
"ref_id"])) {
380 if ($this->rbacsystem->checkAccess(
"visible",
$_GET[
"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");
397 $container_view->setOutput();
399 $this->adminCommands = $container_view->adminCommands;
403 if (! $this->
ctrl->isAsynch()) {
408 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
409 $this->tabs_gui->removeSubTab(
"page_editor");
410 $this->tabs_gui->removeSubTab(
"ordering");
433 $gui->setCreationUrl($this->
ctrl->getLinkTarget($this,
'create'));
442 # all possible create permissions
443 parent::setTitleAndDescription();
444 if ($this->
object->getTitle() ===
"__OrgUnitAdministration") {
445 $this->tpl->setTitle($this->
lng->txt(
"objs_orgu"));
446 $this->tpl->setDescription($this->
lng->txt(
"objs_orgu"));
450 if ($this->
ilias->getSetting(
'custom_icons')) {
452 $icon_file = (isset($icons_cache[$this->
object->getId()])) ? $icons_cache[$this->
object->getId()] :
'';
454 $this->tpl->setTitleIcon($icon_file, $this->
lng->txt(
"obj_" . $this->object->getType()));
463 foreach ((array)
$path as
$key => $row) {
464 if ($row[
"title"] ===
"__OrgUnitAdministration") {
465 $row[
"title"] = $this->
lng->txt(
"objs_orgu");
467 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $row[
"child"]);
468 $this->ilLocator->addItem(
470 $this->
ctrl->getLinkTargetByClass(
"ilobjorgunitgui",
"view"),
474 $this->
ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$_GET[
"ref_id"]);
481 if ($obj_type !==
"orgu") {
482 parent::redirectToRefId(
$ref_id, $cmd);
484 $this->
ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $ref_id);
485 $this->
ctrl->redirectByClass(
"ilObjOrgUnitGUI", $cmd);
491 $read_access_ref_id = $this->rbacsystem->checkAccess(
'visible, 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")
509 $this->tabs_gui->addTab(
511 $this->
lng->txt(self::TAB_STAFF),
512 $this->ctrl->getLinkTargetByClass(
513 ilOrgUnitUserAssignmentGUI::class,
519 $this->tabs_gui->addTab(
521 $this->
lng->txt(self::TAB_SETTINGS),
522 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
526 $this->tabs_gui->addTab(
527 "administrate_users",
528 $this->
lng->txt(
"administrate_users"),
529 $this->ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index")
536 $this->tabs_gui->addTab(
537 self::TAB_GLOBAL_SETTINGS,
538 $this->
lng->txt(
'settings'),
539 $this->ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class)
542 $this->tabs_gui->addTab(
544 $this->
lng->txt(self::TAB_EXPORT),
545 $this->ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class)
550 $this->tabs_gui->addTab(
551 self::TAB_ORGU_TYPES,
552 $this->
lng->txt(self::TAB_ORGU_TYPES),
553 $this->ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class)
555 $this->tabs_gui->addTab(
557 $this->
lng->txt(self::TAB_POSITIONS),
558 $this->ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class)
567 $next_class = $this->
ctrl->getNextClass($this);
568 $cmd = $this->
ctrl->getCmd();
569 $this->tabs_gui->addSubTab(
571 $this->
lng->txt(self::TAB_SETTINGS),
572 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS)
574 $this->tabs_gui->addSubTab(
576 $this->
lng->txt(
"obj_multilinguality"),
577 $this->ctrl->getLinkTargetByClass(
"iltranslationgui",
"editTranslations")
580 $ilOrgUnitType = $this->
object->getOrgUnitType();
582 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
583 $this->tabs_gui->addSubTab(
584 'edit_advanced_settings',
585 $this->
lng->txt(
'orgu_adv_settings'),
586 $this->ctrl->getLinkTarget($this,
'editAdvancedSettings')
591 $this->tabs_gui->setSubTabActive($active_tab_id);
592 switch ($next_class) {
593 case 'iltranslationgui':
594 $this->tabs_gui->setSubTabActive(
"edit_translations");
599 $this->tabs_gui->setSubTabActive(
'edit_settings');
601 case 'editAdvancedSettings':
602 case 'updateAdvancedSettings':
603 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
614 $ref_id = $this->
object->getRefId();
620 $this->tabs_gui->addSubTab(
622 $this->
lng->txt(
"import"),
623 $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"chooseImport")
647 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"permission_denied"),
true);
648 $this->
ctrl->redirect($this);
656 $this->object->getOrgUnitTypeId()
658 $gui->setPropertyForm(
$form);
669 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
670 $this->
ctrl->redirect($this);
678 $this->object->getOrgUnitTypeId()
680 $gui->setPropertyForm(
$form);
683 if ($gui->importEditFormPostValues()) {
684 $gui->writeEditForm();
685 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
686 $this->
ctrl->redirect($this,
'editAdvancedSettings');
695 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
696 $this->
ctrl->redirect($this);
705 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
706 $this->
ctrl->redirect($this);
709 if (
$form->saveObject()) {
710 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
711 $this->
ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
719 parent::showAdministrationPanel();
721 if (empty($this->
toolbar->items) ===
false) {
723 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy"
724 || $item[
"cmd"] ==
"download"
735 $ilCtrl =
$DIC[
'ilCtrl'];
736 $ilCtrl->setTargetScript(
'ilias.php');
737 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
738 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode", self::TAB_SETTINGS);
739 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode", self::TAB_SETTINGS);
740 $ilCtrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI"),
"view");
746 $explorer->setAjax(
false);
747 $explorer->setSelectMode(
'nodes[]',
false);
762 if ($this->clipboard->getCmd() !=
'cut') {
763 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
766 if ($this->clipboard->hasEntries()) {
770 $this->
ctrl->returnToParent($this);
787 $ids = filter_input(INPUT_POST,
'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
788 if (count($ids) > 0) {
790 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"info_deleted"),
true);
792 $this->
ctrl->returnToParent($this);
806 if (isset($_POST[
"id"]) && is_array($_POST[
'id']) && count($_POST[
'id']) > 0) {
807 $arr_ref_ids = $_POST[
'id'];
808 } elseif (isset(
$_GET[
'item_ref_id']) && (
int)
$_GET[
'item_ref_id'] > 0) {
809 $arr_ref_ids = [(
int)
$_GET[
'item_ref_id']];
812 if (!$ru->showDeleteConfirmation($arr_ref_ids,
false)) {
813 $ilCtrl->returnToParent($this);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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,...
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.
loadLanguageModule(string $a_module)
Load language module.
const LP_CONTEXT_ORG_UNIT
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...
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
initCreationForms(string $new_type)
initCreationForms We override the method of class.ilObjectGUI because we have no copy functionality a...
getTabs()
@abstract overwrite in derived GUI class of your object type
afterSave(ilObject $new_object)
Post (successful) object creation hook.
updateAdvancedSettings()
Update Advanced Metadata.
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.
static _goto(int $ref_id)
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)
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.
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...
const MODE_ADMINISTRATION
initImportForm(string $new_type)
importFileObject(int $parent_id=null)
getReturnLocation(string $cmd, string $default_location="")
Get return location for command (command is method name without "Object", e.g.
initCreateForm(string $new_type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupType(int $id, bool $reference=false)
Class ilOrgUnitExplorerGUI.
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 ilOrgUnitPositionGUI.
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...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilOrgUnitUserAssignmentGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
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...
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static redirect(string $a_script)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
header include for all ilias files.