/** * Assign skill to question */ function assignSkillToQuestion() { global $ilUser, $tpl, $ilCtrl, $lng, $ilTabs; $ilCtrl->saveParameter($this, "q_id"); include_once "./Services/Skill/classes/class.ilSkillSelectorGUI.php"; $sel = new ilSkillSelectorGUI($this, "assignSkillToQuestion", $this, "selectSkillForQuestion"); if (!$sel->handleCommand()) { $tpl->setContent($sel->getHTML()); } return; /* include_once("./Services/Skill/classes/class.ilSkillTree.php"); $skill_tree = new ilSkillTree(); require_once ("./Modules/Survey/classes/class.ilSurveySkillExplorer.php"); $exp = new ilSurveySkillExplorer($ilCtrl->getLinkTarget($this, "assignSkillToQuestion")); $exp->setTargetGet("obj_id"); $exp->setExpandTarget($ilCtrl->getLinkTarget($this, "assignSkillToQuestion")); if ($_GET["skpexpand"] == "") { $expanded = $skill_tree->readRootId(); } else { $expanded = $_GET["skpexpand"]; } $exp->setExpand($expanded); // build html-output $exp->setOutput(0); $output = $exp->getOutput(); // asynchronous output if ($ilCtrl->isAsynch()) { echo $output; exit; } $tpl->setContent($output); */ }
/** * @return ilSkillSelectorGUI */ private function buildSkillSelectorExplorerGUI($assignments) { require_once 'Services/Skill/classes/class.ilSkillSelectorGUI.php'; $skillSelectorExplorerGUI = new ilSkillSelectorGUI($this, self::CMD_SHOW_SKILL_SELECT, $this, self::CMD_UPDATE_SKILL_QUEST_ASSIGNS, self::PARAM_SKILL_SELECTION); $skillSelectorExplorerGUI->setSelectMode(self::PARAM_SKILL_SELECTION, true); $skillSelectorExplorerGUI->setNodeOnclickEnabled(false); // parameter name for skill selection is actually taken from value passed to constructor, // but passing a non empty name to setSelectMode is neccessary to keep input fields enabled foreach ($assignments as $assignment) { $id = "{$assignment->getSkillBaseId()}:{$assignment->getSkillTrefId()}"; //$skillSelectorExplorerGUI->setNodeSelected($id); $skillSelectorExplorerGUI->setSkillSelected($id); } return $skillSelectorExplorerGUI; }
/** * Assign Level */ function assignLevel() { global $lng, $ilTabs, $ilCtrl, $tpl; $tpl->setTitle($lng->txt("skmg_profile") . ": " . $this->profile->getTitle()); $tpl->setDescription(""); //$this->setTabs("levels"); ilUtil::sendInfo($lng->txt("skmg_select_skill_level_assign")); $ilTabs->clearTargets(); $ilTabs->setBackTarget($lng->txt("back"), $ilCtrl->getLinkTarget($this, "showLevels")); include_once "./Services/Skill/classes/class.ilSkillSelectorGUI.php"; $exp = new ilSkillSelectorGUI($this, "assignLevel", $this, "assignLevelSelectSkill", "cskill_id"); if (!$exp->handleCommand()) { $tpl->setContent($exp->getHTML()); } }