ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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 ($questionList)
 
 getObjectiveOrientedContainer ()
 
 setObjectiveOrientedContainer ($objectiveOrientedContainer)
 
 executeCommand ()
 
 setTestSession (ilTestSession $testSession)
 
 getTestSession ()
 
 setNoSkillProfileOptionEnabled (bool $noSkillProfileOptionEnabled)
 
 setAvailableSkillProfiles (array $availableSkillProfiles)
 
 setAvailableSkills (array $availableSkills)
 

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 $noSkillProfileOptionEnabled = false
 
array $availableSkillProfiles = []
 
array $available_skills = []
 
ilTestPassesSelector $testPassesSelector = null
 

Private Member Functions

 showCmd ()
 
 buildEvaluationToolbarGUI (int $selectedSkillProfileId)
 

Private Attributes

ilTestSession $testSession
 
ilTestObjectiveOrientedContainer $objectiveOrientedContainer
 
ilAssQuestionList $questionList
 

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  $selectedSkillProfileId)
private

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

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

Referenced by showCmd().

182  {
183  if (!$this->noSkillProfileOptionEnabled && $selectedSkillProfileId === null) {
184  $selectedSkillProfileId = key($this->availableSkillProfiles) ?? 0;
185  }
186 
187  $gui = new ilTestSkillEvaluationToolbarGUI($this->ctrl, $this->lng);
188  $gui->setAvailableSkillProfiles($this->availableSkillProfiles);
189  $gui->setNoSkillProfileOptionEnabled($this->noSkillProfileOptionEnabled);
190  $gui->setSelectedEvaluationMode($selectedSkillProfileId);
191  $gui->build();
192  return $gui;
193  }
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 97 of file class.ilTestSkillEvaluationGUI.php.

References ILIAS\Repository\ctrl().

98  {
99  $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
100  $this->$cmd();
101  }
+ Here is the call graph for this function:

◆ getObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::getObjectiveOrientedContainer ( )

◆ getQuestionList()

ilTestSkillEvaluationGUI::getQuestionList ( )
Returns
ilAssQuestionList

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

References $questionList.

Referenced by init().

+ Here is the caller graph for this function:

◆ getTestSession()

ilTestSkillEvaluationGUI::getTestSession ( )

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

References $testSession.

Referenced by init().

200  : ilTestSession
201  {
202  return $this->testSession;
203  }
+ Here is the caller graph for this function:

◆ init()

ilTestSkillEvaluationGUI::init ( bool  $skill_profile_enabled)
protected

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

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

Referenced by showCmd().

103  : void
104  {
105  $this->testPassesSelector = new ilTestPassesSelector($this->db, $this->test_obj);
106  $this->testPassesSelector->setActiveId($this->testSession->getActiveId());
107  $this->testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
108 
109  $skillEvaluation = new ilTestSkillEvaluation(
110  $this->db,
111  $this->logger,
112  $this->test_obj->getTestId(),
113  $this->test_obj->getRefId(),
114  $this->skills_service->profile(),
115  $this->skills_service->personal()
116  );
117 
118  $skillEvaluation->setUserId($this->getTestSession()->getUserId());
119  $skillEvaluation->setActiveId($this->getTestSession()->getActiveId());
120 
121  $skillEvaluation->setNumRequiredBookingsForSkillTriggering(
122  $this->test_obj->getGlobalSettings()->getSkillTriggeringNumberOfAnswers()
123  );
124 
125  $skillEvaluation->init($this->getQuestionList());
126 
127  $availableSkillProfiles = $skillEvaluation->getAssignedSkillMatchingSkillProfiles();
129  $skillEvaluation->noProfileMatchingAssignedSkillExists($availableSkillProfiles)
130  );
132 
133  // should be reportedPasses - yes - indeed, skill level status will not respect - avoid confuse here
134  $evaluationPasses = $this->testPassesSelector->getExistingPasses();
135 
136  $availableSkills = [];
137 
138  foreach ($evaluationPasses as $evalPass) {
139  $testResults = $this->test_obj->getTestResult($this->getTestSession()->getActiveId(), $evalPass, true);
140 
141  $skillEvaluation->setPass($evalPass);
142  $skillEvaluation->evaluate($testResults);
143 
144  if ($skill_profile_enabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS) {
145  $skills = $skillEvaluation->getSkillsInvolvedByAssignment();
146  } else {
147  $skills = $skillEvaluation->getSkillsMatchingNumAnswersBarrier();
148  }
149 
150  $availableSkills = array_merge($availableSkills, $skills);
151  }
152 
153  $this->setAvailableSkills(array_values($availableSkills));
154  }
setAvailableSkillProfiles(array $availableSkillProfiles)
setAvailableSkills(array $availableSkills)
setNoSkillProfileOptionEnabled(bool $noSkillProfileOptionEnabled)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

ilTestSkillEvaluationGUI::setAvailableSkillProfiles ( array  $availableSkillProfiles)

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

References $availableSkillProfiles.

Referenced by init().

210  : void
211  {
212  $this->availableSkillProfiles = $availableSkillProfiles;
213  }
+ Here is the caller graph for this function:

◆ setAvailableSkills()

ilTestSkillEvaluationGUI::setAvailableSkills ( array  $availableSkills)

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

Referenced by init().

215  : void
216  {
217  $this->available_skills = $availableSkills;
218  }
+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationGUI::setNoSkillProfileOptionEnabled ( bool  $noSkillProfileOptionEnabled)

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

References $noSkillProfileOptionEnabled.

Referenced by init().

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

◆ setObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::setObjectiveOrientedContainer (   $objectiveOrientedContainer)
Parameters
ilTestObjectiveOrientedContainer$objectiveOrientedContainer

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

References $objectiveOrientedContainer.

93  {
94  $this->objectiveOrientedContainer = $objectiveOrientedContainer;
95  }
ilTestObjectiveOrientedContainer $objectiveOrientedContainer

◆ setQuestionList()

ilTestSkillEvaluationGUI::setQuestionList (   $questionList)
Parameters
ilAssQuestionList$questionList

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

References $questionList.

77  {
78  $this->questionList = $questionList;
79  }

◆ setTestSession()

ilTestSkillEvaluationGUI::setTestSession ( ilTestSession  $testSession)

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

References $testSession.

195  : void
196  {
197  $this->testSession = $testSession;
198  }

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

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

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

157  {
158  $skill_profile_selected = $this->testrequest->isset(self::SKILL_PROFILE_PARAM);
159  $selected_skill_profile = $this->testrequest->int(self::SKILL_PROFILE_PARAM);
160 
161  $this->init($skill_profile_selected);
162 
163  $personal_skills_gui = new ilPersonalSkillsGUI();
164  $personal_skills_gui->setGapAnalysisActualStatusModePerObject(
165  $this->test_obj->getId(),
166  $this->lng->txt('tst_test_result')
167  );
168  $personal_skills_gui->setTriggerObjectsFilter([$this->test_obj->getId()]);
169  $personal_skills_gui->setHistoryView(true);
170  $personal_skills_gui->setProfileId($selected_skill_profile);
171 
172  $this->tpl->setContent(
173  $this->buildEvaluationToolbarGUI($selected_skill_profile)->getHTML()
174  . $personal_skills_gui->getGapAnalysisHTML(
175  $this->getTestSession()->getUserId(),
177  )
178  );
179  }
buildEvaluationToolbarGUI(int $selectedSkillProfileId)
init(bool $skill_profile_enabled)
Personal skills GUI class.
+ Here is the call graph for this function:

Field Documentation

◆ $available_skills

array ilTestSkillEvaluationGUI::$available_skills = []
protected

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

Referenced by showCmd().

◆ $availableSkillProfiles

array ilTestSkillEvaluationGUI::$availableSkillProfiles = []
protected

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

Referenced by setAvailableSkillProfiles().

◆ $noSkillProfileOptionEnabled

bool ilTestSkillEvaluationGUI::$noSkillProfileOptionEnabled = false
protected

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

Referenced by setNoSkillProfileOptionEnabled().

◆ $objectiveOrientedContainer

ilTestObjectiveOrientedContainer ilTestSkillEvaluationGUI::$objectiveOrientedContainer
private

◆ $questionList

ilAssQuestionList ilTestSkillEvaluationGUI::$questionList
private

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

Referenced by getQuestionList(), and setQuestionList().

◆ $testPassesSelector

ilTestPassesSelector ilTestSkillEvaluationGUI::$testPassesSelector = null
protected

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

◆ $testSession

ilTestSession ilTestSkillEvaluationGUI::$testSession
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: