3 require_once(
"./Services/Container/classes/class.ilContainerGUI.php");
4 require_once(
"./Services/AccessControl/classes/class.ilObjRole.php");
5 require_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
6 require_once(
"./Services/AccessControl/classes/class.ilPermissionGUI.php");
7 require_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
8 require_once(
"./Services/User/classes/class.ilUserAccountSettings.php");
9 require_once(
"./Services/Tracking/classes/class.ilLearningProgressGUI.php");
10 require_once(
"./Services/User/classes/class.ilObjUserFolderGUI.php");
11 require_once(
"./Services/Tree/classes/class.ilTree.php");
12 require_once(
"./Modules/OrgUnit/classes/Staff/class.ilOrgUnitStaffGUI.php");
13 require_once(
"./Modules/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php");
14 require_once(
"./Modules/OrgUnit/classes/Translation/class.ilTranslationGUI.php");
15 require_once(
"./Modules/OrgUnit/classes/ExtId/class.ilExtIdGUI.php");
16 require_once(
"./Modules/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php");
17 require_once(
"./Modules/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php");
18 require_once(
"./Modules/OrgUnit/classes/class.ilOrgUnitImporter.php");
19 require_once(
"./Services/Object/classes/class.ilObjectAddNewItemGUI.php");
20 require_once(
"class.ilOrgUnitExplorerGUI.php");
21 require_once(
"class.ilOrgUnitExportGUI.php");
22 require_once(
"class.ilObjOrgUnitAccess.php");
23 require_once(
"class.ilObjOrgUnitTree.php");
88 $this->toolbar = $ilToolbar;
91 $lng->loadLanguageModule(
"orgu");
96 $cmd = $this->ctrl->getCmd();
97 $next_class = $this->ctrl->getNextClass($this);
107 switch ($next_class) {
108 case "illocalusergui":
109 $this->tabs_gui->setTabActive(
'administrate_users');
111 $this->ctrl->forwardCommand($ilLocalUserGUI);
114 $this->tabs_gui->setTabActive(
"settings");
117 $this->ctrl->forwardCommand($ilExtIdGUI);
119 case "ilorgunitsimpleimportgui":
120 $this->tabs_gui->setTabActive(
"view_content");
122 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
123 $this->tabs_gui->clearTargets();
124 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTarget($this));
126 case "ilorgunitsimpleuserimportgui":
127 $this->tabs_gui->setTabActive(
"view_content");
129 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
130 $this->tabs_gui->clearTargets();
131 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTarget($this));
133 case "ilorgunitstaffgui":
134 case "ilrepositorysearchgui":
135 $this->tabs_gui->setTabActive(
'orgu_staff');
137 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
143 $ilObjUserGUI->setCreationMode(
true);
144 $this->ctrl->forwardCommand($ilObjUserGUI);
145 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
148 $ilObjUserGUI =
new ilObjUserGUI(
"",$_GET[
'ref_id'],
true,
false);
149 $ilObjUserGUI->setCreationMode(
true);
150 $this->ctrl->forwardCommand($ilObjUserGUI);
151 $this->tabs_gui->clearTargets();
152 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
156 $ilObjUserGUI =
new ilObjUserGUI(
"", (
int)$_GET[
'obj_id'],
false,
false);
157 $ilObjUserGUI->setCreationMode(
false);
158 $this->ctrl->forwardCommand($ilObjUserGUI);
159 $this->tabs_gui->clearTargets();
160 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
163 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
167 case "ilobjuserfoldergui":
170 $this->ctrl->redirectByClass(
"illocalusergui",
"index");
174 $ilObjUserFolderGUI->setUserOwnerId((
int)$_GET[
'ref_id']);
175 $ilObjUserFolderGUI->setCreationMode(
true);
176 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
177 $this->tabs_gui->clearTargets();
178 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTargetByClass(
"illocalusergui",
'index'));
182 case "ilinfoscreengui":
183 $this->tabs_gui->setTabActive(
"info_short");
184 if (!$this->ilAccess->checkAccess(
"read",
"", $this->ref_id) AND !$this->ilAccess->checkAccess(
"visible",
"", $this->ref_id)) {
185 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
188 $this->ctrl->forwardCommand($info);
190 case 'ilpermissiongui':
191 $this->tabs_gui->setTabActive(
'perm_settings');
193 $this->ctrl->forwardCommand($ilPermissionGUI);
195 case "ilcommonactiondispatchergui":
196 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
198 $this->ctrl->forwardCommand($gui);
200 case 'illearningprogressgui':
201 case 'illplistofprogressgui':
202 $this->tabs_gui->clearTargets();
203 $this->tabs_gui->setBackTarget($this->lng->txt(
'backto_staff'), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
'showStaff'));
206 $this->ctrl->redirectByClass(
"ilOrgUnitStaffGUI",
"showStaff");
208 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"obj_id");
209 $this->ctrl->saveParameterByClass(
"illearningprogressgui",
"recursive");
210 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
212 $this->ctrl->forwardCommand($new_gui);
214 case 'ilorgunitexportgui':
215 $this->tabs_gui->setTabActive(
'export');;
217 $ilOrgUnitExportGUI->addFormat(
'xml');
218 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
220 case 'iltranslationgui':
221 $this->tabs_gui->setTabActive(
"settings");
225 $this->ctrl->forwardCommand($ilTranslationGui);
251 $this->tabs_gui->clearTargets();
252 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTarget($this));
255 case 'confirmedDelete':
259 $this->tabs_gui->clearTargets();
260 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTarget($this));
266 case 'enableAdministrationPanel':
269 case 'disableAdministrationPanel':
272 case 'getAsynchItemList':
284 if (!$this->ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"])) {
285 if($this->ilAccess->checkAccess(
"visible",
"",
$_GET[
"ref_id"])) {
287 $this->ctrl->redirectByClass(
'ilinfoscreengui',
'');
290 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->WARNING);
294 $this->tabs_gui->setTabActive(
"view_content");
295 $this->tabs_gui->removeSubTab(
"page_editor");
297 $this->toolbar->addButton($this->lng->txt(
"simple_import"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleImportGUI",
"importScreen"));
298 $this->toolbar->addButton($this->lng->txt(
"simple_user_import"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitSimpleUserImportGUI",
"userImportScreen"));
327 $gui->setCreationUrl(
"ilias.php?ref_id=" .
$_GET[
"ref_id"]
328 .
"&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
335 $tree->setTypeWhiteList(array(
"orgu" ));
336 if (!
$tree->handleCommand()) {
337 $this->tpl->setLeftNavContent(
$tree->getHTML());
339 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$_GET[
"ref_id"]);
347 # all possible create permissions
350 if ($this->object->getTitle() ==
"__OrgUnitAdministration") {
351 $this->tpl->setTitle($this->lng->txt(
"objs_orgu"));
353 $this->tpl->setDescription($this->lng->txt(
"objs_orgu"));
361 if (
$row[
"title"] ==
"__OrgUnitAdministration") {
362 $row[
"title"] = $this->lng->txt(
"objs_orgu");
364 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$row[
"child"]);
366 $this->ctrl->setParameterByClass(
"ilobjorgunitgui",
"ref_id",
$_GET[
"ref_id"]);
373 if ($obj_type !=
"orgu") {
376 $this->ctrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id", $a_ref_id);
377 $this->ctrl->redirectByClass(
"ilObjOrgUnitGUI", $a_cmd);
383 if ($this->ilAccess->checkAccess(
'read',
'',$this->object->getRefId())) {
384 $this->tabs_gui->addTab(
"view_content", $this->lng->txt(
"content"), $this->ctrl->getLinkTarget($this,
""));
385 $this->tabs_gui->addTab(
"info_short",
"Info", $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
392 $this->tabs_gui->addTab(
"orgu_staff", $this->lng->txt(
"orgu_staff"), $this->ctrl->getLinkTargetByClass(
"ilOrgUnitStaffGUI",
"showStaff"));
394 if ($this->ilAccess->checkAccess(
'write',
'',$this->object->getRefId())) {
395 $this->tabs_gui->addTab(
"settings", $this->lng->txt(
"settings"), $this->ctrl->getLinkTargetByClass(
"ilTranslationGUI",
"editTranslations"));
398 $this->tabs_gui->addTab(
"administrate_users", $this->lng->txt(
"administrate_users"), $this->ctrl->getLinkTargetByClass(
"ilLocalUserGUI",
"index"));
402 if ($this->ilAccess->checkAccess(
'write',
'', $this->object->getRefId())) {
403 $this->tabs_gui->addTarget(
'export', $this->ctrl->getLinkTargetByClass(
'ilorgunitexportgui',
''),
'export',
'ilorgunitexportgui');
411 $next_class = $this->ctrl->getNextClass($this);
412 $this->tabs_gui->addSubTab(
"edit_translations", $this->lng->txt(
"edit_translations"), $this->ctrl->getLinkTargetByClass(
"iltranslationgui",
"editTranslations"));
413 $this->tabs_gui->addSubTab(
"edit_ext_id", $this->lng->txt(
"edit_ext_id"), $this->ctrl->getLinkTargetByClass(
"ilextidgui",
"edit"));
415 switch ($next_class) {
416 case 'iltranslationgui':
417 $this->tabs_gui->setSubTabActive(
"edit_translations");
420 $this->tabs_gui->setSubTabActive(
"edit_ext_id");
434 foreach (
$toolbar->items as $key => $item) {
435 if ($item[
"cmd"] ==
"link" || $item[
"cmd"] ==
"copy") {
444 $ilCtrl->initBaseClass(
"ilAdministrationGUI");
445 $ilCtrl->setTargetScript(
"ilias.php");
446 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"ref_id",
$ref_id);
447 $ilCtrl->setParameterByClass(
"ilObjOrgUnitGUI",
"admin_mode",
"settings");
448 $ilCtrl->redirectByClass(array(
"ilAdministrationGUI",
"ilObjOrgUnitGUI" ),
"view");
453 $this->ctrl->setCmd(
'performPaste');
456 $ilOrgUnitExplorerGUI->setTypeWhiteList(array(
"orgu" ));
458 if (!$ilOrgUnitExplorerGUI->handleCommand()) {
459 $this->tpl->setContent($ilOrgUnitExplorerGUI->getHTML());
471 if (! in_array(
$_SESSION[
'clipboard'][
'cmd'], array(
'cut' ))) {
472 $message = __METHOD__ .
": cmd was not 'cut' ; may be a hack attempt!";
473 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
475 if (
$_SESSION[
'clipboard'][
'cmd'] ==
'cut') {
476 if (isset(
$_GET[
'ref_id']) && (
int)
$_GET[
'ref_id']) {
477 $_POST[
'nodes'] = array( $_GET[
'ref_id'] );
481 $this->ctrl->returnToParent($this);