82 $ilToolbar = $DIC[
'ilToolbar'];
88 parent::__construct(
array(),
$_GET[
"ref_id"],
true,
false);
95 $this->toolbar = $ilToolbar;
100 $lng->loadLanguageModule(
"orgu");
101 $this->tpl->addCss(
'./Modules/OrgUnit/templates/default/orgu.css');
107 $cmd = $this->ctrl->getCmd();
108 $next_class = $this->ctrl->getNextClass($this);
109 parent::prepareOutput();
116 switch ($next_class) {
117 case 'ilorgunitglobalsettingsgui':
118 $this->tabs_gui->activateTab(self::TAB_GLOBAL_SETTINGS);
120 $this->ctrl->forwardCommand($global_settings);
122 case "illocalusergui":
125 $this->ctrl->redirect($this);
127 $this->tabs_gui->activateTab(
'administrate_users');
129 $this->ctrl->forwardCommand($ilLocalUserGUI);
131 case "ilorgunitsimpleimportgui":
132 $this->tabs_gui->activateTab(
"view");
134 $this->tabs_gui->setSubTabActive(
'import');
136 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
138 case "ilorgunitsimpleuserimportgui":
140 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
142 case "ilorgunitstaffgui":
143 case "ilrepositorysearchgui":
144 $this->tabs_gui->activateTab(self::TAB_STAFF);
146 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
151 $ilObjUserGUI =
new ilObjUserGUI(
"", (
int) $_GET[
'ref_id'],
true,
false);
152 $ilObjUserGUI->setCreationMode(
true);
153 $this->ctrl->forwardCommand($ilObjUserGUI);
154 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
157 $ilObjUserGUI =
new ilObjUserGUI(
"", $_GET[
'ref_id'],
true,
false);
158 $ilObjUserGUI->setCreationMode(
true);
159 $this->ctrl->forwardCommand($ilObjUserGUI);
160 $this->tabs_gui->clearTargets();
161 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
165 $ilObjUserGUI =
new ilObjUserGUI(
"", (
int) $_GET[
'obj_id'],
false,
false);
166 $ilObjUserGUI->setCreationMode(
false);
167 $this->ctrl->forwardCommand($ilObjUserGUI);
168 $this->tabs_gui->clearTargets();
169 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
172 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
176 case "ilobjuserfoldergui":
179 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
183 $ilObjUserFolderGUI->setUserOwnerId((
int) $_GET[
'ref_id']);
184 $ilObjUserFolderGUI->setCreationMode(
true);
185 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
186 $this->tabs_gui->clearTargets();
187 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
191 case "ilinfoscreengui":
192 $this->tabs_gui->activateTab(
"info_short");
195 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->MESSAGE);
201 $this->ctrl->forwardCommand(
$info);
203 case 'ilpermissiongui':
204 $this->tabs_gui->activateTab(
'perm_settings');
206 $this->ctrl->forwardCommand($ilPermissionGUI);
208 case "ilcommonactiondispatchergui":
210 $this->ctrl->forwardCommand($gui);
212 case 'illearningprogressgui':
213 case 'illplistofprogressgui':
214 $this->tabs_gui->clearTargets();
215 $this->tabs_gui->setBackTarget($this->lng->txt(
'backto_staff'), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
'showStaff'));
218 $this->ctrl->redirectByClass(
"ilOrgUnitStaffGUI",
"showStaff");
220 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
221 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
223 $this->ctrl->forwardCommand($new_gui);
225 case 'ilorgunitexportgui':
226 $this->tabs_gui->activateTab(self::TAB_EXPORT);;
228 $ilOrgUnitExportGUI->addFormat(
'xml');
229 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
231 case strtolower(ilTranslationGUI::class):
232 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
235 $this->ctrl->forwardCommand($ilTranslationGui);
237 case strtolower(ilOrgUnitTypeGUI::class):
238 $this->tabs_gui->activateTab(self::TAB_ORGU_TYPES);
240 $this->ctrl->forwardCommand($types_gui);
242 case strtolower(ilOrgUnitPositionGUI::class):
243 $this->tabs_gui->activateTab(self::TAB_POSITIONS);
245 $this->ctrl->forwardCommand($types_gui);
247 case strtolower(ilOrgUnitUserAssignmentGUI::class):
248 $this->tabs_gui->activateTab(self::TAB_STAFF);
250 $this->ctrl->forwardCommand($ilOrgUnitUserAssignmentGUI);
267 case 'performPasteIntoMultipleObjects':
271 parent::createObject();
274 parent::saveObject();
277 $this->tabs_gui->clearTargets();
278 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
279 parent::deleteObject();
281 case 'confirmedDelete':
282 parent::confirmedDeleteObject();
285 $this->tabs_gui->clearTargets();
286 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
290 parent::clearObject();
292 case 'enableAdministrationPanel':
293 parent::enableAdministrationPanelObject();
295 case 'disableAdministrationPanel':
296 parent::disableAdministrationPanelObject();
298 case 'getAsynchItemList':
299 parent::getAsynchItemListObject();
301 case self::CMD_EDIT_SETTINGS:
302 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
306 case 'updateSettings':
307 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
311 case 'editAdvancedSettings':
312 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
316 case 'updateAdvancedSettings':
317 $this->tabs_gui->activateTab(self::TAB_SETTINGS);
324 case 'cancelMoveLink':
339 $this->ctrl->setParameter($this,
"ref_id", $a_new_object->
getRefId());
343 $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS,
"",
false,
false)
351 if (!$this->rbacsystem->checkAccess(
"read",
$_GET[
"ref_id"])) {
352 if ($this->rbacsystem->checkAccess(
"visible",
$_GET[
"ref_id"])) {
354 $this->ctrl->redirectByClass(
'ilinfoscreengui',
'');
357 $this->
ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->
ilias->error_obj->WARNING);
360 parent::renderObject();
361 $this->tabs_gui->activateTab(
"view_content");
362 $this->tabs_gui->removeSubTab(
"page_editor");
363 $this->tabs_gui->removeSubTab(
"ordering");
392 $gui->setCreationUrl(
"ilias.php?ref_id=" .
$_GET[
"ref_id"]
393 .
"&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
402 if (!
$tree->handleCommand()) {
403 $this->tpl->setLeftNavContent(
$tree->getHTML());
405 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$_GET[
"ref_id"]);
411 $whiteList =
array(
"orgu" );
412 $pls = ilOrgUnitExtension::getActivePluginIdsForTree();
414 return array_merge($whiteList, $pls);
423 # all possible create permissions 424 parent::setTitleAndDescription();
425 if ($this->
object->getTitle() ==
"__OrgUnitAdministration") {
426 $this->tpl->setTitle($this->lng->txt(
"objs_orgu"));
427 $this->tpl->setDescription($this->lng->txt(
"objs_orgu"));
431 if ($this->
ilias->getSetting(
'custom_icons')) {
432 $icons_cache = ilObjOrgUnit::getIconsCache();
433 $icon_file = (isset($icons_cache[$this->
object->getId()])) ? $icons_cache[$this->
object->getId()] :
'';
435 $this->tpl->setTitleIcon($icon_file, $this->lng->txt(
"obj_" 436 . $this->object->getType()));
450 if (
$row[
"title"] ==
"__OrgUnitAdministration") {
451 $row[
"title"] = $this->lng->txt(
"objs_orgu");
453 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$row[
"child"]);
455 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$_GET[
"ref_id"]);
467 if ($obj_type !=
"orgu") {
468 parent::redirectToRefId($a_ref_id, $a_cmd);
470 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $a_ref_id);
471 $this->ctrl->redirectByClass(
"ilObjOrgUnitGUI", $a_cmd);
481 $read_access_ref_id = $this->rbacsystem->checkAccess(
'visible,read', $this->
object->getRefId());
482 if ($read_access_ref_id) {
483 $this->tabs_gui->addTab(
"view_content", $this->lng->txt(
"content"), $this->ctrl->getLinkTarget($this,
""));
484 $this->tabs_gui->addTab(
"info_short",
"Info", $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
491 $this->tabs_gui->addTab(self::TAB_STAFF, $this->lng->txt(self::TAB_STAFF), $this->ctrl->getLinkTargetByClass(ilOrgUnitUserAssignmentGUI::class,
ilOrgUnitUserAssignmentGUI::CMD_INDEX));
493 if ($read_access_ref_id) {
494 $this->tabs_gui->addTab(self::TAB_SETTINGS, $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
495 $this->tabs_gui->addTab(
"administrate_users", $this->lng->txt(
"administrate_users"), $this->ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index"));
499 if ($read_access_ref_id) {
501 $this->tabs_gui->addTab(self::TAB_GLOBAL_SETTINGS, $this->lng->txt(
'settings'), $this->ctrl->getLinkTargetByClass(ilOrgUnitGlobalSettingsGUI::class));
503 $this->tabs_gui->addTab(self::TAB_EXPORT, $this->lng->txt(self::TAB_EXPORT), $this->ctrl->getLinkTargetByClass(ilOrgUnitExportGUI::class));
507 $this->tabs_gui->addTab(self::TAB_ORGU_TYPES, $this->lng->txt(self::TAB_ORGU_TYPES), $this->ctrl->getLinkTargetByClass(ilOrgUnitTypeGUI::class));
508 $this->tabs_gui->addTab(self::TAB_POSITIONS, $this->lng->txt(self::TAB_POSITIONS), $this->ctrl->getLinkTargetByClass(ilOrgUnitPositionGUI::class));
520 $next_class = $this->ctrl->getNextClass($this);
521 $cmd = $this->ctrl->getCmd();
522 $this->tabs_gui->addSubTab(
'edit_settings', $this->lng->txt(self::TAB_SETTINGS), $this->ctrl->getLinkTarget($this, self::CMD_EDIT_SETTINGS));
523 $this->tabs_gui->addSubTab(
"edit_translations", $this->lng->txt(
"obj_multilinguality"), $this->ctrl->getLinkTargetByClass(
"iltranslationgui",
"editTranslations"));
525 $ilOrgUnitType = $this->
object->getOrgUnitType();
527 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(
true))) {
528 $this->tabs_gui->addSubTab(
'edit_advanced_settings', $this->lng->txt(
'orgu_adv_settings'), $this->ctrl->getLinkTarget($this,
'editAdvancedSettings'));
532 $this->tabs_gui->setSubTabActive($active_tab_id);
533 switch ($next_class) {
534 case 'iltranslationgui':
535 $this->tabs_gui->setSubTabActive(
"edit_translations");
539 case self::CMD_EDIT_SETTINGS:
540 $this->tabs_gui->setSubTabActive(
'edit_settings');
542 case 'editAdvancedSettings':
543 case 'updateAdvancedSettings':
544 $this->tabs_gui->setSubTabActive(
'edit_advanced_settings');
561 if ($this->rbacsystem->checkAccess(
"visible, read",
$_GET[
"ref_id"]) and $this->
object->getRefId()
563 $this->tabs_gui->addSubTab(
"import", $this->lng->txt(
"import"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"chooseImport"));
576 $form->setFormAction($this->ctrl->getFormAction($this));
577 $form->addCommandButton(
'updateAdvancedSettings', $this->lng->txt(
'save'));
578 $form->addCommandButton(self::CMD_EDIT_SETTINGS, $this->lng->txt(
'cancel'));
591 $this->ctrl->redirect($this);
597 $this->tpl->setContent(
$form->getHTML());
608 $this->ctrl->redirect($this);
615 if ($gui->importEditFormPostValues()) {
616 $gui->writeEditForm();
618 $this->ctrl->redirect($this,
'editAdvancedSettings');
620 $this->tpl->setContent(
$form->getHTML());
629 $this->ctrl->redirect($this);
632 $this->tpl->setContent(
$form->getHTML());
640 $this->ctrl->redirect($this);
643 if (
$form->saveObject()) {
645 $this->ctrl->redirect($this, self::CMD_EDIT_SETTINGS);
647 $this->tpl->setContent(
$form->getHTML());
657 parent::showAdministrationPanel(
$tpl);
665 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy" 666 || $item[
"cmd"] ==
"download") {
678 $ilCtrl->initBaseClass(
"ilAdministrationGUI");
679 $ilCtrl->setTargetScript(
"ilias.php");
680 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
681 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode", self::TAB_SETTINGS);
682 $ilCtrl->setParameterByClass(
"IlObjPluginDispatchGUI",
"admin_mode", self::TAB_SETTINGS);
683 $ilCtrl->redirectByClass(
array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI" ),
"view");
690 $tree = $DIC[
'tree'];
692 $explorer->setAjax(
false);
693 $explorer->setSelectMode(
'nodes[]',
false);
714 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
717 if (
$_SESSION[
'clipboard'][
'cmd'] ==
'cut') {
718 if (isset(
$_GET[
'ref_id']) && (
int)
$_GET[
'ref_id']) {
723 $this->ctrl->returnToParent($this);
743 return parent::__initTableGUI();
753 return parent::__setTableGUIBasicData(
$tbl, $result_set, $a_from);
760 $parent_ref_id =
$_SESSION[
"clipboard"][
"parent"];
762 $DIC->ctrl()->setParameter($this,
'ref_id', $parent_ref_id);
763 $DIC->ctrl()->redirect($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
setSubTabsSettings($active_tab_id)
setPropertyForm($form)
set property form object
static _checkAccessStaff($ref_id)
afterSave(ilObject $a_new_object)
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
Class ilOrgUnitUserAssignmentGUI.
Class ilOrgUnitPositionGUI.
Class ilObjOrgUnit GUI class.
initCreationForms($a_new_type)
initCreationForms
Class ilOrgUnitSimpleImportGUI.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Global orgunit settings GUI.
Class ilOrgUnitExportGUI.
setContentSubTabs()
Set content sub tabs.
initImportForm($a_new_type)
Init object import form.
catch(Exception $e) $message
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)(option...
setInfoObject($info)
get info sections
if(isset($_POST['submit'])) $form
const MODE_ADMINISTRATION
updateAdvancedSettings()
Update Advanced Metadata.
setTitleAndDescription()
called by prepare output
static _checkAccessAdministrateUsers($ref_id)
redirection script todo: (a better solution should control the processing via a xml file) ...
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
doUserAutoCompleteObject()
??
initCreateForm($a_new_type)
Init object creation form.
editAdvancedSettings()
Edit Advanced Metadata.
const LP_CONTEXT_ORG_UNIT
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
redirectToRefId($a_ref_id, $a_cmd="")
performPasteIntoMultipleObjectsObject()
Create new PHPExcel object
obj_idprivate
Render add new item selector.
Class ilObjUserFolderGUI.
getRefId()
get reference id public
Class ilOrgUnitSimpleUserImportGUI.
Class ilOrgUnitExplorerGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
showAdministrationPanel(&$tpl)
show administration panel
const TAB_GLOBAL_SETTINGS
static redirect($a_script)
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
Class ilObjUserTrackingGUI.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addAdminLocatorItems($a_do_not_add_object=false)
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.