Ejemplo n.º 1
0
 function &executeCommand()
 {
     global $rbacsystem, $ilNavigationHistory, $ilAccess, $ilCtrl, $ilTabs;
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     // show repository tree
     $this->showRepTree(true);
     switch ($next_class) {
         case "ilobjusergui":
             include_once './Services/User/classes/class.ilObjUserGUI.php';
             $this->tabs_gui->setTabActive('administrate_users');
             if (!$_GET['obj_id']) {
                 $this->gui_obj = new ilObjUserGUI("", $_GET['ref_id'], true, false);
                 $this->gui_obj->setCreationMode($this->creation_mode);
                 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
             } else {
                 $this->gui_obj = new ilObjUserGUI("", $_GET['obj_id'], false, false);
                 $this->gui_obj->setCreationMode($this->creation_mode);
                 $ret =& $this->ctrl->forwardCommand($this->gui_obj);
             }
             $ilTabs->clearTargets();
             $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
             global $ilHelp;
             $ilHelp->setScreenIdComponent("cat");
             $ilHelp->setScreenId("administrate_user");
             $ilHelp->setSubScreenId($ilCtrl->getCmd());
             break;
         case "ilobjuserfoldergui":
             include_once './Services/User/classes/class.ilObjUserFolderGUI.php';
             $this->gui_obj = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false);
             $this->gui_obj->setUserOwnerId((int) $_GET['ref_id']);
             $this->gui_obj->setCreationMode($this->creation_mode);
             $ret =& $this->ctrl->forwardCommand($this->gui_obj);
             $ilTabs->clearTargets();
             $ilTabs->setBackTarget($this->lng->txt('backto_lua'), $this->ctrl->getLinkTarget($this, 'listUsers'));
             global $ilHelp;
             $ilHelp->setScreenIdComponent("cat");
             $ilHelp->setScreenId("administrate_user");
             $ilHelp->setSubScreenId($ilCtrl->getCmd());
             break;
         case "ilcolumngui":
             $this->checkPermission("read");
             $this->prepareOutput();
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
             $this->renderObject();
             break;
         case 'ilpermissiongui':
             $this->prepareOutput();
             $this->tabs_gui->setTabActive('perm_settings');
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case 'ilinfoscreengui':
             if ($this->info_screen_enabled) {
                 $this->prepareOutput();
                 $this->infoScreen();
             }
             break;
         case 'ilcontainerlinklistgui':
             include_once "Services/Container/classes/class.ilContainerLinkListGUI.php";
             $link_list_gui =& new ilContainerLinkListGUI();
             $ret =& $this->ctrl->forwardCommand($link_list_gui);
             break;
             // container page editing
         // container page editing
         case "ilcontainerpagegui":
             $this->prepareOutput(false);
             $ret = $this->forwardToPageObject();
             if ($ret != "") {
                 $this->tpl->setContent($ret);
             }
             break;
         case 'ilobjectcopygui':
             $this->prepareOutput();
             include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
             $cp = new ilObjectCopyGUI($this);
             $cp->setType('cat');
             $this->ctrl->forwardCommand($cp);
             break;
         case "ilobjstylesheetgui":
             $this->forwardToStyleSheet();
             break;
         case 'ilusertablegui':
             include_once './Services/User/classes/class.ilUserTableGUI.php';
             $u_table = new ilUserTableGUI($this, "listUsers");
             $u_table->initFilter();
             $this->ctrl->setReturn($this, 'listUsers');
             $this->ctrl->forwardCommand($u_table);
             break;
         case "ilcommonactiondispatchergui":
             $this->prepareOutput();
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case 'ildidactictemplategui':
             $this->ctrl->setReturn($this, 'edit');
             include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
             $did = new ilDidacticTemplateGUI($this);
             $this->ctrl->forwardCommand($did);
             break;
         case 'ilexportgui':
             $this->prepareOutput();
             $this->tabs_gui->setTabActive('export');
             include_once './Services/Export/classes/class.ilExportGUI.php';
             $exp = new ilExportGUI($this);
             $exp->addFormat('xml');
             $this->ctrl->forwardCommand($exp);
             break;
         case 'ilobjecttranslationgui':
             $this->checkPermissionBool("write");
             $this->prepareOutput();
             //$this->tabs_gui->setTabActive('export');
             $this->setEditTabs("settings_trans");
             include_once "./Services/Object/classes/class.ilObjectTranslationGUI.php";
             $transgui = new ilObjectTranslationGUI($this);
             $this->ctrl->forwardCommand($transgui);
             break;
         case 'ilobjtaxonomygui':
             $this->checkPermissionBool("write");
             $this->prepareOutput();
             $this->initTaxSubTabs();
             include_once "./Services/Taxonomy/classes/class.ilObjTaxonomyGUI.php";
             $tax = new ilObjTaxonomyGUI();
             $tax->setAssignedObject($this->object->getId());
             $tax->setMultiple(true);
             $tax->setListInfo($this->lng->txt("cntr_tax_list_info"));
             $this->ctrl->forwardCommand($tax);
             break;
         default:
             if ($cmd == "infoScreen") {
                 $this->checkPermission("visible");
             } else {
                 $this->checkPermission("read");
             }
             // add entry to navigation history
             if (!$this->getCreationMode() && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
                 $ilNavigationHistory->addItem($_GET["ref_id"], $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"), "cat");
             }
             $this->prepareOutput();
             include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
             if (is_object($this->object)) {
                 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
             }
             if (!$cmd) {
                 $cmd = "render";
             }
             $cmd .= "Object";
             $this->{$cmd}();
             break;
     }
     $this->addHeaderAction();
     return true;
 }