19 declare(strict_types=1);
99 $cmd = $this->
ctrl->getCmd(self::CMD_SHOW) .
'Cmd';
103 protected function init(
bool $skill_profile_enabled): void
106 $this->testPassesSelector->setActiveId($this->testSession->getActiveId());
107 $this->testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
112 $this->test_obj->getTestId(),
113 $this->test_obj->getRefId(),
114 $this->skills_service->profile(),
115 $this->skills_service->personal()
119 $skillEvaluation->setActiveId($this->
getTestSession()->getActiveId());
121 $skillEvaluation->setNumRequiredBookingsForSkillTriggering(
122 $this->test_obj->getGlobalSettings()->getSkillTriggeringNumberOfAnswers()
127 $availableSkillProfiles = $skillEvaluation->getAssignedSkillMatchingSkillProfiles();
129 $skillEvaluation->noProfileMatchingAssignedSkillExists($availableSkillProfiles)
134 $evaluationPasses = $this->testPassesSelector->getExistingPasses();
136 $availableSkills = [];
138 foreach ($evaluationPasses as $evalPass) {
139 $testResults = $this->test_obj->getTestResult($this->
getTestSession()->getActiveId(), $evalPass,
true);
141 $skillEvaluation->setPass($evalPass);
142 $skillEvaluation->evaluate($testResults);
144 if ($skill_profile_enabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS) {
145 $skills = $skillEvaluation->getSkillsInvolvedByAssignment();
147 $skills = $skillEvaluation->getSkillsMatchingNumAnswersBarrier();
150 $availableSkills = array_merge($availableSkills, $skills);
158 $skill_profile_selected = $this->testrequest->isset(self::SKILL_PROFILE_PARAM);
159 $selected_skill_profile = $this->testrequest->int(self::SKILL_PROFILE_PARAM);
161 $this->
init($skill_profile_selected);
164 $personal_skills_gui->setGapAnalysisActualStatusModePerObject(
165 $this->test_obj->getId(),
166 $this->
lng->txt(
'tst_test_result')
168 $personal_skills_gui->setTriggerObjectsFilter([$this->test_obj->getId()]);
169 $personal_skills_gui->setHistoryView(
true);
170 $personal_skills_gui->setProfileId($selected_skill_profile);
172 $this->tpl->setContent(
174 . $personal_skills_gui->getGapAnalysisHTML(
175 $this->getTestSession()->getUserId(),
183 if (!$this->noSkillProfileOptionEnabled && $selectedSkillProfileId ===
null) {
184 $selectedSkillProfileId = key($this->availableSkillProfiles) ?? 0;
188 $gui->setAvailableSkillProfiles($this->availableSkillProfiles);
189 $gui->setNoSkillProfileOptionEnabled($this->noSkillProfileOptionEnabled);
190 $gui->setSelectedEvaluationMode($selectedSkillProfileId);
217 $this->available_skills = $availableSkills;
setAvailableSkillProfiles(array $availableSkillProfiles)
setAvailableSkills(array $availableSkills)
__construct(private readonly ilObjTest $test_obj, private readonly ilCtrlInterface $ctrl, private readonly ilGlobalTemplateInterface $tpl, private readonly ilLanguage $lng, private readonly ilDBInterface $db, private readonly TestLogger $logger, private readonly SkillService $skills_service, private readonly RequestDataCollector $testrequest)
buildEvaluationToolbarGUI(int $selectedSkillProfileId)
ilTestPassesSelector $testPassesSelector
init(bool $skill_profile_enabled)
setObjectiveOrientedContainer($objectiveOrientedContainer)
const INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setQuestionList($questionList)
Personal skills GUI class.
ilAssQuestionList $questionList
getObjectiveOrientedContainer()
setNoSkillProfileOptionEnabled(bool $noSkillProfileOptionEnabled)
array $availableSkillProfiles
ilTestObjectiveOrientedContainer $objectiveOrientedContainer
const SKILL_PROFILE_PARAM
bool $noSkillProfileOptionEnabled
setTestSession(ilTestSession $testSession)
ilTestSession $testSession