/** * List skills */ function listSkills() { global $tpl, $ilToolbar, $ilCtrl, $lng, $ilTabs; $skmg_set = new ilSetting("skmg"); $enable_skmg = $skmg_set->get("enable_skmg"); if (!$enable_skmg) { ilUtil::sendInfo($lng->txt("skmg_skill_management_deactivated")); } $this->getParentGUI()->showTree(false, $this, "listSkills"); $ilTabs->activateTab("skills"); include_once "./Services/Skill/classes/class.ilSkillCategoryGUI.php"; ilSkillCategoryGUI::addCreationButtons(); include_once "./Services/Skill/classes/class.ilSkillCatTableGUI.php"; $table = new ilSkillCatTableGUI($this, "listSkills", (int) $_GET["obj_id"], ilSkillCatTableGUI::MODE_SCAT); $tpl->setContent($table->getHTML()); }
/** * Execute command * * @access public * */ public function executeCommand() { global $rbacsystem, $ilErr, $ilAccess, $ilTabs; $next_class = $this->ctrl->getNextClass($this); $cmd = $this->ctrl->getCmd(); $this->prepareOutput(); if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) { $ilErr->raiseError($this->lng->txt('no_permission'), $ilErr->WARNING); } switch ($next_class) { case 'ilskillrootgui': include_once "./Services/Skill/classes/class.ilSkillRootGUI.php"; $skrt_gui = new ilSkillRootGUI((int) $_GET["obj_id"], $this); $skrt_gui->setParentGUI($this); $ret = $this->ctrl->forwardCommand($skrt_gui); break; case 'ilskillcategorygui': $this->tabs_gui->activateTab("skills"); include_once "./Services/Skill/classes/class.ilSkillCategoryGUI.php"; $scat_gui = new ilSkillCategoryGUI((int) $_GET["obj_id"]); $scat_gui->setParentGUI($this); $this->showTree(false, $scat_gui, "listItems"); $ret = $this->ctrl->forwardCommand($scat_gui); break; case 'ilbasicskillgui': $this->tabs_gui->activateTab("skills"); include_once "./Services/Skill/classes/class.ilBasicSkillGUI.php"; $skill_gui = new ilBasicSkillGUI((int) $_GET["obj_id"]); $skill_gui->setParentGUI($this); $this->showTree(false, $skill_gui, "edit"); $ret = $this->ctrl->forwardCommand($skill_gui); break; case 'ilskilltemplatecategorygui': $this->tabs_gui->activateTab("skill_templates"); include_once "./Services/Skill/classes/class.ilSkillTemplateCategoryGUI.php"; $sctp_gui = new ilSkillTemplateCategoryGUI((int) $_GET["obj_id"]); $sctp_gui->setParentGUI($this); $this->showTree(true, $sctp_gui, "listItems"); $ret = $this->ctrl->forwardCommand($sctp_gui); break; case 'ilbasicskilltemplategui': $this->tabs_gui->activateTab("skill_templates"); include_once "./Services/Skill/classes/class.ilBasicSkillTemplateGUI.php"; $sktp_gui = new ilBasicSkillTemplateGUI((int) $_GET["obj_id"]); $sktp_gui->setParentGUI($this); $this->showTree(true, $sktp_gui, "edit"); $ret = $this->ctrl->forwardCommand($sktp_gui); break; case 'ilskilltemplatereferencegui': $this->tabs_gui->activateTab("skills"); include_once "./Services/Skill/classes/class.ilSkillTemplateReferenceGUI.php"; $sktr_gui = new ilSkillTemplateReferenceGUI((int) $_GET["obj_id"]); $sktr_gui->setParentGUI($this); $this->showTree(false, $sktr_gui, "listItems"); $ret = $this->ctrl->forwardCommand($sktr_gui); break; case "ilskillprofilegui": $ilTabs->activateTab("profiles"); include_once "./Services/Skill/classes/class.ilSkillProfileGUI.php"; $skprof_gui = new ilSkillProfileGUI(); $ret = $this->ctrl->forwardCommand($skprof_gui); break; case 'ilpermissiongui': $this->tabs_gui->activateTab('permissions'); include_once "Services/AccessControl/classes/class.ilPermissionGUI.php"; $perm_gui =& new ilPermissionGUI($this); $ret = $this->ctrl->forwardCommand($perm_gui); break; default: if (!$cmd || $cmd == 'view') { $cmd = "editSkills"; } if ($cmd == "showTree") { $this->showTree($_GET["templates_tree"]); } else { $this->{$cmd}(); } break; } return true; }