ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 */
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");
24 require_once(dirname(__FILE__) . '/Types/class.ilOrgUnitTypeGUI.php');
25 require_once(dirname(__FILE__) . '/Settings/class.ilObjOrgUnitSettingsFormGUI.php');
26 require_once('./Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
27 require_once('./Services/Container/classes/class.ilContainerByTypeContentGUI.php');
28 
47 
51  public $ctrl;
55  public $tpl;
59  public $tabs_gui;
63  protected $ilAccess;
67  protected $toolbar;
71  protected $ilLocator;
75  public $tree;
79  public $object;
83  protected $ilLog;
87  public $ilias;
88 
89 
90  public function __construct() {
91  global $tpl, $ilCtrl, $ilAccess, $ilToolbar, $ilLocator, $tree, $lng, $ilLog, $ilias;
92  parent::ilContainerGUI(array(), $_GET["ref_id"], true, false);
93 
94  $this->tpl = $tpl;
95  $this->ctrl = $ilCtrl;
96  $this->ilAccess = $ilAccess;
97  $this->ilLocator = $ilLocator;
98  $this->tree = $tree;
99  $this->toolbar = $ilToolbar;
100  $this->ilLog = $ilLog;
101  $this->ilias = $ilias;
102  $this->type = 'orgu';
103 
104  $lng->loadLanguageModule("orgu");
105  $this->tpl->addCss('./Modules/OrgUnit/templates/default/orgu.css');
106  }
107 
108 
109  public function executeCommand() {
110  $cmd = $this->ctrl->getCmd();
111  $next_class = $this->ctrl->getNextClass($this);
112  parent::prepareOutput();
113 
114  //Otherwise move-Objects would not work
115  if ($cmd != "cut") {
116  $this->showTree();
117  }
118 
119  switch ($next_class) {
120  case "illocalusergui":
122  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
123  $this->ctrl->redirect($this);
124  }
125  $this->tabs_gui->setTabActive('administrate_users');
126  $ilLocalUserGUI = new ilLocalUserGUI($this);
127  $this->ctrl->forwardCommand($ilLocalUserGUI);
128  break;
129  case "ilorgunitsimpleimportgui":
130  $this->tabs_gui->setTabActive("view");
131  $this->setContentSubTabs();
132  $this->tabs_gui->setSubTabActive('import');
133  $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this);
134  $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI);
135  break;
136  case "ilorgunitsimpleuserimportgui":
137  $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this);
138  $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI);
139  break;
140  case "ilorgunitstaffgui":
141  case "ilrepositorysearchgui":
142  $this->tabs_gui->setTabActive('orgu_staff');
143  $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this);
144  $this->ctrl->forwardCommand($ilOrgUnitStaffGUI);
145  break;
146  case "ilobjusergui":
147  switch ($cmd) {
148  case "create":
149  $ilObjUserGUI = new ilObjUserGUI("", (int)$_GET['ref_id'], true, false);
150  $ilObjUserGUI->setCreationMode(true);
151  $this->ctrl->forwardCommand($ilObjUserGUI);
152  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
153  break;
154  case "save":
155  $ilObjUserGUI = new ilObjUserGUI("", $_GET['ref_id'], true, false);
156  $ilObjUserGUI->setCreationMode(true);
157  $this->ctrl->forwardCommand($ilObjUserGUI);
158  $this->tabs_gui->clearTargets();
159  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
160  break;
161  case "view":
162  case "update":
163  $ilObjUserGUI = new ilObjUserGUI("", (int)$_GET['obj_id'], false, false);
164  $ilObjUserGUI->setCreationMode(false);
165  $this->ctrl->forwardCommand($ilObjUserGUI);
166  $this->tabs_gui->clearTargets();
167  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
168  break;
169  case "cancel":
170  $this->ctrl->redirectByClass("illocalusergui", "index");
171  break;
172  }
173  break;
174  case "ilobjuserfoldergui":
175  switch ($cmd) {
176  case "view":
177  $this->ctrl->redirectByClass("illocalusergui", "index");
178  break;
179  default:
180  $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int)$_GET['ref_id'], true, false);
181  $ilObjUserFolderGUI->setUserOwnerId((int)$_GET['ref_id']);
182  $ilObjUserFolderGUI->setCreationMode(true);
183  $this->ctrl->forwardCommand($ilObjUserFolderGUI);
184  $this->tabs_gui->clearTargets();
185  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index'));
186  break;
187  }
188  break;
189  case "ilinfoscreengui":
190  $this->tabs_gui->setTabActive("info_short");
191  if (!$this->ilAccess->checkAccess("read", "", $this->ref_id) AND !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) {
192  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
193  }
194  $info = new ilInfoScreenGUI($this);
195  $amd_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
196  $amd_gui->setInfoObject($info);
197  $amd_gui->parse();
198  $this->ctrl->forwardCommand($info);
199  break;
200  case 'ilpermissiongui':
201  $this->tabs_gui->setTabActive('perm_settings');
202  $ilPermissionGUI = new ilPermissionGUI($this);
203  $this->ctrl->forwardCommand($ilPermissionGUI);
204  break;
205  case "ilcommonactiondispatchergui":
206  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
208  $this->ctrl->forwardCommand($gui);
209  break;
210  case 'illearningprogressgui':
211  case 'illplistofprogressgui':
212  $this->tabs_gui->clearTargets();
213  $this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff'));
214  if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) {
215  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
216  $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff");
217  }
218  $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id");
219  $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive");
220  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
221  $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_ORG_UNIT, $_GET["ref_id"], $_GET['obj_id']);
222  $this->ctrl->forwardCommand($new_gui);
223  break;
224  case 'ilorgunitexportgui':
225  $this->tabs_gui->setTabActive('export');;
226  $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this);
227  $ilOrgUnitExportGUI->addFormat('xml');
228  $this->ctrl->forwardCommand($ilOrgUnitExportGUI);
229  break;
230  case 'iltranslationgui':
231  $this->tabs_gui->setTabActive("settings");
232  $this->setSubTabsSettings('edit_translations');
233 
234  $ilTranslationGui = new ilTranslationGUI($this);
235  $this->ctrl->forwardCommand($ilTranslationGui);
236  break;
237  case 'ilorgunittypegui':
238  $this->tabs_gui->setTabActive('orgu_types');
239  $types_gui = new ilOrgUnitTypeGUI($this);
240  $this->ctrl->forwardCommand($types_gui);
241  break;
242  default:
243  switch ($cmd) {
244  case '':
245  case 'view':
246  case 'render':
247  case 'cancel':
248  case 'cancelDelete':
249  $this->view();
250  break;
251  case 'performPaste':
252  $this->performPaste();
253  break;
254  case 'paste':
255  $this->performPaste();
256  break;
257  case 'performPasteIntoMultipleObjects':
259  break;
260  case 'create':
261  parent::createObject();
262  break;
263  case 'save':
264  parent::saveObject();
265  break;
266  case 'delete':
267  $this->tabs_gui->clearTargets();
268  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
269  parent::deleteObject();
270  break;
271  case 'confirmedDelete':
272  parent::confirmedDeleteObject();
273  break;
274  case 'cut':
275  $this->tabs_gui->clearTargets();
276  $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
277  parent::cutObject();
278  break;
279  case 'clear':
280  parent::clearObject();
281  break;
282  case 'enableAdministrationPanel':
283  parent::enableAdministrationPanelObject();
284  break;
285  case 'disableAdministrationPanel':
286  parent::disableAdministrationPanelObject();
287  break;
288  case 'getAsynchItemList':
289  parent::getAsynchItemListObject();
290  break;
291  case 'editSettings':
292  $this->tabs_gui->setTabActive("settings");
293  $this->setSubTabsSettings('edit_settings');
294  $this->editSettings();
295  break;
296  case 'updateSettings':
297  $this->tabs_gui->setTabActive("settings");
298  $this->setSubTabsSettings('edit_settings');
299  $this->updateSettings();
300  break;
301  case 'editAdvancedSettings':
302  $this->tabs_gui->setTabActive("settings");
303  $this->setSubTabsSettings('edit_advanced_settings');
304  $this->editAdvancedSettings();
305  break;
306  case 'updateAdvancedSettings':
307  $this->tabs_gui->setTabActive("settings");
308  $this->setSubTabsSettings('edit_advanced_settings');
309  $this->updateAdvancedSettings();
310  break;
311  case 'importFile':
312  $this->importFileObject();
313  break;
314  }
315  break;
316  }
317  }
318 
319 
320  public function view() {
321  if (!$this->ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
322  if ($this->ilAccess->checkAccess("visible", "", $_GET["ref_id"])) {
323  ilUtil::sendFailure($this->lng->txt("msg_no_perm_read"));
324  $this->ctrl->redirectByClass('ilinfoscreengui', '');
325  }
326 
327  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->WARNING);
328  }
329 
330  parent::renderObject();
331  $this->tabs_gui->setTabActive("view_content");
332  $this->tabs_gui->removeSubTab("page_editor");
333  $this->tabs_gui->removeSubTab("ordering"); // Mantis 0014728
334 
335  }
336 
347  protected function initCreationForms($a_new_type) {
348  $forms = array(
349  self::CFORM_NEW => $this->initCreateForm($a_new_type),
350  self::CFORM_IMPORT => $this->initImportForm($a_new_type),
351  );
352 
353  return $forms;
354  }
355 
356 
357  public function showPossibleSubObjects() {
358  $gui = new ilObjectAddNewItemGUI($this->object->getRefId());
360  $gui->setCreationUrl("ilias.php?ref_id=" . $_GET["ref_id"] . "&admin_mode=settings&cmd=create&baseClass=ilAdministrationGUI");
361  $gui->render();
362  }
363 
364 
365  public function showTree() {
366  $tree = new ilOrgUnitExplorerGUI("orgu_explorer", "ilObjOrgUnitGUI", "showTree", new ilTree(1));
367  $tree->setTypeWhiteList(array( "orgu" ));
368  if (!$tree->handleCommand()) {
369  $this->tpl->setLeftNavContent($tree->getHTML());
370  }
371  $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $_GET["ref_id"]);
372  }
373 
374 
378  public function setTitleAndDescription() {
379  # all possible create permissions
380  //$possible_ops_ids = $rbacreview->getOperationsByTypeAndClass('orgu', 'create');
381  parent::setTitleAndDescription();
382  if ($this->object->getTitle() == "__OrgUnitAdministration") {
383  $this->tpl->setTitle($this->lng->txt("objs_orgu"));
384  $this->tpl->setDescription($this->lng->txt("objs_orgu"));
385  }
386 
387  // Check for custom icon of type
388  if ($this->ilias->getSetting('custom_icons')) {
389  $icons_cache = ilObjOrgUnit::getIconsCache();
390  $icon_file = (isset($icons_cache[$this->object->getId()])) ? $icons_cache[$this->object->getId()] : '';
391  if ($icon_file) {
392  $this->tpl->setTitleIcon($icon_file, $this->lng->txt("obj_" . $this->object->getType()));
393  }
394  }
395  }
396 
397 
398  protected function addAdminLocatorItems() {
399  $path = $this->tree->getPathFull($_GET["ref_id"], ilObjOrgUnit::getRootOrgRefId());
400  // add item for each node on path
401  foreach ((array)$path as $key => $row) {
402  if ($row["title"] == "__OrgUnitAdministration") {
403  $row["title"] = $this->lng->txt("objs_orgu");
404  }
405  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $row["child"]);
406  $this->ilLocator->addItem($row["title"], $this->ctrl->getLinkTargetByClass("ilobjorgunitgui", "view"), ilFrameTargetInfo::_getFrame("MainContent"), $row["child"]);
407  $this->ctrl->setParameterByClass("ilobjorgunitgui", "ref_id", $_GET["ref_id"]);
408  }
409  }
410 
411 
416  protected function redirectToRefId($a_ref_id, $a_cmd = "") {
417  $obj_type = ilObject::_lookupType($a_ref_id, true);
418  if ($obj_type != "orgu") {
419  parent::redirectToRefId($a_ref_id, $a_cmd);
420  } else {
421  $this->ctrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $a_ref_id);
422  $this->ctrl->redirectByClass("ilObjOrgUnitGUI", $a_cmd);
423  }
424  }
425 
426 
430  public function getTabs(ilTabsGUI $tabs_gui = NULL) {
431  if ($this->ilAccess->checkAccess('read', '', $this->object->getRefId())) {
432  $this->tabs_gui->addTab("view_content", $this->lng->txt("content"), $this->ctrl->getLinkTarget($this, ""));
433  $this->tabs_gui->addTab("info_short", "Info", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
434  }
435 
436  // Tabs for OrgUnits exclusive root!
437  if ($this->object->getRefId() != ilObjOrgUnit::getRootOrgRefId()) {
438  if (ilObjOrgUnitAccess::_checkAccessStaff($this->object->getRefId())) {
439  $this->tabs_gui->addTab("orgu_staff", $this->lng->txt("orgu_staff"), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", "showStaff"));
440  }
441  if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) {
442  $this->tabs_gui->addTab("settings", $this->lng->txt("settings"), $this->ctrl->getLinkTarget($this, 'editSettings'));
443  }
444  if (ilObjOrgUnitAccess::_checkAccessAdministrateUsers($this->object->getRefId())) {
445  $this->tabs_gui->addTab("administrate_users", $this->lng->txt("administrate_users"), $this->ctrl->getLinkTargetByClass("ilLocalUserGUI", "index"));
446  }
447  }
448 
449  if ($this->ilAccess->checkAccess('write', '', $this->object->getRefId())) {
450  $this->tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilorgunitexportgui', ''), 'export', 'ilorgunitexportgui');
451 
452  // Add OrgUnit types tab
453  if ($this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
454  $this->tabs_gui->addTab('orgu_types', $this->lng->txt('orgu_types'), $this->ctrl->getLinkTargetByClass('ilOrgUnitTypeGUI'));
455  }
456  }
457  parent::getTabs($this->tabs_gui);
458  }
459 
460 
464  protected function setSubTabsSettings($active_tab_id) {
465  $next_class = $this->ctrl->getNextClass($this);
466  $cmd = $this->ctrl->getCmd();
467  $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings'));
468  $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
469 
470  $ilOrgUnitType = $this->object->getOrgUnitType();
471  if ($ilOrgUnitType instanceof ilOrgUnitType) {
472  if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
473  $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
474  }
475  }
476 
477  $this->tabs_gui->setSubTabActive($active_tab_id);
478  switch ($next_class) {
479  case 'iltranslationgui':
480  $this->tabs_gui->setSubTabActive("edit_translations");
481  break;
482  case '':
483  switch ($cmd) {
484  case 'editSettings':
485  $this->tabs_gui->setSubTabActive('edit_settings');
486  break;
487  case 'editAdvancedSettings':
488  case 'updateAdvancedSettings':
489  $this->tabs_gui->setSubTabActive('edit_advanced_settings');
490  break;
491  }
492  break;
493  }
494 
495  return;
496  }
497 
501  function setContentSubTabs()
502  {
504  //only display the import tab at the first level
505  if ($this->ilAccess->checkAccess("write", "", $_GET["ref_id"]) AND $this->object->getRefId() == ilObjOrgUnit::getRootOrgRefId()) {
506  $this->tabs_gui->addSubTab("import", $this->lng->txt("import"), $this->ctrl->getLinkTargetByClass("ilOrgUnitSimpleImportGUI", "chooseImport"));
507  }
508  }
509 
510 
516  protected function initAdvancedSettingsForm() {
517  $form = new ilPropertyFormGUI();
518  $form->setFormAction($this->ctrl->getFormAction($this));
519  $form->addCommandButton('updateAdvancedSettings', $this->lng->txt('save'));
520  $form->addCommandButton('editSettings', $this->lng->txt('cancel'));
521 
522  return $form;
523  }
524 
525 
529  protected function editAdvancedSettings() {
530  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
531  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
532  $this->ctrl->redirect($this);
533  }
534  $form = $this->initAdvancedSettingsForm();
535  $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
536  $gui->setPropertyForm($form);
537  $gui->parse();
538  $this->tpl->setContent($form->getHTML());
539  }
540 
541 
545  protected function updateAdvancedSettings() {
546  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
547  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
548  $this->ctrl->redirect($this);
549  }
550  $form = $this->initAdvancedSettingsForm();
551  $gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
552  $gui->setPropertyForm($form);
553  $form->checkInput();
554  $gui->parse();
555  if ($gui->importEditFormPostValues()) {
556  $gui->writeEditForm();
557  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
558  $this->ctrl->redirect($this, 'editAdvancedSettings');
559  } else {
560  $this->tpl->setContent($form->getHTML());
561  }
562  }
563 
564  public function editSettings() {
565  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
566  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
567  $this->ctrl->redirect($this);
568  }
569  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
570  $this->tpl->setContent($form->getHTML());
571  }
572 
573 
574  public function updateSettings() {
575  if (!$this->ilAccess->checkAccess("write", "", $this->ref_id)) {
576  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
577  $this->ctrl->redirect($this);
578  }
579  $form = new ilObjOrgUnitSettingsFormGUI($this, $this->object);
580  if ($form->saveObject()) {
581  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
582  $this->ctrl->redirect($this, 'editSettings');
583  } else {
584  $this->tpl->setContent($form->getHTML());
585  }
586  }
587 
588 
589  public function showAdministrationPanel($tpl) {
590  parent::showAdministrationPanel($tpl);
591  //an ugly encapsulation violation in order to remove the "verknüpfen"/"link" and copy button.
593  if (!$toolbar = $tpl->admin_panel_commands_toolbar) {
594  return;
595  }
596  if (is_array($toolbar->items)) {
597  foreach ($toolbar->items as $key => $item) {
598  if ($item["cmd"] == "link" || $item["cmd"] == "copy" || $item["cmd"] == "download") {
599  unset($toolbar->items[$key]);
600  }
601  }
602  }
603  }
604 
605 
606  public static function _goto($ref_id) {
607  global $ilCtrl;
608  $ilCtrl->initBaseClass("ilAdministrationGUI");
609  $ilCtrl->setTargetScript("ilias.php");
610  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "ref_id", $ref_id);
611  $ilCtrl->setParameterByClass("ilObjOrgUnitGUI", "admin_mode", "settings");
612  $ilCtrl->redirectByClass(array( "ilAdministrationGUI", "ilObjOrgUnitGUI" ), "view");
613  }
614 
615 
616  protected function getTreeSelectorGUI($cmd) {
617  global $tree;
618  $explorer = new ilOrgUnitExplorerGUI("rep_exp_sel", $this, "showPasteTree", $tree);
619  $explorer->setAjax(false);
620  $explorer->setSelectMode('nodes[]', false);
621 
622  return $explorer;
623  }
624 
625 
629  public function getAdminTabs(ilTabsGUI $tabs_gui) {
630  $this->getTabs($tabs_gui);
631  }
632 
633 
637  public function performPaste() {
638 
639  if (!in_array($_SESSION['clipboard']['cmd'], array( 'cut' ))) {
640  $message = __METHOD__ . ": cmd was not 'cut' ; may be a hack attempt!";
641  $this->ilias->raiseError($message, $this->ilias->error_obj->WARNING);
642  }
643  if ($_SESSION['clipboard']['cmd'] == 'cut') {
644  if (isset($_GET['ref_id']) && (int)$_GET['ref_id']) {
645  $_POST['nodes'] = array( $_GET['ref_id'] );
647  }
648  }
649  $this->ctrl->returnToParent($this);
650  }
651 
652 
657  }
658 
659  //
660  // METHODS for local user administration.
661  //
666  public function __initTableGUI() {
667  return parent::__initTableGUI();
668  }
669 
670 
675  public function __setTableGUIBasicData(&$tbl, &$a_result_set, $a_from, $a_form) {
676  return parent::__setTableGUIBasicData($tbl, $a_result_set, $a_from, $a_form);
677  }
678 }
679 
680 ?>
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
setSubTabsSettings($active_tab_id)
Class ilInfoScreenGUI.
$_POST['username']
Definition: cron.php:12
__setTableGUIBasicData(&$tbl, &$a_result_set, $a_from, $a_form)
$_SESSION["AccountId"]
Tabs GUI.
This class represents a property form user interface.
Class ilOrgUnitType.
setPropertyForm($form)
set property form object
$_GET["client_id"]
$tbl
Definition: example_048.php:81
static _checkAccessStaff($ref_id)
Class ilLocalUserGUI.
$cmd
Definition: sahs_server.php:35
Class ilObjOrgUnit GUI class.
initCreationForms($a_new_type)
initCreationForms
logging
Definition: class.ilLog.php:18
Class ilOrgUnitSimpleImportGUI.
initAdvancedSettingsForm()
Initialize the form for editing advanced meta data.
Class ilOrgUnitExportGUI.
setContentSubTabs()
Set content sub tabs.
global $ilCtrl
Definition: ilias.php:18
initImportForm($a_new_type)
Init object import form.
$info
Definition: example_052.php:80
setInfoObject($info)
get info sections
getTabs(ilTabsGUI $tabs_gui=NULL)
Class ilTranslationGUI.
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.
Class ilOrgUnitTypeGUI.
initCreateForm($a_new_type)
Init object creation form.
editAdvancedSettings()
Edit Advanced Metadata.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getRootOrgRefId()
performPaste()
Prepare $_POST for the generic method performPasteIntoMultipleObjectsObject
redirectToRefId($a_ref_id, $a_cmd="")
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilOrgUnitStaffGUI.
Render add new item selector.
getAdminTabs(ilTabsGUI $tabs_gui)
$path
Definition: index.php:22
Class ilObjOrgUnitSettingsFormGUI.
Class ilObjUserFolderGUI.
Class ilOrgUnitSimpleUserImportGUI.
Class ilOrgUnitExplorerGUI.
Class ilContainerGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
showAdministrationPanel(&$tpl)
show administration panel
Class ilObjUserGUI.
static _checkAccessToUserLearningProgress($ref_id, $usr_id)
Class ilObjUserTrackingGUI.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.