ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilTestSkillEvaluationGUI Class Reference
+ Collaboration diagram for ilTestSkillEvaluationGUI:

Public Member Functions

 __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)
 
 getQuestionList ()
 
 setQuestionList (ilAssQuestionList $question_list)
 
 getObjectiveOrientedContainer ()
 
 setObjectiveOrientedContainer (ilTestObjectiveOrientedContainer $objective_oriented_container)
 
 executeCommand ()
 
 setTestSession (ilTestSession $test_session)
 
 getTestSession ()
 
 setNoSkillProfileOptionEnabled (bool $no_skill_profile_option_enabled)
 
 setAvailableSkillProfiles (array $available_skill_profiles)
 
 setAvailableSkills (array $available_skills)
 

Data Fields

const INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS = false
 
const SKILL_PROFILE_PARAM = 'skill_profile'
 
const CMD_SHOW = 'show'
 

Protected Member Functions

 init (bool $skill_profile_enabled)
 

Protected Attributes

bool $no_skill_profile_option_enabled = false
 
array $available_skill_profiles = []
 
array $available_skills = []
 
ilTestPassesSelector $test_passes_selector = null
 

Private Member Functions

 showCmd ()
 
 buildEvaluationToolbarGUI (int $selected_skill_profile_id)
 

Private Attributes

ilTestSession $test_session
 
ilTestObjectiveOrientedContainer $objective_oriented_container
 
ilAssQuestionList $question_list
 

Detailed Description

Definition at line 37 of file class.ilTestSkillEvaluationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillEvaluationGUI::__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 
)

Definition at line 53 of file class.ilTestSkillEvaluationGUI.php.

62  {
63  }

Member Function Documentation

◆ buildEvaluationToolbarGUI()

ilTestSkillEvaluationGUI::buildEvaluationToolbarGUI ( int  $selected_skill_profile_id)
private

Definition at line 170 of file class.ilTestSkillEvaluationGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and null.

Referenced by showCmd().

173  if (!$this->no_skill_profile_option_enabled && $selected_skill_profile_id === null) {
174  $selected_skill_profile_id = key($this->available_skill_profiles) ?? 0;
175  }
176 
177  $gui = new ilTestSkillEvaluationToolbarGUI($this->ctrl, $this->lng);
178  $gui->setAvailableSkillProfiles($this->available_skill_profiles);
179  $gui->setNoSkillProfileOptionEnabled($this->no_skill_profile_option_enabled);
180  $gui->setSelectedEvaluationMode($selected_skill_profile_id);
181  $gui->build();
182  return $gui;
183  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillEvaluationGUI::executeCommand ( )

Definition at line 86 of file class.ilTestSkillEvaluationGUI.php.

References ILIAS\Repository\ctrl().

86  : void
87  {
88  $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
89  $this->$cmd();
90  }
+ Here is the call graph for this function:

◆ getObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::getObjectiveOrientedContainer ( )

◆ getQuestionList()

ilTestSkillEvaluationGUI::getQuestionList ( )

Definition at line 65 of file class.ilTestSkillEvaluationGUI.php.

References $question_list.

Referenced by init().

+ Here is the caller graph for this function:

◆ getTestSession()

ilTestSkillEvaluationGUI::getTestSession ( )

Definition at line 190 of file class.ilTestSkillEvaluationGUI.php.

References $test_session.

Referenced by init().

190  : ilTestSession
191  {
192  return $this->test_session;
193  }
+ Here is the caller graph for this function:

◆ init()

ilTestSkillEvaluationGUI::init ( bool  $skill_profile_enabled)
protected

Definition at line 92 of file class.ilTestSkillEvaluationGUI.php.

References getQuestionList(), getTestSession(), ILIAS\Repository\logger(), setAvailableSkillProfiles(), setAvailableSkills(), setNoSkillProfileOptionEnabled(), and ilTestSkillEvaluation\setUserId().

Referenced by showCmd().

92  : void
93  {
94  $this->test_passes_selector = new ilTestPassesSelector($this->db, $this->test_obj);
95  $this->test_passes_selector->setActiveId($this->test_session->getActiveId());
96  $this->test_passes_selector->setLastFinishedPass($this->test_session->getLastFinishedPass());
97 
98  $skill_evaluation = new ilTestSkillEvaluation(
99  $this->db,
100  $this->logger,
101  $this->test_obj->getTestId(),
102  $this->test_obj->getRefId(),
103  $this->skills_service->profile(),
104  $this->skills_service->personal()
105  );
106 
107  $skill_evaluation->setUserId($this->getTestSession()->getUserId());
108  $skill_evaluation->setActiveId($this->getTestSession()->getActiveId());
109 
110  $skill_evaluation->setNumRequiredBookingsForSkillTriggering(
111  $this->test_obj->getGlobalSettings()->getSkillTriggeringNumberOfAnswers()
112  );
113 
114  $skill_evaluation->init($this->getQuestionList());
115 
116  $available_skill_profiles = $skill_evaluation->getAssignedSkillMatchingSkillProfiles();
118  $skill_evaluation->noProfileMatchingAssignedSkillExists($available_skill_profiles)
119  );
121 
122  // should be reportedPasses - yes - indeed, skill level status will not respect - avoid confuse here
123  $evaluation_passes = $this->test_passes_selector->getExistingPasses();
124 
125  $available_skills = [];
126 
127  foreach ($evaluation_passes as $eval_pass) {
128  $test_results = $this->test_obj->getTestResult($this->getTestSession()->getActiveId(), $eval_pass, true);
129 
130  $skill_evaluation->setPass($eval_pass);
131  $skill_evaluation->evaluate($test_results);
132 
133  if ($skill_profile_enabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS) {
134  $skills = $skill_evaluation->getSkillsInvolvedByAssignment();
135  } else {
136  $skills = $skill_evaluation->getSkillsMatchingNumAnswersBarrier();
137  }
138 
139  $available_skills = array_merge($available_skills, $skills);
140  }
141 
142  $this->setAvailableSkills(array_values($available_skills));
143  }
setAvailableSkillProfiles(array $available_skill_profiles)
setAvailableSkills(array $available_skills)
setNoSkillProfileOptionEnabled(bool $no_skill_profile_option_enabled)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

ilTestSkillEvaluationGUI::setAvailableSkillProfiles ( array  $available_skill_profiles)

Definition at line 200 of file class.ilTestSkillEvaluationGUI.php.

References $available_skill_profiles.

Referenced by init().

200  : void
201  {
202  $this->available_skill_profiles = $available_skill_profiles;
203  }
+ Here is the caller graph for this function:

◆ setAvailableSkills()

ilTestSkillEvaluationGUI::setAvailableSkills ( array  $available_skills)

Definition at line 205 of file class.ilTestSkillEvaluationGUI.php.

References $available_skills.

Referenced by init().

205  : void
206  {
207  $this->available_skills = $available_skills;
208  }
+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationGUI::setNoSkillProfileOptionEnabled ( bool  $no_skill_profile_option_enabled)

Definition at line 195 of file class.ilTestSkillEvaluationGUI.php.

References $no_skill_profile_option_enabled.

Referenced by init().

195  : void
196  {
197  $this->no_skill_profile_option_enabled = $no_skill_profile_option_enabled;
198  }
+ Here is the caller graph for this function:

◆ setObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::setObjectiveOrientedContainer ( ilTestObjectiveOrientedContainer  $objective_oriented_container)

Definition at line 80 of file class.ilTestSkillEvaluationGUI.php.

References $objective_oriented_container.

82  : void {
83  $this->objective_oriented_container = $objective_oriented_container;
84  }
ilTestObjectiveOrientedContainer $objective_oriented_container

◆ setQuestionList()

ilTestSkillEvaluationGUI::setQuestionList ( ilAssQuestionList  $question_list)

Definition at line 70 of file class.ilTestSkillEvaluationGUI.php.

References $question_list.

70  : void
71  {
72  $this->question_list = $question_list;
73  }

◆ setTestSession()

ilTestSkillEvaluationGUI::setTestSession ( ilTestSession  $test_session)

Definition at line 185 of file class.ilTestSkillEvaluationGUI.php.

References $test_session.

185  : void
186  {
187  $this->test_session = $test_session;
188  }

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

Definition at line 145 of file class.ilTestSkillEvaluationGUI.php.

References $available_skills, buildEvaluationToolbarGUI(), init(), and ILIAS\Repository\lng().

145  : void
146  {
147  $skill_profile_selected = $this->testrequest->isset(self::SKILL_PROFILE_PARAM);
148  $selected_skill_profile = $this->testrequest->int(self::SKILL_PROFILE_PARAM);
149 
150  $this->init($skill_profile_selected);
151 
152  $personal_skills_gui = new ilPersonalSkillsGUI();
153  $personal_skills_gui->setGapAnalysisActualStatusModePerObject(
154  $this->test_obj->getId(),
155  $this->lng->txt('tst_test_result')
156  );
157  $personal_skills_gui->setTriggerObjectsFilter([$this->test_obj->getId()]);
158  $personal_skills_gui->setHistoryView(true);
159  $personal_skills_gui->setProfileId($selected_skill_profile);
160 
161  $this->tpl->setContent(
162  $this->buildEvaluationToolbarGUI($selected_skill_profile)->getHTML()
163  . $personal_skills_gui->getGapAnalysisHTML(
164  $this->getTestSession()->getUserId(),
166  )
167  );
168  }
buildEvaluationToolbarGUI(int $selected_skill_profile_id)
init(bool $skill_profile_enabled)
Personal skills GUI class.
+ Here is the call graph for this function:

Field Documentation

◆ $available_skill_profiles

array ilTestSkillEvaluationGUI::$available_skill_profiles = []
protected

Definition at line 49 of file class.ilTestSkillEvaluationGUI.php.

Referenced by setAvailableSkillProfiles().

◆ $available_skills

array ilTestSkillEvaluationGUI::$available_skills = []
protected

Definition at line 50 of file class.ilTestSkillEvaluationGUI.php.

Referenced by setAvailableSkills(), and showCmd().

◆ $no_skill_profile_option_enabled

bool ilTestSkillEvaluationGUI::$no_skill_profile_option_enabled = false
protected

Definition at line 48 of file class.ilTestSkillEvaluationGUI.php.

Referenced by setNoSkillProfileOptionEnabled().

◆ $objective_oriented_container

ilTestObjectiveOrientedContainer ilTestSkillEvaluationGUI::$objective_oriented_container
private

◆ $question_list

ilAssQuestionList ilTestSkillEvaluationGUI::$question_list
private

Definition at line 46 of file class.ilTestSkillEvaluationGUI.php.

Referenced by getQuestionList(), and setQuestionList().

◆ $test_passes_selector

ilTestPassesSelector ilTestSkillEvaluationGUI::$test_passes_selector = null
protected

Definition at line 51 of file class.ilTestSkillEvaluationGUI.php.

◆ $test_session

ilTestSession ilTestSkillEvaluationGUI::$test_session
private

Definition at line 44 of file class.ilTestSkillEvaluationGUI.php.

Referenced by getTestSession(), and setTestSession().

◆ CMD_SHOW

const ilTestSkillEvaluationGUI::CMD_SHOW = 'show'

◆ INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS

const ilTestSkillEvaluationGUI::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS = false

Definition at line 39 of file class.ilTestSkillEvaluationGUI.php.

◆ SKILL_PROFILE_PARAM

const ilTestSkillEvaluationGUI::SKILL_PROFILE_PARAM = 'skill_profile'

The documentation for this class was generated from the following file: