private function showCmd() { ilUtil::sendInfo($this->lng->txt('tst_skl_res_interpretation_hint_msg')); $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST); $testSession = $this->getTestSession(); $this->skillEvaluation->setUserId($testSession->getUserId()); $this->skillEvaluation->setActiveId($testSession->getActiveId()); $this->skillEvaluation->setPass($testSession->getPass()); $settings = new ilSetting('assessment'); $this->skillEvaluation->setNumRequiredBookingsForSkillTriggering($settings->get('ass_skl_trig_num_answ_barrier', ilObjAssessmentFolder::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER)); $testResults = $this->getTestResults(); $this->skillEvaluation->init($this->getQuestionList()); $this->skillEvaluation->evaluate($testResults); $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($selectedSkillProfile); $personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile); $this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI)); }
/** * @param ilTestSession $testSession */ protected function handleSkillTriggering(ilTestSession $testSession) { $questionList = $this->buildTestPassQuestionList(); $questionList->load(); $testResults = $this->object->getTestResult($testSession->getActiveId(), $testSession->getPass(), true); require_once 'Modules/Test/classes/class.ilTestSkillEvaluation.php'; $skillEvaluation = new ilTestSkillEvaluation($this->db, $this->object->getTestId(), $this->object->getRefId()); $skillEvaluation->setUserId($testSession->getUserId()); $skillEvaluation->setActiveId($testSession->getActiveId()); $skillEvaluation->setPass($testSession->getPass()); $skillEvaluation->setNumRequiredBookingsForSkillTriggering($this->assSettings->get('ass_skl_trig_num_answ_barrier', ilObjAssessmentFolder::DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER)); $skillEvaluation->init($questionList); $skillEvaluation->evaluate($testResults); $skillEvaluation->handleSkillTriggering(); }