Exemplo n.º 1
0
 /**
  * adds tabs to tab gui object
  *
  * @param	object		$tabs_gui		ilTabsGUI object
  */
 function getTabs($tabs_gui)
 {
     global $ilAccess, $ilUser, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("exc");
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         $tabs_gui->addTab("content", $lng->txt("exc_assignments"), $this->ctrl->getLinkTarget($this, "showOverview"));
     }
     $next_class = strtolower($this->ctrl->getNextClass());
     if ($ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
         $tabs_gui->addTab("info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
     }
     // edit properties
     if ($ilAccess->checkAccess("write", "", $this->ref_id)) {
         /*$tabs_gui->addTab("assignments",
         		$lng->txt("exc_edit_assignments"),
         		$this->ctrl->getLinkTarget($this, 'listAssignments'));*/
         $tabs_gui->addTab("settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, 'edit'));
         $tabs_gui->addTab("grades", $lng->txt("exc_submissions_and_grades"), $this->ctrl->getLinkTarget($this, 'members'));
     }
     // learning progress
     $save_sort_order = $_GET["sort_order"];
     // hack, because exercise sort parameters
     $save_sort_by = $_GET["sort_by"];
     // must not be forwarded to learning progress
     $save_offset = $_GET["offset"];
     $_GET["offset"] = $_GET["sort_by"] = $_GET["sort_order"] = "";
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $tabs_gui->addTab('learning_progress', $lng->txt('learning_progress'), $this->ctrl->getLinkTargetByClass(array('ilobjexercisegui', 'illearningprogressgui'), ''));
     }
     $_GET["sort_order"] = $save_sort_order;
     // hack, part ii
     $_GET["sort_by"] = $save_sort_by;
     $_GET["offset"] = $save_offset;
     // export
     if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
         $tabs_gui->addTab("export", $lng->txt("export"), $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
     }
     // permissions
     if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id)) {
         $tabs_gui->addTab('permissions', $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"));
     }
 }
 /**
  * Adds tabs
  */
 function addTabs($a_act = "")
 {
     global $rbacsystem, $ilUser, $ilTabs, $lng;
     $tabs_gui = $ilTabs;
     // content
     $ilTabs->addTab("content", $lng->txt("content"), $this->ctrl->getLinkTarget($this, "chapters"));
     // info
     $ilTabs->addTab("info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", 'showSummary'));
     // settings
     $ilTabs->addTab("settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, 'properties'));
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId()) and ($this->object->getType() == 'lm' or $this->object->getType() == 'dbk')) {
         $ilTabs->addTab('learning_progress', $lng->txt("learning_progress"), $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''));
     }
     if ($this->object->getType() != "lm") {
         // bibliographical data
         $ilTabs->addTab("bib_data", $lng->txt("bib_data"), $this->ctrl->getLinkTarget($this, "editBibItem"));
     }
     // history
     $ilTabs->addTab("history", $lng->txt("history"), $this->ctrl->getLinkTarget($this, "history"));
     // meta data
     $ilTabs->addTab("meta", $lng->txt("meta_data"), $this->ctrl->getLinkTargetByClass('ilmdeditorgui', ''));
     if ($this->object->getType() == "lm") {
         // export
         $ilTabs->addTab("export", $lng->txt("export"), $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
     }
     // permissions
     if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
         $ilTabs->addTab("perm", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"));
     }
     if ($a_act != "") {
         $ilTabs->activateTab($a_act);
     }
     // presentation view
     $ilTabs->addNonTabbedLink("pres_mode", $lng->txt("cont_presentation_view"), "ilias.php?baseClass=ilLMPresentationGUI&ref_id=" . $this->object->getRefID(), "_top");
 }
Exemplo n.º 3
0
 /**
  * Get tabs
  */
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilUser, $lng, $ilCtrl, $ilAccess, $ilHelp;
     $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
     $ilHelp->setScreenIdComponent("fold");
     $tabs_gui->setTabActive("");
     if ($rbacsystem->checkAccess('read', $this->ref_id)) {
         $tabs_gui->addTab("view_content", $lng->txt("content"), $this->ctrl->getLinkTarget($this, ""));
         //BEGIN ChangeEvent add info tab to category object
         $force_active = $this->ctrl->getNextClass() == "ilinfoscreengui" || strtolower($_GET["cmdClass"]) == "ilnotegui" ? true : false;
         $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass(array("ilobjfoldergui", "ilinfoscreengui"), "showSummary"), array("showSummary", "", "infoScreen"), "", "", $force_active);
         //END ChangeEvent add info tab to category object
     }
     if ($rbacsystem->checkAccess('write', $this->ref_id)) {
         $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "edit"), "edit", "", "", $ilCtrl->getCmd() == "edit");
     }
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('ilobjfoldergui', 'illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilexportgui', ''), 'export', 'ilexportgui');
     }
     if ($rbacsystem->checkAccess('edit_permission', $this->ref_id)) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
     // show clipboard in repository
     if ($_GET["baseClass"] == "ilRepositoryGUI" and !empty($_SESSION['il_rep_clipboard'])) {
         $tabs_gui->addTarget("clipboard", $this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
     }
 }
 /**
  * adds tabs to tab gui object
  */
 function getTabs()
 {
     global $ilUser, $ilAccess, $ilTabs, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("htlm");
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $ilTabs->addTab("id_list_files", $lng->txt("cont_list_files"), $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"));
         $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass(array("ilobjfilebasedlmgui", "ilinfoscreengui"), "showSummary"));
         $ilTabs->addTab("id_settings", $lng->txt("settings"), $this->ctrl->getLinkTarget($this, "properties"));
     }
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $ilTabs->addTab("id_learning_progress", $lng->txt("learning_progress"), $this->ctrl->getLinkTargetByClass(array('ilobjfilebasedlmgui', 'illearningprogressgui'), ''));
     }
     include_once "Services/License/classes/class.ilLicenseAccess.php";
     if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id) and ilLicenseAccess::_isEnabled()) {
         $ilTabs->addTab("id_license", $lng->txt("license"), $this->ctrl->getLinkTargetByClass('illicensegui', ''));
     }
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $ilTabs->addTab("id_meta_data", $lng->txt("meta_data"), $this->ctrl->getLinkTargetByClass('ilmdeditorgui', ''));
         $ilTabs->addTab("id_bib_data", $lng->txt("bib_data"), $this->ctrl->getLinkTarget($this, "editBibItem"));
     }
     // export
     if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
         $ilTabs->addTab("export", $lng->txt("export"), $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
     }
     if ($ilAccess->checkAccess('edit_permission', '', $this->object->getRefId())) {
         $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"));
     }
     require_once "./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php";
     $startfile = ilObjFileBasedLMAccess::_determineStartUrl($this->object->getId());
     if ($startfile != "") {
         $ilTabs->addNonTabbedLink("presentation_view", $this->lng->txt("glo_presentation_view"), "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID(), "_blank");
     }
 }
 /**
  * adds tabs to tab gui object
  *
  * @param	object		$tabs_gui		ilTabsGUI object
  */
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilUser, $ilCtrl, $ilHelp;
     if ($this->ctrl->getCmd() == "delete") {
         return;
     }
     switch ($this->object->getSubType()) {
         case "scorm2004":
             $ilHelp->setScreenIdComponent("sahs13");
             break;
         case "scorm":
             $ilHelp->setScreenIdComponent("sahs12");
             break;
     }
     // file system gui tabs
     // properties
     $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", 1);
     $tabs_gui->addTarget("cont_list_files", $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "", "ilfilesystemgui");
     $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", "");
     // info screen
     $force_active = $this->ctrl->getNextClass() == "ilinfoscreengui" ? true : false;
     $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", "ilinfoscreengui", "", $force_active);
     // properties
     $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "properties"), array("", "properties"), get_class($this));
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
     $privacy = ilPrivacySettings::_getInstance();
     if ($privacy->enabledSahsProtocolData()) {
         // tracking data
         $tabs_gui->addTarget("cont_tracking_data", $this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems", get_class($this));
     }
     // certificate subtab
     include_once "Services/Certificate/classes/class.ilCertificate.php";
     if (ilCertificate::isActive()) {
         // create and insert object in objecttree
         switch ($this->object->getSubType()) {
             case "scorm2004":
             case "scorm":
                 // certificate
                 $tabs_gui->addTarget("certificate", $this->ctrl->getLinkTarget($this, "certificate"), array("certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave", "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport"));
                 break;
         }
     }
     include_once "Services/License/classes/class.ilLicenseAccess.php";
     if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId()) and ilLicenseAccess::_isEnabled()) {
         $tabs_gui->addTarget("license", $this->ctrl->getLinkTargetByClass('illicensegui', ''), "", "illicensegui");
     }
     // edit meta
     $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', ''), "", "ilmdeditorgui");
     // perm
     if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
 }
Exemplo n.º 6
0
 protected function checkLPIcon($a_id)
 {
     global $ilUser;
     // do it once for all chapters
     if ($this->lp_cache[$this->lm_obj->getId()] === null) {
         $this->lp_cache[$this->lm_obj->getId()] = false;
         include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
         if (ilLearningProgressAccess::checkAccess($this->lm_obj->getRefId())) {
             $info = null;
             include_once './Services/Object/classes/class.ilObjectLP.php';
             $olp = ilObjectLP::getInstance($this->lm_obj->getId());
             if ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_MANUAL || $olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_TLT) {
                 include_once "Services/Tracking/classes/class.ilLPStatusFactory.php";
                 $class = ilLPStatusFactory::_getClassById($this->lm_obj->getId(), $olp->getCurrentMode());
                 $info = $class::_getStatusInfo($this->lm_obj->getId());
             }
             // parse collection items
             if (is_array($info["items"])) {
                 foreach ($info["items"] as $item_id) {
                     $status = ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM;
                     if (is_array($info["in_progress"][$item_id]) && in_array($ilUser->getId(), $info["in_progress"][$item_id])) {
                         $status = ilLPStatus::LP_STATUS_IN_PROGRESS_NUM;
                     } else {
                         if (is_array($info["completed"][$item_id]) && in_array($ilUser->getId(), $info["completed"][$item_id])) {
                             $status = ilLPStatus::LP_STATUS_COMPLETED_NUM;
                         }
                     }
                     $this->lp_cache[$this->lm_obj->getId()][$item_id] = $status;
                 }
             }
         }
         include_once './Services/Tracking/classes/class.ilLearningProgressBaseGUI.php';
     }
     if (is_array($this->lp_cache[$this->lm_obj->getId()]) && isset($this->lp_cache[$this->lm_obj->getId()][$a_id])) {
         return ilLearningProgressBaseGUI::_getImagePathForStatus($this->lp_cache[$this->lm_obj->getId()][$a_id]);
     }
 }
Exemplo n.º 7
0
 /**
  * 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);
         }
     }
 }
 /**
  * Manage offline mode for users
  * @global ilTabs $ilTabs
  * $global ilToolbar $ilToolbar
  */
 protected function offlineModeManager()
 {
     global $rbacsystem, $tree, $tpl, $lng, $ilToolbar, $ilCtrl, $ilSetting;
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (!ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     include_once './Modules/ScormAicc/classes/class.ilSCORMOfflineModeUsersTableGUI.php';
     $tbl = new ilSCORMOfflineModeUsersTableGUI($this->object->getId(), $this, 'offlineModeManager');
     $tbl->parse();
     $this->tpl->setContent($tbl->getHTML());
 }
 /**
  * adds tabs to tab gui object
  *
  * @param	object		$tabs_gui		ilTabsGUI object
  */
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilUser, $ilCtrl, $ilHelp;
     if ($this->ctrl->getCmd() == "delete") {
         return;
     }
     switch ($this->object->getSubType()) {
         case "scorm2004":
             $ilHelp->setScreenIdComponent("sahs13");
             break;
         case "scorm":
             $ilHelp->setScreenIdComponent("sahs12");
             break;
     }
     // file system gui tabs
     // properties
     $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", 1);
     $tabs_gui->addTarget("cont_list_files", $this->ctrl->getLinkTargetByClass("ilfilesystemgui", "listFiles"), "", "ilfilesystemgui");
     $ilCtrl->setParameterByClass("ilfilesystemgui", "resetoffset", "");
     // info screen
     $force_active = $this->ctrl->getNextClass() == "ilinfoscreengui" ? true : false;
     $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"), "", "ilinfoscreengui", "", $force_active);
     // properties
     $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "properties"), array("", "properties"), get_class($this));
     // learning progress and offline mode
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         //if scorm && offline_mode activated
         if ($this->object->getSubType() == "scorm2004" || $this->object->getSubType() == "scorm") {
             if ($this->object->getOfflineMode() == true) {
                 $tabs_gui->addTarget("offline_mode_manager", $this->ctrl->getLinkTarget($this, "offlineModeManager"), "offlineModeManager", "ilobjscormlearningmodulegui");
             }
         }
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     // tracking data
     if ($rbacsystem->checkAccess("read_learning_progress", $this->object->getRefId()) || $rbacsystem->checkAccess("edit_learning_progress", $this->object->getRefId())) {
         if ($this->object->getSubType() == "scorm2004" || $this->object->getSubType() == "scorm") {
             include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
             $privacy = ilPrivacySettings::_getInstance();
             if ($privacy->enabledSahsProtocolData()) {
                 $tabs_gui->addTarget("cont_tracking_data", $this->ctrl->getLinkTarget($this, "showTrackingItems"), "showTrackingItems", get_class($this));
             }
         }
     }
     include_once "Services/License/classes/class.ilLicenseAccess.php";
     if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId()) and ilLicenseAccess::_isEnabled()) {
         $tabs_gui->addTarget("license", $this->ctrl->getLinkTargetByClass('illicensegui', ''), "", "illicensegui");
     }
     // edit meta
     $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass('ilmdeditorgui', ''), "", "ilmdeditorgui");
     // perm
     if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
 }
 protected function updateManual()
 {
     global $ilCtrl, $lng;
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->getRefId())) {
         include_once './Services/Object/classes/class.ilObjectLP.php';
         $olp = ilObjectLP::getInstance(ilObject::_lookupObjId($this->getRefId()));
         if ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_COLLECTION_MANUAL) {
             $form = $this->initCollectionManualForm();
             if ($form->checkInput()) {
                 include_once "Services/Tracking/classes/class.ilLPStatusFactory.php";
                 $class = ilLPStatusFactory::_getClassById($this->getObjId(), ilLPObjSettings::LP_MODE_COLLECTION_MANUAL);
                 $class::_setObjectStatus($this->getObjId(), $this->usr_id, $form->getInput("sids"));
                 ilUtil::sendSuccess($lng->txt("settings_saved"), true);
             }
             $ilCtrl->redirect($this, "editmanual");
         }
     }
 }
Exemplo n.º 11
0
 /**
  * Get tabs
  */
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilAccess, $ilUser, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("crs");
     $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
     if ($ilAccess->checkAccess('read', '', $this->ref_id)) {
         $tabs_gui->addTab('view_content', $lng->txt("content"), $this->ctrl->getLinkTarget($this, ''));
     }
     // learning objectives
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         include_once './Modules/Course/classes/class.ilCourseObjective.php';
         if ($this->object->getViewMode() == IL_CRS_VIEW_OBJECTIVE or ilCourseObjective::_getCountObjectives($this->object->getId())) {
             $tabs_gui->addTarget('crs_objectives', $this->ctrl->getLinkTargetByClass('illoeditorgui', ''), 'illoeditorgui');
         }
     }
     if ($ilAccess->checkAccess('visible', '', $this->ref_id)) {
         //$next_class = $this->ctrl->getNextClass($this);
         // this is not nice. tabs should be displayed in ilcoursegui
         // not via ilrepositorygui, then next_class == ilinfoscreengui
         // could be checked
         $force_active = strtolower($_GET["cmdClass"]) == "ilinfoscreengui" || strtolower($_GET["cmdClass"]) == "ilnotegui" ? true : false;
         $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass(array("ilobjcoursegui", "ilinfoscreengui"), "showSummary"), "infoScreen", "", "", $force_active);
     }
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $force_active = strtolower($_GET["cmdClass"]) == "ilconditionhandlergui" && $_GET["item_id"] == "" ? true : false;
         $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings", "editCourseIcons", "listStructure"), "", "", $force_active);
     }
     $is_participant = ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId());
     include_once './Services/Mail/classes/class.ilMail.php';
     $mail = new ilMail($GLOBALS['ilUser']->getId());
     // member list
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "members"), "members", get_class($this));
     } elseif ($this->object->getShowMembers() == $this->object->SHOW_MEMBERS_ENABLED and $is_participant) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "membersGallery"), "members", get_class($this));
     } elseif ($this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL and $GLOBALS['rbacsystem']->checkAccess('internal_mail', $mail->getMailObjectReferenceId()) and $is_participant) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, "mailMembers"), "members", get_class($this));
     }
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui', 'illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     // license overview
     include_once "Services/License/classes/class.ilLicenseAccess.php";
     if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id) and ilLicenseAccess::_isEnabled()) {
         $tabs_gui->addTarget("licenses", $this->ctrl->getLinkTargetByClass('illicenseoverviewgui', ''), "", "illicenseoverviewgui");
     }
     // lom meta data
     if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
         $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui', 'ilmdeditorgui'), 'listSection'), "", "ilmdeditorgui");
     }
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilexportgui', ''), 'export', 'ilexportgui');
     }
     if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id)) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilpermissiongui'), "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
     if ($this->ctrl->getTargetScript() == "adm_object.php") {
         $tabs_gui->addTarget("show_owner", $this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this));
         if ($this->tree->getSavedNodeData($this->ref_id)) {
             $tabs_gui->addTarget("trash", $this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
         }
     }
     // Join/Leave
     if ($ilAccess->checkAccess('join', '', $this->ref_id) and !$this->object->getMemberObject()->isAssigned()) {
         include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
         if (ilCourseWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
             $tabs_gui->addTab('leave', $this->lng->txt('membership_leave'), $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', 'show', ''));
         } else {
             $tabs_gui->addTarget("join", $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', "show"), 'show', "");
         }
     }
     if ($ilAccess->checkAccess('leave', '', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
         $tabs_gui->addTarget("crs_unsubscribe", $this->ctrl->getLinkTarget($this, "unsubscribe"), 'leave', "");
     }
 }
 function getTabs(&$tabs_gui)
 {
     global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
     $ilHelp->setScreenIdComponent("grp");
     if ($rbacsystem->checkAccess('read', $this->ref_id)) {
         $tabs_gui->addTab("view_content", $lng->txt("content"), $this->ctrl->getLinkTarget($this, ""));
     }
     if ($rbacsystem->checkAccess('visible', $this->ref_id)) {
         $tabs_gui->addTarget("info_short", $this->ctrl->getLinkTargetByClass(array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"), "infoScreen", "", "", false);
     }
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this), "");
     }
     $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
     // Members
     $mem_cmd = $ilAccess->checkAccess('write', '', $this->ref_id) ? "members" : "membersGallery";
     if ($mem_cmd != "membersGallery" || $is_participant) {
         $tabs_gui->addTarget("members", $this->ctrl->getLinkTarget($this, $mem_cmd), array(), get_class($this));
     }
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui', 'illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget('export', $this->ctrl->getLinkTargetByClass('ilexportgui', ''), 'export', 'ilexportgui');
     }
     /*
     if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
     {
     	
     	
     	$tabs_gui->addTarget('export',
     						 $this->ctrl->getLinkTarget($this,'listExportFiles'),
     						 array('listExportFiles','exportXML','confirmDeleteExportFile','downloadExportFile'),
     						 get_class($this));
     }
     */
     // parent tabs (all container: edit_permission, clipboard, trash
     parent::getTabs($tabs_gui);
     if ($ilAccess->checkAccess('join', '', $this->object->getRefId()) and !$this->object->members_obj->isAssigned($ilUser->getId())) {
         include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
         if (ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
             $tabs_gui->addTab('leave', $this->lng->txt('membership_leave'), $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', 'show', ''));
         } else {
             $tabs_gui->addTarget("join", $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"), 'show', "");
         }
     }
     if ($ilAccess->checkAccess('leave', '', $this->object->getRefId()) and $this->object->members_obj->isMember($ilUser->getId())) {
         $tabs_gui->addTarget("grp_btn_unsubscribe", $this->ctrl->getLinkTarget($this, "leave"), '', "");
     }
 }
 function setInfoTabs($a_active)
 {
     global $ilTabs, $ilLocator, $ilAccess;
     // #9658
     include_once "Services/Tracking/classes/class.ilLearningProgressAccess.php";
     if (ilLearningProgressAccess::checkAccess($_GET["ref_id"]) && !$ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"])) {
         $ilTabs->addTab("info_short", $this->lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
         $ilTabs->addTab("learning_progress", $this->lng->txt("learning_progress"), $this->ctrl->getLinkTargetByClass(array('illearningprogressgui', 'illplistofprogressgui'), ''));
         $ilTabs->activateTab($a_active);
     }
     $this->tpl->getStandardTemplate();
     $this->tpl->setTitle($this->slm_gui->object->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_slm_b.png"));
     $ilLocator->addRepositoryItems();
     $ilLocator->addItem($this->slm_gui->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $_GET["ref_id"]);
     $this->tpl->setLocator();
 }
Exemplo n.º 14
0
 /**
  * Build tabs
  *
  * @access public
  * 
  */
 public function getTabs($tabs_gui)
 {
     global $ilAccess, $ilTabs, $tree, $ilCtrl, $ilHelp;
     $ilHelp->setScreenIdComponent("sess");
     $parent_id = $tree->getParentId($this->object->getRefId());
     // #11650
     $parent_type = ilObject::_lookupType($parent_id, true);
     $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $parent_id);
     $tabs_gui->setBackTarget($this->lng->txt('back_to_' . $parent_type . '_content'), $ilCtrl->getLinkTargetByClass("ilrepositorygui", ""));
     $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
     $tabs_gui->addTarget('info_short', $this->ctrl->getLinkTarget($this, 'infoScreen'));
     if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $tabs_gui->addTarget('settings', $this->ctrl->getLinkTarget($this, 'edit'));
         $tabs_gui->addTarget('crs_materials', $this->ctrl->getLinkTarget($this, 'materials'));
         $tabs_gui->addTarget('event_edit_members', $this->ctrl->getLinkTarget($this, 'members'));
     }
     // learning progress
     include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
     if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
         $tabs_gui->addTarget('learning_progress', $this->ctrl->getLinkTargetByClass(array('ilobjsessiongui', 'illearningprogressgui'), ''), '', array('illplistofobjectsgui', 'illplistofsettingsgui', 'illearningprogressgui', 'illplistofprogressgui'));
     }
     // export
     if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
         $ilTabs->addTarget("export", $this->ctrl->getLinkTargetByClass("ilexportgui", ""), "", "ilexportgui");
     }
     // edit permissions
     if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
         $tabs_gui->addTarget("perm_settings", $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"), array("perm", "info", "owner"), 'ilpermissiongui');
     }
 }
 /**
  * adds tabs to tab gui object
  *
  * @param	object		$tabs_gui		ilTabsGUI object
  */
 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) == 'ilpageobjectgui') {
             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();
     }
     if ($this->ctrl->getNextClass($this) == 'iltestoutputgui') {
         return;
     }
     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 "scoring":
         case "properties":
         case "marks":
         case "saveMarks":
         case "cancelMarks":
         case "addMarkStep":
         case "deleteMarkSteps":
         case "addSimpleMarkSchema":
         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":
         case "":
             if ($ilAccess->checkAccess("write", "", $this->ref_id) && (strcmp($this->ctrl->getCmdClass(), "ilobjtestgui") == 0 || strcmp($this->ctrl->getCmdClass(), "ilcertificategui") == 0 || strlen($this->ctrl->getCmdClass()) == 0)) {
                 $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;
                 }
                 if (preg_match("/deleteqpl_\\d+/", $this->ctrl->getCmd())) {
                     $force_active = true;
                 }
             }
             if ($this->object->isRandomTest()) {
                 $target = $this->ctrl->getLinkTarget($this, 'questions');
             } else {
                 $target = $this->ctrl->getLinkTargetByClass('iltestexpresspageobjectgui', 'showPage');
             }
             $tabs_gui->addTarget("assQuestions", $target, array("questions", "browseForQuestions", "questionBrowser", "createQuestion", "randomselect", "filter", "resetFilter", "insertQuestions", "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("visible", "", $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)) {
                 $tabs_gui->addTarget("settings", $this->ctrl->getLinkTarget($this, 'properties'), array("properties", "saveProperties", "cancelProperties", "marks", "addMarkStep", "deleteMarkSteps", "addSimpleMarkSchema", "saveMarks", "cancelMarks", "certificate", "certificateEditor", "certificateRemoveBackground", "certificateSave", "certificatePreview", "certificateDelete", "certificateUpload", "certificateImport", "scoring", "defaults", "addDefaults", "deleteDefaults", "applyDefaults", "inviteParticipants", "saveFixedParticipantsStatus", "searchParticipants", "addParticipants", ""), array("", "ilobjtestgui", "ilcertificategui"));
             }
             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"), "");
             }
         }
         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'), '');
             }
         }
         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->getLinkTarget($this, 'export'), array("export", "createExportFile", "confirmDeleteExportFile", "downloadExportFile", "deleteExportFile", "cancelDeleteExportFile"), "");
             }
         }
         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');
         }
     }
 }
 function setInfoTabs($a_active)
 {
     global $ilTabs, $ilLocator, $ilAccess;
     // $ilTabs->clearTargets();
     // #9658 / #11753
     include_once "Services/Tracking/classes/class.ilLearningProgressAccess.php";
     if (ilLearningProgressAccess::checkAccess($_GET["ref_id"]) && (!$ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"]) && !$ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"]) || !$ilAccess->checkAccess("write", "", $_GET["ref_id"]))) {
         $ilTabs->addTab("info_short", $this->lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
         $ilTabs->addTab("learning_progress", $this->lng->txt("learning_progress"), $this->ctrl->getLinkTargetByClass('illearningprogressgui', ''));
     }
     if ($ilAccess->checkAccess("edit_learning_progress", "", $_GET["ref_id"]) || $ilAccess->checkAccess("read_learning_progress", "", $_GET["ref_id"])) {
         include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
         $privacy = ilPrivacySettings::_getInstance();
         if ($privacy->enabledSahsProtocolData()) {
             include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
             $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
             $type = ilObjSAHSLearningModule::_lookupSubType($obj_id);
             if ($type == "scorm2004") {
                 $ilTabs->addTab("cont_tracking_data", $this->lng->txt("cont_tracking_data"), $this->ctrl->getLinkTargetByClass('ilobjscorm2004learningmodulegui', 'showTrackingItems'));
             } else {
                 if ($type == "scorm") {
                     $ilTabs->addTab("cont_tracking_data", $this->lng->txt("cont_tracking_data"), $this->ctrl->getLinkTargetByClass('ilobjscormlearningmodulegui', 'showTrackingItems'));
                 }
             }
         }
     }
     $ilTabs->activateTab($a_active);
     $this->tpl->getStandardTemplate();
     $this->tpl->setTitle($this->slm_gui->object->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm.svg"));
     $ilLocator->addRepositoryItems();
     $ilLocator->addItem($this->slm_gui->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $_GET["ref_id"]);
     $this->tpl->setLocator();
 }