ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjOrgUnitGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3require_once("./Services/Container/classes/class.ilContainerGUI.php");
4require_once("./Services/AccessControl/classes/class.ilObjRole.php");
5require_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
6require_once("./Services/AccessControl/classes/class.ilPermissionGUI.php");
7require_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
8require_once("./Services/User/classes/class.ilUserAccountSettings.php");
9require_once("./Services/Tracking/classes/class.ilLearningProgressGUI.php");
10require_once("./Services/User/classes/class.ilObjUserFolderGUI.php");
11require_once("./Services/Tree/classes/class.ilTree.php");
12require_once("./Modules/OrgUnit/classes/Staff/class.ilOrgUnitStaffGUI.php");
13require_once("./Modules/OrgUnit/classes/LocalUser/class.ilLocalUserGUI.php");
14require_once("./Modules/OrgUnit/classes/Translation/class.ilTranslationGUI.php");
15require_once("./Modules/OrgUnit/classes/ExtId/class.ilExtIdGUI.php");
16require_once("./Modules/OrgUnit/classes/SimpleImport/class.ilOrgUnitSimpleImportGUI.php");
17require_once("./Modules/OrgUnit/classes/SimpleUserImport/class.ilOrgUnitSimpleUserImportGUI.php");
18require_once("./Modules/OrgUnit/classes/class.ilOrgUnitImporter.php");
19require_once("./Services/Object/classes/class.ilObjectAddNewItemGUI.php");
20require_once("class.ilOrgUnitExplorerGUI.php");
21require_once("class.ilOrgUnitExportGUI.php");
22require_once("class.ilObjOrgUnitAccess.php");
23require_once("class.ilObjOrgUnitTree.php");
24require_once(dirname(__FILE__) . '/Types/class.ilOrgUnitTypeGUI.php');
25require_once(dirname(__FILE__) . '/Settings/class.ilObjOrgUnitSettingsFormGUI.php');
26require_once('./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
27require_once('./Services/Container/classes/class.ilContainerByTypeContentGUI.php');
28require_once("./Modules/OrgUnit/classes/Extension/class.ilOrgUnitExtension.php");
29
48
52 public $ctrl;
56 public $tpl;
60 public $tabs_gui;
64 protected $ilAccess;
68 protected $toolbar;
72 protected $ilLocator;
76 public $tree;
80 public $object;
84 protected $ilLog;
88 public $ilias;
89
90
91 public function __construct() {
92 global $DIC;
93 $tpl = $DIC['tpl'];
94 $ilCtrl = $DIC['ilCtrl'];
95 $ilAccess = $DIC['ilAccess'];
96 $ilToolbar = $DIC['ilToolbar'];
97 $ilLocator = $DIC['ilLocator'];
98 $tree = $DIC['tree'];
99 $lng = $DIC['lng'];
100 $ilLog = $DIC['ilLog'];
101 $ilias = $DIC['ilias'];
102 parent::__construct(array(), $_GET["ref_id"], true, false);
103
104 $this->tpl = $tpl;
105 $this->ctrl = $ilCtrl;
106 $this->ilAccess = $ilAccess;
107 $this->ilLocator = $ilLocator;
108 $this->tree = $tree;
109 $this->toolbar = $ilToolbar;
110 $this->ilLog = $ilLog;
111 $this->ilias = $ilias;
112 $this->type = 'orgu';
113
114 $lng->loadLanguageModule("orgu");
115 $this->tpl->addCss('./Modules/OrgUnit/templates/default/orgu.css');
116 }
117
118
119 public function executeCommand() {
120 $cmd = $this->ctrl->getCmd();
121 $next_class = $this->ctrl->getNextClass($this);
122 parent::prepareOutput();
123
124 //Otherwise move-Objects would not work
125 if ($cmd != "cut") {
126 $this->showTree();
127 }
128
129 switch ($next_class) {
130 case "illocalusergui":
132 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
133 $this->ctrl->redirect($this);
134 }
135 $this->tabs_gui->setTabActive('administrate_users');
136 $ilLocalUserGUI = new ilLocalUserGUI($this);
137 $this->ctrl->forwardCommand($ilLocalUserGUI);
138 break;
139 case "ilorgunitsimpleimportgui":
140 $this->tabs_gui->setTabActive("view");
141 $this->setContentSubTabs();
142 $this->tabs_gui->setSubTabActive('import');
143 $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
144 $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
145 break;
146 case "ilorgunitsimpleuserimportgui":
147 $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
148 $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
149 break;
150 case "ilorgunitstaffgui":
151 case "ilrepositorysearchgui":
152 $this->tabs_gui->setTabActive('orgu_staff');
153 $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this);
154 $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
155 break;
156 case "ilobjusergui":
157 switch ($cmd) {
158 case "create":
159 $ilObjUserGUI = new ilObjUserGUI("", (int)$_GET['ref_id'], true, false);
160 $ilObjUserGUI->setCreationMode(true);
161 $this->ctrl->forwardCommand($ilObjUserGUI);
162 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
163 break;
164 case "save":
165 $ilObjUserGUI = new ilObjUserGUI("", $_GET['ref_id'], true, false);
166 $ilObjUserGUI->setCreationMode(true);
167 $this->ctrl->forwardCommand($ilObjUserGUI);
168 $this->tabs_gui->clearTargets();
169 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
170 break;
171 case "view":
172 case "update":
173 $ilObjUserGUI = new ilObjUserGUI("", (int)$_GET['obj_id'], false, false);
174 $ilObjUserGUI->setCreationMode(false);
175 $this->ctrl->forwardCommand($ilObjUserGUI);
176 $this->tabs_gui->clearTargets();
177 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
178 break;
179 case "cancel":
180 $this->ctrl->redirectByClass("illocalusergui", "index");
181 break;
182 }
183 break;
184 case "ilobjuserfoldergui":
185 switch ($cmd) {
186 case "view":
187 $this->ctrl->redirectByClass("illocalusergui", "index");
188 break;
189 default:
190 $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int)$_GET['ref_id'], true, false);
191 $ilObjUserFolderGUI->setUserOwnerId((int)$_GET['ref_id']);
192 $ilObjUserFolderGUI->setCreationMode(true);
193 $this->ctrl->forwardCommand($ilObjUserFolderGUI);
194 $this->tabs_gui->clearTargets();
195 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
196 break;
197 }
198 break;
199 case "ilinfoscreengui":
200 $this->tabs_gui->setTabActive("info_short");
201 if (!$this->ilAccess->checkAccess("read", "", $this->ref_id) AND !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
202 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
203 }
204 $info = new ilInfoScreenGUI($this);
205 $amd_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
206 $amd_gui->setInfoObject($info);
207 $amd_gui->parse();
208 $this->ctrl->forwardCommand($info);
209 break;
210 case 'ilpermissiongui':
211 $this->tabs_gui->setTabActive('perm_settings');
212 $ilPermissionGUI = new ilPermissionGUI($this);
213 $this->ctrl->forwardCommand($ilPermissionGUI);
214 break;
215 case "ilcommonactiondispatchergui":
216 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
218 $this->ctrl->forwardCommand($gui);
219 break;
220 case 'illearningprogressgui':
221 case 'illplistofprogressgui':
222 $this->tabs_gui->clearTargets();
223 $this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff'));
224 if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) {
225 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
226 $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
227 }
228 $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
229 $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
230 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
232 $this->ctrl->forwardCommand($new_gui);
233 break;
234 case 'ilorgunitexportgui':
235 $this->tabs_gui->setTabActive('export');;
236 $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
237 $ilOrgUnitExportGUI->addFormat('xml');
238 $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
239 break;
240 case 'iltranslationgui':
241 $this->tabs_gui->setTabActive("settings");
242 $this->setSubTabsSettings('edit_translations');
243
244 $ilTranslationGui = new ilTranslationGUI($this);
245 $this->ctrl->forwardCommand($ilTranslationGui);
246 break;
247 case 'ilorgunittypegui':
248 $this->tabs_gui->setTabActive('orgu_types');
249 $types_gui = new ilOrgUnitTypeGUI($this);
250 $this->ctrl->forwardCommand($types_gui);
251 break;
252 default:
253 switch ($cmd) {
254 case '':
255 case 'view':
256 case 'render':
257 case 'cancel':
258 case 'cancelDelete':
259 $this->view();
260 break;
261 case 'performPaste':
262 $this->performPaste();
263 break;
264 case 'paste':
265 $this->performPaste();
266 break;
267 case 'performPasteIntoMultipleObjects':
269 break;
270 case 'create':
271 parent::createObject();
272 break;
273 case 'save':
274 parent::saveObject();
275 break;
276 case 'delete':
277 $this->tabs_gui->clearTargets();
278 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
279 parent::deleteObject();
280 break;
281 case 'confirmedDelete':
282 parent::confirmedDeleteObject();
283 break;
284 case 'cut':
285 $this->tabs_gui->clearTargets();
286 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
287 parent::cutObject();
288 break;
289 case 'clear':
290 parent::clearObject();
291 break;
292 case 'enableAdministrationPanel':
293 parent::enableAdministrationPanelObject();
294 break;
295 case 'disableAdministrationPanel':
296 parent::disableAdministrationPanelObject();
297 break;
298 case 'getAsynchItemList':
299 parent::getAsynchItemListObject();
300 break;
301 case 'editSettings':
302 $this->tabs_gui->setTabActive("settings");
303 $this->setSubTabsSettings('edit_settings');
304 $this->editSettings();
305 break;
306 case 'updateSettings':
307 $this->tabs_gui->setTabActive("settings");
308 $this->setSubTabsSettings('edit_settings');
309 $this->updateSettings();
310 break;
311 case 'editAdvancedSettings':
312 $this->tabs_gui->setTabActive("settings");
313 $this->setSubTabsSettings('edit_advanced_settings');
314 $this->editAdvancedSettings();
315 break;
316 case 'updateAdvancedSettings':
317 $this->tabs_gui->setTabActive("settings");
318 $this->setSubTabsSettings('edit_advanced_settings');
319 $this->updateAdvancedSettings();
320 break;
321 case 'importFile':
322 $this->importFileObject();
323 break;
324 }
325 break;
326 }
327 }
328
329
330 public function view() {
331 if (!$this->ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
332 if ($this->ilAccess->checkAccess("visible", "", $_GET["ref_id"])) {
333 ilUtil::sendFailure($this->lng->txt("msg_no_perm_read"));
334 $this->ctrl->redirectByClass('ilinfoscreengui', '');
335 }
336
337 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
338 }
339
340 parent::renderObject();
341 $this->tabs_gui->setTabActive("view_content");
342 $this->tabs_gui->removeSubTab("page_editor");
343 $this->tabs_gui->removeSubTab("ordering"); // Mantis 0014728
344
345 }
346
357 protected function initCreationForms($a_new_type) {
358 $forms = array(
359 self::CFORM_NEW => $this->initCreateForm($a_new_type),
360 self::CFORM_IMPORT => $this->initImportForm($a_new_type),
361 );
362
363 return $forms;
364 }
365
366
367 public function showPossibleSubObjects() {
368 $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
370 $gui->setCreationUrl("ilias.php?ref_id=" . $_GET["ref_id"] . "&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
371 $gui->render();
372 }
373
374
375 public function showTree() {
376 $tree = new ilOrgUnitExplorerGUI("orgu_explorer", "ilObjOrgUnitGUI", "showTree", new ilTree(1));
377 $tree->setTypeWhiteList(
378 $this->getTreeWhiteList()
379 );
380 if (!$tree->handleCommand()) {
381 $this->tpl->setLeftNavContent($tree->getHTML());
382 }
383 $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $_GET["ref_id"]);
384 }
385
386 protected function getTreeWhiteList() {
387 $whiteList = array("orgu");
388 $pls = ilOrgUnitExtension::getActivePluginIdsForTree();
389 return array_merge($whiteList, $pls);
390 }
391
392
396 public function setTitleAndDescription() {
397 # all possible create permissions
398 parent::setTitleAndDescription();
399 if ($this->object->getTitle() == "__OrgUnitAdministration") {
400 $this->tpl->setTitle($this->lng->txt("objs_orgu"));
401 $this->tpl->setDescription($this->lng->txt("objs_orgu"));
402 }
403
404 // Check for custom icon of type
405 if ($this->ilias->getSetting('custom_icons')) {
406 $icons_cache = ilObjOrgUnit::getIconsCache();
407 $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
408 if ($icon_file) {
409 $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
410 }
411 }
412 }
413
414
418 protected function addAdminLocatorItems($a_do_not_add_object = false) {
419 $path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId());
420 // add item for each node on path
421 foreach ((array)$path as $key => $row) {
422 if ($row["title"] == "__OrgUnitAdministration") {
423 $row["title"] = $this->lng->txt("objs_orgu");
424 }
425 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
426 $this->ilLocator->addItem($row["title"], $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]);
427 $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]);
428 }
429 }
430
431
436 protected function redirectToRefId($a_ref_id, $a_cmd = "") {
437 $obj_type = ilObject::_lookupType($a_ref_id, true);
438 if ($obj_type != "orgu") {
439 parent::redirectToRefId($a_ref_id, $a_cmd);
440 } else {
441 $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $a_ref_id);
442 $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $a_cmd);
443 }
444 }
445
446
450 public function getTabs() {
451 if ($this->ilAccess->checkAccess('read', '', $this->object->getRefId())) {
452 $this->tabs_gui->addTab("view_content", $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, ""));
453 $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
454 }
455
456 // Tabs for OrgUnits exclusive root!
457 if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
458 if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
459 $this->tabs_gui->addTab("orgu_staff", $this->lng->txt("orgu_staff"), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff"));
460 }
461 if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) {
462 $this->tabs_gui->addTab("settings", $this->lng->txt("settings"), $this->ctrl->getLinkTarget($this, 'editSettings'));
463 }
464 if (ilObjOrgUnitAccess::_checkAccessAdministrateUsers($this->object->getRefId())) {
465 $this->tabs_gui->addTab("administrate_users", $this->lng->txt("administrate_users"), $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index"));
466 }
467 }
468
469 if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) {
470 $this->tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilorgunitexportgui', ''), 'export', 'ilorgunitexportgui');
471
472 // Add OrgUnit types tab
473 if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
474 $this->tabs_gui->addTab('orgu_types', $this->lng->txt('orgu_types'), $this->ctrl->getLinkTargetByClass('ilOrgUnitTypeGUI'));
475 }
476 }
477 parent::getTabs();
478 }
479
480
484 protected function setSubTabsSettings($active_tab_id) {
485 $next_class = $this->ctrl->getNextClass($this);
486 $cmd = $this->ctrl->getCmd();
487 $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings'));
488 $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
489
490 $ilOrgUnitType = $this->object->getOrgUnitType();
491 if ($ilOrgUnitType instanceof ilOrgUnitType) {
492 if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
493 $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
494 }
495 }
496
497 $this->tabs_gui->setSubTabActive($active_tab_id);
498 switch ($next_class) {
499 case 'iltranslationgui':
500 $this->tabs_gui->setSubTabActive("edit_translations");
501 break;
502 case '':
503 switch ($cmd) {
504 case 'editSettings':
505 $this->tabs_gui->setSubTabActive('edit_settings');
506 break;
507 case 'editAdvancedSettings':
508 case 'updateAdvancedSettings':
509 $this->tabs_gui->setSubTabActive('edit_advanced_settings');
510 break;
511 }
512 break;
513 }
514
515 return;
516 }
517
522 {
524 //only display the import tab at the first level
525 if ($this->ilAccess->checkAccess("write", "", $_GET["ref_id"]) AND $this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
526 $this->tabs_gui->addSubTab("import", $this->lng->txt("import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "chooseImport"));
527 }
528 }
529
530
536 protected function initAdvancedSettingsForm() {
537 $form = new ilPropertyFormGUI();
538 $form->setFormAction($this->ctrl->getFormAction($this));
539 $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
540 $form->addCommandButton('editSettings', $this->lng->txt('cancel'));
541
542 return $form;
543 }
544
545
549 protected function editAdvancedSettings() {
550 if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
551 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
552 $this->ctrl->redirect($this);
553 }
554 $form = $this->initAdvancedSettingsForm();
555 $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
556 $gui->setPropertyForm($form);
557 $gui->parse();
558 $this->tpl->setContent($form->getHTML());
559 }
560
561
565 protected function updateAdvancedSettings() {
566 if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
567 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
568 $this->ctrl->redirect($this);
569 }
570 $form = $this->initAdvancedSettingsForm();
571 $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
572 $gui->setPropertyForm($form);
573 $form->checkInput();
574 $gui->parse();
575 if ($gui->importEditFormPostValues()) {
576 $gui->writeEditForm();
577 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
578 $this->ctrl->redirect($this, 'editAdvancedSettings');
579 } else {
580 $this->tpl->setContent($form->getHTML());
581 }
582 }
583
584 public function editSettings() {
585 if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
586 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
587 $this->ctrl->redirect($this);
588 }
589 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
590 $this->tpl->setContent($form->getHTML());
591 }
592
593
594 public function updateSettings() {
595 if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
596 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
597 $this->ctrl->redirect($this);
598 }
599 $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
600 if ($form->saveObject()) {
601 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
602 $this->ctrl->redirect($this, 'editSettings');
603 } else {
604 $this->tpl->setContent($form->getHTML());
605 }
606 }
607
608
612 public function showAdministrationPanel(&$tpl) {
613 parent::showAdministrationPanel($tpl);
614 //an ugly encapsulation violation in order to remove the "verknüpfen"/"link" and copy button.
616 if (!$toolbar = $tpl->admin_panel_commands_toolbar) {
617 return;
618 }
619 if (is_array($toolbar->items)) {
620 foreach ($toolbar->items as $key => $item) {
621 if ($item["cmd"] == "link" || $item["cmd"] == "copy" || $item["cmd"] == "download") {
622 unset($toolbar->items[$key]);
623 }
624 }
625 }
626 }
627
628
629 public static function _goto($ref_id) {
630 global $DIC;
631 $ilCtrl = $DIC['ilCtrl'];
632 $ilCtrl->initBaseClass("ilAdministrationGUI");
633 $ilCtrl->setTargetScript("ilias.php");
634 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
635 $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", "settings");
636 $ilCtrl->setParameterByClass("IlObjPluginDispatchGUI", "admin_mode", "settings");
637 $ilCtrl->redirectByClass(array( "ilAdministrationGUI", "ilObjOrgUnitGUI" ), "view");
638 }
639
640
641 protected function getTreeSelectorGUI($cmd) {
642 global $DIC;
643 $tree = $DIC['tree'];
644 $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $tree);
645 $explorer->setAjax(false);
646 $explorer->setSelectMode('nodes[]', false);
647
648 return $explorer;
649 }
650
651
655 public function getAdminTabs() {
656 $this->getTabs();
657 }
658
659
663 public function performPaste() {
664
665 if (!in_array($_SESSION['clipboard']['cmd'], array( 'cut' ))) {
666 $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
667 $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
668 }
669 if ($_SESSION['clipboard']['cmd'] == 'cut') {
670 if (isset($_GET['ref_id']) && (int)$_GET['ref_id']) {
671 $_POST['nodes'] = array( $_GET['ref_id'] );
673 }
674 }
675 $this->ctrl->returnToParent($this);
676 }
677
678
683 }
684
685 //
686 // METHODS for local user administration.
687 //
692 public function &__initTableGUI() {
693 return parent::__initTableGUI();
694 }
695
696
701 public function __setTableGUIBasicData(&$tbl, &$result_set, $a_from = "") {
702 return parent::__setTableGUIBasicData($tbl, $result_set, $a_from);
703 }
704}
705
706?>
$path
Definition: aliased.php:25
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilContainerGUI.
showAdministrationPanel(&$tpl)
show administration panel
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilInfoScreenGUI.
Class ilObjUserTrackingGUI.
Class ilLocalUserGUI.
logging
Definition: class.ilLog.php:19
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
static _checkAccessStaff($ref_id)
static _checkAccessAdministrateUsers($ref_id)
Class ilObjOrgUnit GUI class.
__setTableGUIBasicData(&$tbl, &$result_set, $a_from="")
redirectToRefId($a_ref_id, $a_cmd="")
executeCommand()
execute command note: this method is overwritten in all container objects
updateAdvancedSettings()
Update Advanced Metadata.
setContentSubTabs()
Set content sub tabs.
setTitleAndDescription()
called by prepare output
editAdvancedSettings()
Edit Advanced Metadata.
addAdminLocatorItems($a_do_not_add_object=false)
showPossibleSubObjects()
show possible sub objects selection list
performPaste()
@description Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
setSubTabsSettings($active_tab_id)
initCreationForms($a_new_type)
initCreationForms
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilObjOrgUnitSettingsFormGUI.
static getRootOrgRefId()
Class ilObjUserFolderGUI.
Class ilObjUserGUI.
Render add new item selector.
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.
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilOrgUnitExplorerGUI.
Class ilOrgUnitExportGUI.
Class ilOrgUnitSimpleImportGUI.
Class ilOrgUnitSimpleUserImportGUI.
Class ilOrgUnitStaffGUI.
Class ilOrgUnitTypeGUI.
Class ilOrgUnitType.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents a property form user interface.
Class ilTranslationGUI.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$tbl
Definition: example_048.php:81
$info
Definition: example_052.php:80
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)
$cmd
Definition: sahs_server.php:35
global $DIC