コード例 #1
0
 public function manageTabs($activeSubTabId)
 {
     $link = $this->ctrl->getLinkTargetByClass('iltestskillquestionassignmentsgui', ilTestSkillQuestionAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS);
     $this->tabs->addSubTab('iltestskillquestionassignmentsgui', $this->lng->txt('tst_skl_sub_tab_quest_assign'), $link);
     $link = $this->ctrl->getLinkTargetByClass('iltestskilllevelthresholdsgui', ilTestSkillLevelThresholdsGUI::CMD_SHOW_SKILL_THRESHOLDS);
     $this->tabs->addSubTab('iltestskilllevelthresholdsgui', $this->lng->txt('tst_skl_sub_tab_thresholds'), $link);
     $this->tabs->activateTab('tst_tab_competences');
     $this->tabs->activateSubTab($activeSubTabId);
 }
コード例 #2
0
 public function manageTabs($activeSubTabId)
 {
     $link = $this->ctrl->getLinkTargetByClass('ilAssQuestionSkillAssignmentsGUI', ilAssQuestionSkillAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS);
     $this->tabs->addSubTab('ilassquestionskillassignmentsgui', $this->lng->txt('qpl_skl_sub_tab_quest_assign'), $link);
     $link = $this->ctrl->getLinkTargetByClass('ilAssQuestionSkillUsagesTableGUI', ilAssQuestionSkillUsagesTableGUI::CMD_SHOW);
     $this->tabs->addSubTab('ilassquestionskillusagestablegui', $this->lng->txt('qpl_skl_sub_tab_usages'), $link);
     $this->tabs->activateTab('qpl_tab_competences');
     $this->tabs->activateSubTab($activeSubTabId);
 }
コード例 #3
0
 /**
  * @param $active_tab_id
  */
 protected function setSubTabsSettings($active_tab_id)
 {
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     $this->tabs_gui->addSubTab('edit_settings', $this->lng->txt('settings'), $this->ctrl->getLinkTarget($this, 'editSettings'));
     $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("obj_multilinguality"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
     $ilOrgUnitType = $this->object->getOrgUnitType();
     if ($ilOrgUnitType instanceof ilOrgUnitType) {
         if (count($ilOrgUnitType->getAssignedAdvancedMDRecords(true))) {
             $this->tabs_gui->addSubTab('edit_advanced_settings', $this->lng->txt('orgu_adv_settings'), $this->ctrl->getLinkTarget($this, 'editAdvancedSettings'));
         }
     }
     $this->tabs_gui->setSubTabActive($active_tab_id);
     switch ($next_class) {
         case 'iltranslationgui':
             $this->tabs_gui->setSubTabActive("edit_translations");
             break;
         case '':
             switch ($cmd) {
                 case 'editSettings':
                     $this->tabs_gui->setSubTabActive('edit_settings');
                     break;
                 case 'editAdvancedSettings':
                 case 'updateAdvancedSettings':
                     $this->tabs_gui->setSubTabActive('edit_advanced_settings');
                     break;
             }
             break;
     }
     return;
 }
コード例 #4
0
 public function setTabs()
 {
     $this->tabs_gui->addSubTab("show_staff", sprintf($this->lng->txt("local_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaff"));
     if ($this->ilAccess->checkAccess("view_learning_progress_rec", "", $this->parent_object->getRefId())) {
         $this->tabs_gui->addSubTab("show_staff_rec", sprintf($this->lng->txt("rec_staff"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showStaffRec"));
     }
     if ($this->ilAccess->checkAccess("write", "", $this->parent_object->getRefId())) {
         $this->tabs_gui->addSubTab("show_other_roles", sprintf($this->lng->txt("local_other_roles"), $this->parent_object->getTitle()), $this->ctrl->getLinkTarget($this, "showOtherRoles"));
     }
 }
コード例 #5
0
 /**
  * Set Subtabs
  *
  */
 protected function setSubTabs()
 {
     if ($this->definition !== NULL) {
         $this->tabs->addSubTab('show_certificates', 'Show Certificates', $this->ctrl->getLinkTarget($this, 'showCertificates'));
     }
     $this->tabs->addSubTab('show_definition', 'Definition settings', $this->ctrl->getLinkTarget($this, 'showDefinition'));
     if ($this->definition !== NULL) {
         $this->tabs->addSubTab('show_placeholders', 'Placeholders', $this->ctrl->getLinkTarget($this, 'showPlaceholders'));
     }
 }
コード例 #6
0
 /**
  * Add subtabs for editing type
  */
 protected function setSubTabsEdit($active_tab_id)
 {
     $this->tabs->addSubTab('general', $this->lng->txt('meta_general'), $this->ctrl->getLinkTarget($this, 'edit'));
     if ($this->ilias->getSetting('custom_icons')) {
         $this->tabs->addSubTab('custom_icons', $this->lng->txt('icon_settings'), $this->ctrl->getLinkTarget($this, 'editCustomIcons'));
     }
     if (count(ilOrgUnitType::getAvailableAdvancedMDRecordIds())) {
         $this->tabs->addSubTab('amd', $this->lng->txt('md_advanced'), $this->ctrl->getLinkTarget($this, 'editAMD'));
     }
     $this->tabs->setSubTabActive($active_tab_id);
 }
コード例 #7
0
 private function setSubTabsSettings()
 {
     $next_class = $this->ctrl->getNextClass($this);
     $this->tabs_gui->addSubTab("edit_translations", $this->lng->txt("edit_translations"), $this->ctrl->getLinkTargetByClass("iltranslationgui", "editTranslations"));
     $this->tabs_gui->addSubTab("edit_ext_id", $this->lng->txt("edit_ext_id"), $this->ctrl->getLinkTargetByClass("ilextidgui", "edit"));
     switch ($next_class) {
         case 'iltranslationgui':
             $this->tabs_gui->setSubTabActive("edit_translations");
             break;
         case 'ilextidgui':
             $this->tabs_gui->setSubTabActive("edit_ext_id");
             break;
     }
     return;
 }
コード例 #8
0
 private function handleTabs()
 {
     $this->tabs->activateTab('assQuestions');
     $this->tabs->addSubTab('tstRandQuestSetGeneralConfig', $this->lng->txt('tst_rnd_quest_cfg_tab_general'), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_GENERAL_CONFIG_FORM));
     $this->tabs->addSubTab('tstRandQuestSetPoolConfig', $this->lng->txt('tst_rnd_quest_cfg_tab_pool'), $this->ctrl->getLinkTarget($this, self::CMD_SHOW_SRC_POOL_DEF_LIST));
     switch ($this->ctrl->getCmd(self::CMD_SHOW_GENERAL_CONFIG_FORM)) {
         case self::CMD_SHOW_GENERAL_CONFIG_FORM:
         case self::CMD_SAVE_GENERAL_CONFIG_FORM:
             $this->tabs->activateSubTab('tstRandQuestSetGeneralConfig');
             break;
         case self::CMD_SHOW_SRC_POOL_DEF_LIST:
         case self::CMD_SAVE_SRC_POOL_DEF_LIST:
         case self::CMD_DELETE_SINGLE_SRC_POOL_DEF:
         case self::CMD_DELETE_MULTI_SRC_POOL_DEFS:
         case self::CMD_SHOW_CREATE_SRC_POOL_DEF_FORM:
         case self::CMD_SAVE_CREATE_SRC_POOL_DEF_FORM:
         case self::CMD_SHOW_EDIT_SRC_POOL_DEF_FORM:
         case self::CMD_SAVE_EDIT_SRC_POOL_DEF_FORM:
             $this->tabs->activateSubTab('tstRandQuestSetPoolConfig');
             break;
     }
 }
コード例 #9
0
 /**
  * Builds tabs and subtabs using given $tabs, $config and $command
  * parameters.
  * @param ilTabsGUI $tabs
  * @param array     $config
  * @param array     $command
  */
 private function buildTabs(ilTabsGUI $tabs, $config, $command)
 {
     /**
      * @var $rbacsystem ilRbacSystem
      */
     global $rbacsystem;
     require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
     foreach ($config as $id => $tabDefinition) {
         if (!ilChatroom::checkUserPermissions($tabDefinition['permission'], $this->gui->getRefId(), false)) {
             continue;
         } else {
             if (isset($tabDefinition['enabled']) && !$tabDefinition['enabled']) {
                 continue;
             }
         }
         $tabs->addTab($id, $this->getLabel($tabDefinition, $id), $tabDefinition['link']);
         if ($command[0] == $id && isset($tabDefinition['subtabs']) && is_array($tabDefinition['subtabs'])) {
             foreach ($tabDefinition['subtabs'] as $subid => $subTabDefinition) {
                 if (!$rbacsystem->checkAccess($subTabDefinition['permission'], $this->gui->getRefId())) {
                     continue;
                 } else {
                     if (isset($subTabDefinition['enabled']) && !$subTabDefinition['enabled']) {
                         continue;
                     }
                 }
                 $tabs->addSubTab($subid, $this->getLabel($subTabDefinition, $subid), $subTabDefinition['link']);
             }
         }
     }
 }