84 $ilCtrl =
$DIC[
'ilCtrl'];
86 $ilToolbar =
$DIC[
'ilToolbar'];
95 $this->ctrl = $ilCtrl;
99 $this->toolbar = $ilToolbar;
102 $this->type =
'orgu';
104 $lng->loadLanguageModule(
"orgu");
105 $this->tpl->addCss(
'./Modules/OrgUnit/templates/default/orgu.css');
107 $DIC->globalScreen()->tool()->context()->current()->addAdditionalData(OrgUnitToolProvider::SHOW_ORGU_TREE,
true);
117 $cmd = $this->ctrl->getCmd();
118 $next_class = $this->ctrl->getNextClass($this);
119 parent::prepareOutput();
121 switch ($next_class) {
122 case 'ilorgunitglobalsettingsgui':
123 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
125 $this->ctrl->forwardCommand($global_settings);
127 case "illocalusergui":
130 $this->ctrl->redirect($this);
132 $this->tabs_gui->activateTab(
'administrate_users');
134 $this->ctrl->forwardCommand($ilLocalUserGUI);
136 case "ilorgunitsimpleimportgui":
137 $this->tabs_gui->activateTab(
"view");
139 $this->tabs_gui->setSubTabActive(
'import');
141 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
143 case "ilorgunitsimpleuserimportgui":
145 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
147 case "ilorgunitstaffgui":
148 case "ilrepositorysearchgui":
149 $this->tabs_gui->activateTab(self::TAB_STAFF);
151 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
157 $ilObjUserGUI->setCreationMode(
true);
158 $this->ctrl->forwardCommand($ilObjUserGUI);
159 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
163 $ilObjUserGUI->setCreationMode(
true);
164 $this->ctrl->forwardCommand($ilObjUserGUI);
165 $this->tabs_gui->clearTargets();
166 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
171 $ilObjUserGUI->setCreationMode(
false);
172 $this->ctrl->forwardCommand($ilObjUserGUI);
173 $this->tabs_gui->clearTargets();
174 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
177 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
181 case "ilobjuserfoldergui":
184 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
188 $ilObjUserFolderGUI->setUserOwnerId((
int)
$_GET[
'ref_id']);
189 $ilObjUserFolderGUI->setCreationMode(
true);
190 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
191 $this->tabs_gui->clearTargets();
192 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
196 case "ilinfoscreengui":
197 $this->tabs_gui->activateTab(
"info_short");
198 if (!$this->
ilAccess->
checkAccess(
"read",
"", $this->ref_id) and !$this->ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
199 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
203 $amd_gui->setInfoObject($info);
205 $this->ctrl->forwardCommand($info);
207 case 'ilpermissiongui':
208 $this->tabs_gui->activateTab(
'perm_settings');
210 $this->ctrl->forwardCommand($ilPermissionGUI);
212 case "ilcommonactiondispatchergui":
214 $this->ctrl->forwardCommand($gui);
216 case 'illearningprogressgui':
217 case 'illplistofprogressgui':
218 $this->tabs_gui->clearTargets();
222 $this->ctrl->redirectByClass(
"ilOrgUnitStaffGUI",
"showStaff");
224 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
225 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
227 $this->ctrl->forwardCommand($new_gui);
229 case 'ilorgunitexportgui':
232 $this->ctrl->redirect($this);
234 $this->tabs_gui->activateTab(self::TAB_EXPORT);;
236 $ilOrgUnitExportGUI->addFormat(
'xml');
237 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
239 case strtolower(ilTranslationGUI::class):
240 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
243 $this->ctrl->forwardCommand($ilTranslationGui);
245 case strtolower(ilOrgUnitTypeGUI::class):
246 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
248 $this->ctrl->forwardCommand($types_gui);
250 case strtolower(ilOrgUnitPositionGUI::class):
251 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
253 $this->ctrl->forwardCommand($types_gui);
255 case strtolower(ilOrgUnitUserAssignmentGUI::class):
256 $this->tabs_gui->activateTab(self::TAB_STAFF);
258 $this->ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
260 case strtolower(ilPropertyFormGUI::class):
268 $gui->setPropertyForm($form);
270 $this->ctrl->forwardCommand($form);
273 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
286 case 'performPasteIntoMultipleObjects':
289 case 'keepObjectsInClipboard':
293 parent::createObject();
296 parent::saveObject();
299 $this->tabs_gui->clearTargets();
300 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
303 case 'confirmedDelete':
307 $this->tabs_gui->clearTargets();
308 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
312 parent::clearObject();
314 case 'enableAdministrationPanel':
315 parent::enableAdministrationPanelObject();
317 case 'disableAdministrationPanel':
318 parent::disableAdministrationPanelObject();
320 case 'getAsynchItemList':
321 parent::getAsynchItemListObject();
324 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
328 case 'updateSettings':
329 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
333 case 'editAdvancedSettings':
334 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
338 case 'updateAdvancedSettings':
339 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
346 case 'cancelMoveLink':
360 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
361 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
368 if (!$this->rbacsystem->checkAccess(
"read",
$_GET[
"ref_id"])) {
369 if ($this->rbacsystem->checkAccess(
"visible",
$_GET[
"ref_id"])) {
371 $this->ctrl->redirectByClass(
'ilinfoscreengui',
'');
374 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->WARNING);
377 parent::renderObject();
378 $this->tabs_gui->activateTab(self::TAB_VIEW_CONTENT);
379 $this->tabs_gui->removeSubTab(
"page_editor");
380 $this->tabs_gui->removeSubTab(
"ordering");
410 $gui->setCreationUrl($this->ctrl->getLinkTarget($this,
'create'));
420 # all possible create permissions
421 parent::setTitleAndDescription();
422 if ($this->object->getTitle() ==
"__OrgUnitAdministration") {
423 $this->tpl->setTitle($this->lng->txt(
"objs_orgu"));
424 $this->tpl->setDescription($this->lng->txt(
"objs_orgu"));
428 if ($this->
ilias->getSetting(
'custom_icons')) {
429 $icons_cache = ilObjOrgUnit::getIconsCache();
430 $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] :
'';
432 $this->tpl->setTitleIcon($icon_file, $this->lng->txt(
"obj_" . $this->object->getType()));
445 foreach ((array) $path as $key => $row) {
446 if ($row[
"title"] ==
"__OrgUnitAdministration") {
447 $row[
"title"] = $this->lng->txt(
"objs_orgu");
449 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id", $row[
"child"]);
450 $this->ilLocator->addItem($row[
"title"], $this->ctrl->getLinkTargetByClass(
"ilobjorgunitgui",
"view"),
ilFrameTargetInfo::_getFrame(
"MainContent"), $row[
"child"]);
451 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$_GET[
"ref_id"]);
463 if ($obj_type !=
"orgu") {
464 parent::redirectToRefId($a_ref_id, $a_cmd);
466 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $a_ref_id);
467 $this->ctrl->redirectByClass(
"ilObjOrgUnitGUI", $a_cmd);
477 $read_access_ref_id = $this->rbacsystem->checkAccess(
'visible,read', $this->object->getRefId());
478 if ($read_access_ref_id) {
479 $this->tabs_gui->addTab(self::TAB_VIEW_CONTENT, $this->lng->txt(
"content"), $this->ctrl->getLinkTarget($this,
""));
480 $this->tabs_gui->addTab(
"info_short",
"Info", $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
487 $this->tabs_gui->addTab(self::TAB_STAFF, $this->lng->txt(self::TAB_STAFF), $this->ctrl->getLinkTargetByClass(ilOrgUnitUserAssignmentGUI::class,
ilOrgUnitUserAssignmentGUI::CMD_INDEX));
490 $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
493 $this->tabs_gui->addTab(
"administrate_users", $this->lng->txt(
"administrate_users"), $this->ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index"));
499 $this->tabs_gui->addTab(self::TAB_GLOBAL_SETTINGS, $this->lng->txt(
'settings'), $this->ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class));
501 $this->tabs_gui->addTab(self::TAB_EXPORT, $this->lng->txt(self::TAB_EXPORT), $this->ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class));
505 $this->tabs_gui->addTab(self::TAB_ORGU_TYPES, $this->lng->txt(self::TAB_ORGU_TYPES), $this->ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class));
506 $this->tabs_gui->addTab(self::TAB_POSITIONS, $this->lng->txt(self::TAB_POSITIONS), $this->ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class));
518 $next_class = $this->ctrl->getNextClass($this);
519 $cmd = $this->ctrl->getCmd();
520 $this->tabs_gui->addSubTab(
'edit_settings', $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
521 $this->tabs_gui->addSubTab(
"edit_translations", $this->lng->txt(
"obj_multilinguality"), $this->ctrl->getLinkTargetByClass(
"iltranslationgui",
"editTranslations"));
523 $ilOrgUnitType = $this->
object->getOrgUnitType();
525 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
526 $this->tabs_gui->addSubTab(
'edit_advanced_settings', $this->lng->txt(
'orgu_adv_settings'), $this->ctrl->getLinkTarget($this,
'editAdvancedSettings'));
530 $this->tabs_gui->setSubTabActive($active_tab_id);
531 switch ($next_class) {
532 case 'iltranslationgui':
533 $this->tabs_gui->setSubTabActive(
"edit_translations");
538 $this->tabs_gui->setSubTabActive(
'edit_settings');
540 case 'editAdvancedSettings':
541 case 'updateAdvancedSettings':
542 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
560 $this->tabs_gui->addSubTab(
"import", $this->lng->txt(
"import"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"chooseImport"));
573 $form->setFormAction($this->ctrl->getFormAction($this));
574 $form->addCommandButton(
'updateAdvancedSettings', $this->lng->txt(
'save'));
575 $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt(
'cancel'));
588 $this->ctrl->redirect($this);
592 $gui->setPropertyForm($form);
594 $this->tpl->setContent($form->getHTML());
605 $this->ctrl->redirect($this);
609 $gui->setPropertyForm($form);
612 if ($gui->importEditFormPostValues()) {
613 $gui->writeEditForm();
614 ilUtil::sendSuccess($this->lng->txt(
'settings_saved'),
true);
615 $this->ctrl->redirect($this,
'editAdvancedSettings');
617 $this->tpl->setContent($form->getHTML());
626 $this->ctrl->redirect($this);
629 $this->tpl->setContent($form->getHTML());
637 $this->ctrl->redirect($this);
640 if ($form->saveObject()) {
641 ilUtil::sendSuccess($this->lng->txt(
'msg_obj_modified'),
true);
642 $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
644 $this->tpl->setContent($form->getHTML());
654 parent::showAdministrationPanel();
658 if (!
$toolbar =
$DIC->ui()->mainTemplate()->admin_panel_commands_toolbar) {
662 foreach (
$toolbar->items as $key => $item) {
663 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy"
664 || $item[
"cmd"] ==
"download"
676 $ilCtrl =
$DIC[
'ilCtrl'];
677 $ilCtrl->initBaseClass(
"ilAdministrationGUI");
678 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
679 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode", self::TAB_SETTINGS);
680 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode", self::TAB_SETTINGS);
681 $ilCtrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI"),
"view");
690 $explorer->setAjax(
false);
691 $explorer->setSelectMode(
'nodes[]',
false);
711 if (!in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut'))) {
712 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
715 if (
$_SESSION[
'clipboard'][
'cmd'] ==
'cut') {
716 if (isset(
$_GET[
'ref_id']) && (
int)
$_GET[
'ref_id']) {
720 $this->ctrl->returnToParent($this);
740 return parent::__initTableGUI();
751 $ids = filter_input(INPUT_POST,
'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
752 if (count($ids) > 0) {
754 ilUtil::sendSuccess(
$DIC->language()->txt(
"info_deleted"),
true);
756 $this->ctrl->returnToParent($this);
769 require_once(
"./Services/Repository/classes/class.ilRepUtilGUI.php");
774 if (is_array(
$_POST[
'id']) && count(
$_POST[
'id']) > 0) {
775 $arr_ref_ids =
$_POST[
'id'];
776 } elseif (
$_GET[
'item_ref_id'] > 0) {
777 $arr_ref_ids = [
$_GET[
'item_ref_id']];
780 if (!$ru->showDeleteConfirmation($arr_ref_ids,
false)) {
781 $ilCtrl->returnToParent($this);
792 return parent::__setTableGUIBasicData($tbl, $result_set, $a_from);
799 $parent_ref_id =
$_SESSION[
"clipboard"][
"parent"];
801 $DIC->ctrl()->setParameter($this,
'ref_id', $parent_ref_id);
802 $DIC->ctrl()->redirect($this);
An exception for terminatinating execution or to throw for unit testing.
checkAccess($a_permission, $a_cmd, $a_ref_id, $a_type="", $a_obj_id="", $a_tree_id="")
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
performPasteIntoMultipleObjectsObject()
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
keepObjectsInClipboardObject()
Keep objects in the clipboard.
showAdministrationPanel()
show administration panel
const LP_CONTEXT_ORG_UNIT
Class ilObjUserTrackingGUI.
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
static _checkAccessStaff($ref_id)
static _checkAccessExport(int $ref_id)
static _checkAccessSettings(int $ref_id)
static _checkAccessAdministrateUsers($ref_id)
Class ilObjOrgUnit GUI class.
confirmedDeleteObject()
confirmed deletion of org units -> org units are deleted immediately, without putting them to the tra...
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
redirectToRefId($a_ref_id, $a_cmd="")
afterSave(ilObject $a_new_object)
@inheritDoc
updateAdvancedSettings()
Update Advanced Metadata.
setContentSubTabs()
Set content sub tabs.
setTitleAndDescription()
called by prepare output
doUserAutoCompleteObject()
??
editAdvancedSettings()
Edit Advanced Metadata.
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
addAdminLocatorItems($a_do_not_add_object=false)
showPossibleSubObjects()
show possible sub objects selection list
const TAB_GLOBAL_SETTINGS
performPaste()
@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
setSubTabsSettings($active_tab_id)
deleteObject($a_error=false)
Display deletion confirmation screen for Org Units.
initCreationForms($a_new_type)
initCreationForms
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilObjUserFolderGUI.
Render add new item selector.
const MODE_ADMINISTRATION
initImportForm($a_new_type)
Init object import form.
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
initCreateForm($a_new_type)
Init object creation form.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
Class ilObject Basic functions for all objects.
getRefId()
get reference id @access public
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilOrgUnitExplorerGUI.
Class ilOrgUnitExportGUI.
Global orgunit settings GUI.
Class ilOrgUnitPositionGUI.
Class ilOrgUnitSimpleImportGUI.
Class ilOrgUnitSimpleUserImportGUI.
Class ilOrgUnitUserAssignmentGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Repository GUI Utilities.
static removeObjectsFromSystem($a_ref_ids, $a_from_recovery_folder=false)
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
redirection script todo: (a better solution should control the processing via a xml file)