/** * @return bool */ public function executeCommand() { $cmd = $this->ctrl->getCmd(); switch ($cmd) { case "assignRoles": $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); default: $this->{$cmd}(); break; } return true; }
private function manageTabs($cmd) { $this->tabs->clearTargets(); $this->tabs->setBackTarget($this->lng->txt('tst_results_back_introduction'), $this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen')); if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) { require_once 'Services/Link/classes/class.ilLink.php'; $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId()); $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink); } }
/** * Set Course title and icon in header * */ protected function initHeader() { $lgui = ilObjectListGUIFactory::_getListGUIByType($this->crs->getType()); $this->tpl->setTitle($this->crs->getTitle()); $this->tpl->setDescription($this->crs->getDescription()); if ($this->crs->getOfflineStatus()) { $this->tpl->setAlertProperties($lgui->getAlertProperties()); } $this->tpl->setTitleIcon(ilUtil::getTypeIconPath('crs', $this->crs->getId(), 'big')); $this->ctrl->setParameterByClass('ilrepositorygui', 'ref_id', $this->ref_id); $this->tabs->setBackTarget($this->pl->txt('back_to_course'), $this->ctrl->getLinkTargetByClass('ilrepositorygui')); }
/** * */ public function confirmDeleteSignature() { $signature = srCertificateSignature::find($_GET['signature_id']); $item_html = $signature->getFirstName() . " " . $signature->getLastName() . '<br>'; $this->tabs->clearTargets(); $this->tabs->setBackTarget($this->pl->txt('common_back'), $this->ctrl->getLinkTarget($this, 'view')); ilUtil::sendQuestion($this->pl->txt('signatures_confirm_delete')); $toolbar = new ilToolbarGUI(); $this->ctrl->saveParameter($this, 'signature_id'); $toolbar->addButton($this->pl->txt('confirm'), $this->ctrl->getLinkTarget($this, 'deleteSignature')); $toolbar->addButton($this->pl->txt('cancel'), $this->ctrl->getLinkTarget($this, 'showSignatures')); $this->tpl->setContent($item_html . '</br>' . $toolbar->getHTML()); }
/** * @param ilTabsGUI $tabs_gui */ public function getAdminTabs(ilTabsGUI $tabs_gui) { /** * @var $tree ilTree */ global $tree; if (isset($_GET['admin_mode']) && $_GET['admin_mode'] == 'repository') { $this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'settings'); $tabs_gui->setBackTarget($this->lng->txt('administration'), $this->ctrl->getLinkTargetByClass('iladministrationgui', 'frameset'), ilFrameTargetInfo::_getFrame('MainContent')); $this->ctrl->setParameterByClass('iladministrationgui', 'admin_mode', 'repository'); } if ($tree->getSavedNodeData($this->object->getRefId())) { $tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', get_class($this)); } }
/** * @param ilTabsGUI $ilTabs */ protected function addBackTab(ilTabsGUI $ilTabs) { if ($_GET["calling_test"] > 0 || $_GET["test_ref_id"] > 0) { $ref_id = $_GET["calling_test"]; if (strlen($ref_id) == 0) { $ref_id = $_GET["test_ref_id"]; } if (!$_GET['test_express_mode'] && !$GLOBALS['___test_express_mode']) { $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id={$ref_id}"); } else { $link = ilTestExpressPage::getReturnToPageLink(); $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link); } } else { if (isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) { $ref_id = (int) $_GET['calling_consumer']; $consumer = ilObjectFactory::getInstanceByRefId($ref_id); if ($consumer instanceof ilQuestionEditingFormConsumer) { $ilTabs->setBackTarget($consumer->getQuestionEditingFormBackTargetLabel(), $consumer->getQuestionEditingFormBackTarget($_GET['consumer_context'])); } else { require_once 'Services/Link/classes/class.ilLink.php'; $ilTabs->setBackTarget($this->lng->txt("qpl"), ilLink::_getLink($ref_id)); } } else { $ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions")); } } }
public function executeCommand() { $cmd = $this->ctrl->getCmd(); $next_class = $this->ctrl->getNextClass($this); parent::prepareOutput(); $this->showTree(); switch ($next_class) { case "illocalusergui": $this->tabs_gui->setTabActive('administrate_users'); $ilLocalUserGUI = new ilLocalUserGUI($this); $this->ctrl->forwardCommand($ilLocalUserGUI); break; case "ilextidgui": $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings(); $ilExtIdGUI = new ilExtIdGUI($this); $this->ctrl->forwardCommand($ilExtIdGUI); break; case "ilorgunitsimpleimportgui": $this->tabs_gui->setTabActive("view_content"); $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this); $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); break; case "ilorgunitsimpleuserimportgui": $this->tabs_gui->setTabActive("view_content"); $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this); $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); break; case "ilorgunitstaffgui": case "ilrepositorysearchgui": $this->tabs_gui->setTabActive('orgu_staff'); $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this); $this->ctrl->forwardCommand($ilOrgUnitStaffGUI); break; case "ilobjusergui": switch ($cmd) { case "create": $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['ref_id'], true, false); $ilObjUserGUI->setCreationMode(true); $this->ctrl->forwardCommand($ilObjUserGUI); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; case "view": case "update": $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false); $ilObjUserGUI->setCreationMode(false); $this->ctrl->forwardCommand($ilObjUserGUI); break; case "cancel": $this->ctrl->redirectByClass("illocalusergui", "index"); break; } break; case "ilobjuserfoldergui": $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false); $ilObjUserFolderGUI->setUserOwnerId((int) $_GET['ref_id']); $ilObjUserFolderGUI->setCreationMode(true); $this->ctrl->forwardCommand($ilObjUserFolderGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; case "ilinfoscreengui": $this->tabs_gui->setTabActive("info_short"); if (!$this->ilAccess->checkAccess("visible", "", $this->ref_id)) { $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE); } $info = new ilInfoScreenGUI($this); $this->ctrl->forwardCommand($info); break; case 'ilpermissiongui': $this->tabs_gui->setTabActive('perm_settings'); $ilPermissionGUI = new ilPermissionGUI($this); $this->ctrl->forwardCommand($ilPermissionGUI); break; case "ilcommonactiondispatchergui": include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php"; $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall(); $this->ctrl->forwardCommand($gui); break; case 'illearningprogressgui': case 'illplistofprogressgui': $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff')); if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff"); } $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id"); $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive"); include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php'; $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_USER_FOLDER, USER_FOLDER_ID, $_GET["obj_id"]); $this->ctrl->forwardCommand($new_gui); break; case 'ilorgunitexportgui': $this->tabs_gui->setTabActive('export'); $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this); $ilOrgUnitExportGUI->addFormat('xml'); $this->ctrl->forwardCommand($ilOrgUnitExportGUI); break; case 'iltranslationgui': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings(); $ilTranslationGui = new ilTranslationGUI($this); $this->ctrl->forwardCommand($ilTranslationGui); break; default: switch ($cmd) { case '': case 'view': case 'render': case 'cancel': $this->view(); break; case 'create': parent::createObject(); break; case 'save': parent::saveObject(); break; case 'delete': parent::deleteObject(); break; case 'confirmedDelete': parent::confirmedDeleteObject(); break; case 'cut': parent::cutObject(); break; case 'clear': parent::clearObject(); break; case 'enableAdministrationPanel': parent::enableAdministrationPanelObject(); break; case 'disableAdministrationPanel': parent::disableAdministrationPanelObject(); break; } break; } }
/** * adds tabs to tab gui object * * @param ilTabsGUI $tabs_gui */ function getTabs(&$tabs_gui) { global $ilAccess, $ilUser, $ilHelp; if (preg_match('/^ass(.*?)gui$/i', $this->ctrl->getNextClass($this))) { return; } else { if ($this->ctrl->getNextClass($this) == 'ilassquestionpagegui') { return; } } $ilHelp->setScreenIdComponent("tst"); $hidden_tabs = array(); $template = $this->object->getTemplate(); if ($template) { include_once "Services/Administration/classes/class.ilSettingsTemplate.php"; $template = new ilSettingsTemplate($template, ilObjAssessmentFolderGUI::getSettingsTemplateConfig()); $hidden_tabs = $template->getHiddenTabs(); } // for local use in this f*****g sledge hammer method $curUserHasWriteAccess = $ilAccess->checkAccess("write", "", $this->ref_id); switch ($this->ctrl->getCmdClass()) { // no tabs .. no subtabs .. during test pass case 'iltestoutputgui': // tab handling happens within GUIs // tab handling happens within GUIs case 'iltestevaluationgui': case 'iltestevalobjectiveorientedgui': return; case 'ilmarkschemagui': case 'ilobjtestsettingsgeneralgui': case 'ilobjtestsettingsscoringresultsgui': if ($curUserHasWriteAccess) { $this->getSettingsSubTabs($hidden_tabs); } break; } if ($this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) { require_once 'Services/Link/classes/class.ilLink.php'; $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId()); $tabs_gui->setBackTarget($this->lng->txt('back_to_objective_container'), $courseLink); } switch ($this->ctrl->getCmd()) { case "resume": case "previous": case "next": case "summary": case "directfeedback": case "finishTest": case "outCorrectSolution": case "passDetails": case "showAnswersOfUser": case "outUserResultsOverview": case "backFromSummary": case "show_answers": case "setsolved": case "resetsolved": case "confirmFinish": case "outTestSummary": case "outQuestionSummary": case "gotoQuestion": case "selectImagemapRegion": case "confirmSubmitAnswers": case "finalSubmission": case "postpone": case "redirectQuestion": case "outUserPassDetails": case "checkPassword": case "exportCertificate": case "finishListOfAnswers": case "backConfirmFinish": case "showFinalStatement": return; break; /*case "browseForQuestions": case "filter": case "resetFilter": case "resetTextFilter": case "insertQuestions": // #8497: resetfilter is also used in lp if($this->ctrl->getNextClass($this) != "illearningprogressgui") { return $this->getBrowseForQuestionsTab($tabs_gui); } break;*/ /*case "browseForQuestions": case "filter": case "resetFilter": case "resetTextFilter": case "insertQuestions": // #8497: resetfilter is also used in lp if($this->ctrl->getNextClass($this) != "illearningprogressgui") { return $this->getBrowseForQuestionsTab($tabs_gui); } break;*/ case "scoring": case "certificate": case "certificateservice": case "certificateImport": case "certificateUpload": case "certificateEditor": case "certificateDelete": case "certificateSave": case "defaults": case "deleteDefaults": case "addDefaults": case "applyDefaults": case "inviteParticipants": case "searchParticipants": if ($curUserHasWriteAccess && in_array($this->ctrl->getCmdClass(), array('ilobjtestgui', 'ilcertificategui'))) { $this->getSettingsSubTabs($hidden_tabs); } break; case "export": case "print": break; case "statistics": case "eval_a": case "detailedEvaluation": case "outEvaluation": case "singleResults": case "exportEvaluation": case "evalUserDetail": case "passDetails": case "outStatisticsResultsOverview": case "statisticsPassDetails": $this->getStatisticsSubTabs(); break; } if (strcmp(strtolower(get_class($this->object)), "ilobjtest") == 0) { // questions tab if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('assQuestions', $hidden_tabs)) { $force_active = $_GET["up"] != "" || $_GET["down"] != "" ? true : false; if (!$force_active) { if ($_GET["browse"] == 1) { $force_active = true; } } switch ($this->object->getQuestionSetType()) { case ilObjTest::QUESTION_SET_TYPE_FIXED: $target = $this->ctrl->getLinkTargetByClass('iltestexpresspageobjectgui', 'showPage'); break; case ilObjTest::QUESTION_SET_TYPE_RANDOM: $target = $this->ctrl->getLinkTargetByClass('ilTestRandomQuestionSetConfigGUI'); break; case ilObjTest::QUESTION_SET_TYPE_DYNAMIC: $target = $this->ctrl->getLinkTargetByClass('ilObjTestDynamicQuestionSetConfigGUI'); break; } $tabs_gui->addTarget("assQuestions", $target, array("questions", "createQuestion", "randomselect", "back", "createRandomSelection", "cancelRandomSelect", "insertRandomSelection", "removeQuestions", "moveQuestions", "insertQuestionsBefore", "insertQuestionsAfter", "confirmRemoveQuestions", "cancelRemoveQuestions", "executeCreateQuestion", "cancelCreateQuestion", "addQuestionpool", "saveRandomQuestions", "saveQuestionSelectionMode", "print", "addsource", "removesource", "randomQuestions"), "", "", $force_active); } // info tab if ($ilAccess->checkAccess("read", "", $this->ref_id) && !in_array('info_short', $hidden_tabs)) { $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTarget($this, 'infoScreen'), array("infoScreen", "outIntroductionPage", "showSummary", "setAnonymousId", "outUserListOfAnswerPasses", "redirectToInfoScreen")); } // settings tab if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('settings', $hidden_tabs)) { $settingsCommands = array("marks", "showMarkSchema", "addMarkStep", "deleteMarkSteps", "addSimpleMarkSchema", "saveMarks", "certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave", "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport", "scoring", "defaults", "addDefaults", "deleteDefaults", "applyDefaults", "inviteParticipants", "saveFixedParticipantsStatus", "searchParticipants", "addParticipants"); require_once 'Modules/Test/classes/class.ilObjTestSettingsGeneralGUI.php'; $reflection = new ReflectionClass('ilObjTestSettingsGeneralGUI'); foreach ($reflection->getConstants() as $name => $value) { if (substr($name, 0, 4) == 'CMD_') { $settingsCommands[] = $value; } } require_once 'Modules/Test/classes/class.ilObjTestSettingsScoringResultsGUI.php'; $reflection = new ReflectionClass('ilObjTestSettingsScoringResultsGUI'); foreach ($reflection->getConstants() as $name => $value) { if (substr($name, 0, 4) == 'CMD_') { $settingsCommands[] = $value; } } $settingsCommands[] = ""; // DO NOT KNOW WHAT THIS IS DOING, BUT IT'S REQUIRED $tabs_gui->addTarget("settings", $this->ctrl->getLinkTargetByClass('ilObjTestSettingsGeneralGUI'), $settingsCommands, array("ilmarkschemagui", "ilobjtestsettingsgeneralgui", "ilobjtestsettingsscoringresultsgui", "ilobjtestgui", "ilcertificategui")); } // skill service if ($this->object->isSkillServiceEnabled() && ilObjTest::isSkillManagementGloballyActivated()) { require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentsGUI.php'; $link = $this->ctrl->getLinkTargetByClass(array('ilTestSkillAdministrationGUI', 'ilAssQuestionSkillAssignmentsGUI'), ilAssQuestionSkillAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS); $tabs_gui->addTarget('tst_tab_competences', $link, array(), array()); } if (!in_array('participants', $hidden_tabs)) { // participants $tabs_gui->addTarget("participants", $this->ctrl->getLinkTarget($this, 'participants'), array("participants", "saveClientIP", "removeParticipant", "showParticipantAnswersForAuthor", "deleteAllUserResults", "cancelDeleteAllUserData", "deleteSingleUserResults", "outParticipantsResultsOverview", "outParticipantsPassDetails", "showPassOverview", "showUserAnswers", "participantsAction", "showDetailedResults", 'timing', 'timingOverview', 'npResetFilter', 'npSetFilter', 'showTimingForm'), ""); } } include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php'; if (ilLearningProgressAccess::checkAccess($this->object->getRefId()) && !in_array('learning_progress', $hidden_tabs)) { $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui')); } if ($ilAccess->checkAccess("write", "", $this->ref_id) && !in_array('manscoring', $hidden_tabs)) { include_once "./Modules/Test/classes/class.ilObjAssessmentFolder.php"; $scoring = ilObjAssessmentFolder::_getManualScoring(); if (count($scoring)) { // scoring tab $tabs_gui->addTarget("manscoring", $this->ctrl->getLinkTargetByClass('ilTestScoringGUI', 'showManScoringParticipantsTable'), array('showManScoringParticipantsTable', 'applyManScoringParticipantsFilter', 'resetManScoringParticipantsFilter', 'showManScoringParticipantScreen', 'showManScoringByQuestionParticipantsTable', 'applyManScoringByQuestionFilter', 'resetManScoringByQuestionFilter', 'saveManScoringByQuestion'), ''); } } // Scoring Adjustment $setting = new ilSetting('assessment'); $scoring_adjust_active = (bool) $setting->get('assessment_adjustments_enabled', false); if ($ilAccess->checkAccess("write", "", $this->ref_id) && $scoring_adjust_active && !in_array('scoringadjust', $hidden_tabs)) { // scoring tab $tabs_gui->addTarget("scoringadjust", $this->ctrl->getLinkTargetByClass('ilScoringAdjustmentGUI', 'showquestionlist'), array('showquestionlist', 'savescoringfortest', 'adjustscoringfortest'), ''); } if (($ilAccess->checkAccess("tst_statistics", "", $this->ref_id) || $ilAccess->checkAccess("write", "", $this->ref_id)) && !in_array('statistics', $hidden_tabs)) { // statistics tab $tabs_gui->addTarget("statistics", $this->ctrl->getLinkTargetByClass("iltestevaluationgui", "outEvaluation"), array("statistics", "outEvaluation", "exportEvaluation", "detailedEvaluation", "eval_a", "evalUserDetail", "passDetails", "outStatisticsResultsOverview", "statisticsPassDetails", "singleResults"), ""); } if ($ilAccess->checkAccess("write", "", $this->ref_id)) { if (!in_array('history', $hidden_tabs)) { // history $tabs_gui->addTarget("history", $this->ctrl->getLinkTarget($this, 'history'), "history", ""); } if (!in_array('meta_data', $hidden_tabs)) { // meta data $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', 'listSection'), "", "ilmdeditorgui"); } if (!in_array('export', $hidden_tabs)) { // export tab $tabs_gui->addTarget("export", $this->ctrl->getLinkTargetByClass('iltestexportgui', ''), '', array('iltestexportgui')); } } if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id) && !in_array('permissions', $hidden_tabs)) { $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui'); } } if ($this->testQuestionSetConfigFactory->getQuestionSetConfig()->areDepenciesBroken()) { $hideTabs = array('settings', 'manscoring', 'scoringadjust', 'statistics', 'history', 'export'); foreach ($hideTabs as $tabId) { $tabs_gui->removeTab($tabId); } } }
public function executeCommand() { $cmd = $this->ctrl->getCmd(); $next_class = $this->ctrl->getNextClass($this); parent::prepareOutput(); //Otherwise move-Objects would not work if ($cmd != "cut") { $this->showTree(); } switch ($next_class) { case "illocalusergui": if (!ilObjOrgUnitAccess::_checkAccessAdministrateUsers((int) $_GET['ref_id'])) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirect($this); } $this->tabs_gui->setTabActive('administrate_users'); $ilLocalUserGUI = new ilLocalUserGUI($this); $this->ctrl->forwardCommand($ilLocalUserGUI); break; case "ilorgunitsimpleimportgui": $this->tabs_gui->setTabActive("view_content"); $ilOrgUnitSimpleImportGUI = new ilOrgUnitSimpleImportGUI($this); $this->ctrl->forwardCommand($ilOrgUnitSimpleImportGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); break; case "ilorgunitsimpleuserimportgui": $this->tabs_gui->setTabActive("view_content"); $ilOrgUnitSimpleUserImportGUI = new ilOrgUnitSimpleUserImportGUI($this); $this->ctrl->forwardCommand($ilOrgUnitSimpleUserImportGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); break; case "ilorgunitstaffgui": case "ilrepositorysearchgui": $this->tabs_gui->setTabActive('orgu_staff'); $ilOrgUnitStaffGUI = new ilOrgUnitStaffGUI($this); $this->ctrl->forwardCommand($ilOrgUnitStaffGUI); break; case "ilobjusergui": switch ($cmd) { case "create": $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['ref_id'], true, false); $ilObjUserGUI->setCreationMode(true); $this->ctrl->forwardCommand($ilObjUserGUI); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; case "save": $ilObjUserGUI = new ilObjUserGUI("", $_GET['ref_id'], true, false); $ilObjUserGUI->setCreationMode(true); $this->ctrl->forwardCommand($ilObjUserGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; case "view": case "update": $ilObjUserGUI = new ilObjUserGUI("", (int) $_GET['obj_id'], false, false); $ilObjUserGUI->setCreationMode(false); $this->ctrl->forwardCommand($ilObjUserGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; case "cancel": $this->ctrl->redirectByClass("illocalusergui", "index"); break; } break; case "ilobjuserfoldergui": switch ($cmd) { case "view": $this->ctrl->redirectByClass("illocalusergui", "index"); break; default: $ilObjUserFolderGUI = new ilObjUserFolderGUI("", (int) $_GET['ref_id'], true, false); $ilObjUserFolderGUI->setUserOwnerId((int) $_GET['ref_id']); $ilObjUserFolderGUI->setCreationMode(true); $this->ctrl->forwardCommand($ilObjUserFolderGUI); $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTargetByClass("illocalusergui", 'index')); break; } break; case "ilinfoscreengui": $this->tabs_gui->setTabActive("info_short"); if (!$this->ilAccess->checkAccess("read", "", $this->ref_id) and !$this->ilAccess->checkAccess("visible", "", $this->ref_id)) { $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE); } $info = new ilInfoScreenGUI($this); $this->parseInfoScreen($info); $this->ctrl->forwardCommand($info); // I guess this is how it was supposed to work, but it doesn't... it won't respect our sub-id and sub-type when creating the objects! // So we reimplemented the stuff in the method parseInfoScreen() // $info = new ilInfoScreenGUI($this); // $amd_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'orgu', $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId()); // $amd_gui->setInfoObject($info); // $amd_gui->setSelectedOnly(true); // $amd_gui->parse(); // $this->ctrl->forwardCommand($info); break; case 'ilpermissiongui': $this->tabs_gui->setTabActive('perm_settings'); $ilPermissionGUI = new ilPermissionGUI($this); $this->ctrl->forwardCommand($ilPermissionGUI); break; case "ilcommonactiondispatchergui": include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php"; $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall(); $this->ctrl->forwardCommand($gui); break; case 'illearningprogressgui': case 'illplistofprogressgui': $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt('backto_staff'), $this->ctrl->getLinkTargetByClass("ilOrgUnitStaffGUI", 'showStaff')); if (!ilObjOrgUnitAccess::_checkAccessToUserLearningProgress($this->object->getRefid(), $_GET['obj_id'])) { ilUtil::sendFailure($this->lng->txt("permission_denied"), true); $this->ctrl->redirectByClass("ilOrgUnitStaffGUI", "showStaff"); } $this->ctrl->saveParameterByClass("illearningprogressgui", "obj_id"); $this->ctrl->saveParameterByClass("illearningprogressgui", "recursive"); include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php'; $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_ORG_UNIT, $_GET["ref_id"], $_GET['obj_id']); $this->ctrl->forwardCommand($new_gui); break; case 'ilorgunitexportgui': $this->tabs_gui->setTabActive('export'); $ilOrgUnitExportGUI = new ilOrgUnitExportGUI($this); $ilOrgUnitExportGUI->addFormat('xml'); $this->ctrl->forwardCommand($ilOrgUnitExportGUI); break; case 'iltranslationgui': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings('edit_translations'); $ilTranslationGui = new ilTranslationGUI($this); $this->ctrl->forwardCommand($ilTranslationGui); break; case 'ilorgunittypegui': $this->tabs_gui->setTabActive('orgu_types'); $types_gui = new ilOrgUnitTypeGUI($this); $this->ctrl->forwardCommand($types_gui); break; default: switch ($cmd) { case '': case 'view': case 'render': case 'cancel': case 'cancelDelete': $this->view(); break; case 'performPaste': $this->performPaste(); break; case 'paste': $this->performPaste(); break; case 'performPasteIntoMultipleObjects': $this->performPasteIntoMultipleObjectsObject(); break; case 'create': parent::createObject(); break; case 'save': parent::saveObject(); break; case 'delete': $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); parent::deleteObject(); break; case 'confirmedDelete': parent::confirmedDeleteObject(); break; case 'cut': $this->tabs_gui->clearTargets(); $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this)); parent::cutObject(); break; case 'clear': parent::clearObject(); break; case 'enableAdministrationPanel': parent::enableAdministrationPanelObject(); break; case 'disableAdministrationPanel': parent::disableAdministrationPanelObject(); break; case 'getAsynchItemList': parent::getAsynchItemListObject(); break; case 'editSettings': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings('edit_settings'); $this->editSettings(); break; case 'updateSettings': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings('edit_settings'); $this->updateSettings(); break; case 'editAdvancedSettings': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings('edit_advanced_settings'); $this->editAdvancedSettings(); break; case 'updateAdvancedSettings': $this->tabs_gui->setTabActive("settings"); $this->setSubTabsSettings('edit_advanced_settings'); $this->updateAdvancedSettings(); break; } break; } }
private function manageTabs($cmd) { $this->tabs->clearTargets(); $this->tabs->setBackTarget($this->lng->txt('tst_results_back_introduction'), $this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen')); }