ILIAS  release_8 Revision v8.24
ilTestSkillEvaluationGUI Class Reference
+ Collaboration diagram for ilTestSkillEvaluationGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilTabsGUI $tabs, ilGlobalTemplateInterface $tpl, ilLanguage $lng, ilDBInterface $db, ilObjTest $testOBJ)
 
 getQuestionList ()
 
 setQuestionList ($questionList)
 
 getObjectiveOrientedContainer ()
 
 setObjectiveOrientedContainer ($objectiveOrientedContainer)
 
 executeCommand ()
 
 setTestSession ($testSession)
 
 getTestSession ()
 
 isNoSkillProfileOptionEnabled ()
 
 setNoSkillProfileOptionEnabled ($noSkillProfileOptionEnabled)
 
 getAvailableSkillProfiles ()
 
 setAvailableSkillProfiles ($availableSkillProfiles)
 
 getAvailableSkills ()
 
 setAvailableSkills ($availableSkills)
 

Data Fields

const INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS = false
 
const CMD_SHOW = 'show'
 

Protected Member Functions

 init ($skillProfileEnabled)
 

Protected Attributes

 $testOBJ
 
 $noSkillProfileOptionEnabled = false
 
 $availableSkillProfiles = array()
 
 $availableSkills = array()
 
 $testPassesSelector = null
 

Private Member Functions

 isAccessDenied ()
 
 manageTabs ($cmd)
 
 showCmd ()
 
 buildEvaluationToolbarGUI ($selectedSkillProfileId)
 
 buildPersonalSkillsGUI ($usrId, $selectedSkillProfileId, $availableSkills)
 

Private Attributes

 $ctrl
 
 $tpl
 
 $lng
 
 $db
 
 $testSession
 
 $objectiveOrientedContainer
 
 $questionList
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ buildEvaluationToolbarGUI()

ilTestSkillEvaluationGUI::buildEvaluationToolbarGUI (   $selectedSkillProfileId)
private

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

233 {
234 if (!$this->isNoSkillProfileOptionEnabled() && !$selectedSkillProfileId) {
235 $selectedSkillProfileId = key($this->getAvailableSkillProfiles());
236 }
237
238 $gui = new ilTestSkillEvaluationToolbarGUI($this->ctrl, $this->lng, $this, self::CMD_SHOW);
239
240 $gui->setAvailableSkillProfiles($this->getAvailableSkillProfiles());
241 $gui->setNoSkillProfileOptionEnabled($this->isNoSkillProfileOptionEnabled());
242 $gui->setSelectedEvaluationMode($selectedSkillProfileId);
243
244 $gui->build();
245
246 return $gui;
247 }

References ILIAS\Repository\ctrl(), getAvailableSkillProfiles(), isNoSkillProfileOptionEnabled(), and ILIAS\Repository\lng().

Referenced by showCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildPersonalSkillsGUI()

ilTestSkillEvaluationGUI::buildPersonalSkillsGUI (   $usrId,
  $selectedSkillProfileId,
  $availableSkills 
)
private

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

250 {
251 $gui = new ilTestPersonalSkillsGUI($this->lng, $this->testOBJ->getId());
252
253 $gui->setAvailableSkills($availableSkills);
254 $gui->setSelectedSkillProfile($selectedSkillProfileId);
255
256 //$gui->setReachedSkillLevels($reachedSkillLevels);
257 $gui->setUsrId($usrId);
258
259 return $gui;
260 }

References $availableSkills, and ILIAS\Repository\lng().

Referenced by showCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillEvaluationGUI::executeCommand ( )

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

127 {
128 $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
129
130 $this->manageTabs($cmd);
131
132 $this->$cmd();
133 }

References ILIAS\Repository\ctrl(), and manageTabs().

+ Here is the call graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationGUI::getAvailableSkillProfiles ( )
Returns
array

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

References $availableSkillProfiles.

Referenced by buildEvaluationToolbarGUI().

+ Here is the caller graph for this function:

◆ getAvailableSkills()

ilTestSkillEvaluationGUI::getAvailableSkills ( )
Returns
array

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

313 : array
314 {
316 }

References $availableSkills.

◆ getObjectiveOrientedContainer()

◆ getQuestionList()

ilTestSkillEvaluationGUI::getQuestionList ( )
Returns
ilAssQuestionList

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

References $questionList.

Referenced by init().

+ Here is the caller graph for this function:

◆ getTestSession()

ilTestSkillEvaluationGUI::getTestSession ( )
Returns
\ilTestSession

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

274 {
275 return $this->testSession;
276 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $testSession.

Referenced by init(), and showCmd().

+ Here is the caller graph for this function:

◆ init()

ilTestSkillEvaluationGUI::init (   $skillProfileEnabled)
protected

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

158 {
159 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
160 $this->testPassesSelector = new ilTestPassesSelector($this->db, $this->testOBJ);
161 $this->testPassesSelector->setActiveId($this->testSession->getActiveId());
162 $this->testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
163
164 $assSettings = new ilSetting('assessment');
165 require_once 'Modules/Test/classes/class.ilTestSkillEvaluation.php';
166 $skillEvaluation = new ilTestSkillEvaluation(
167 $this->db,
168 $this->testOBJ->getTestId(),
169 $this->testOBJ->getRefId()
170 );
171
172 $skillEvaluation->setUserId($this->getTestSession()->getUserId());
173 $skillEvaluation->setActiveId($this->getTestSession()->getActiveId());
174
175 $skillEvaluation->setNumRequiredBookingsForSkillTriggering($assSettings->get(
176 'ass_skl_trig_num_answ_barrier',
178 ));
179
180 $skillEvaluation->init($this->getQuestionList());
181
182 $availableSkillProfiles = $skillEvaluation->getAssignedSkillMatchingSkillProfiles();
184 $skillEvaluation->noProfileMatchingAssignedSkillExists($availableSkillProfiles)
185 );
187
188 // should be reportedPasses - yes - indeed, skill level status will not respect - avoid confuse here
189 $evaluationPasses = $this->testPassesSelector->getExistingPasses();
190
191 $availableSkills = array();
192
193 foreach ($evaluationPasses as $evalPass) {
194 $testResults = $this->testOBJ->getTestResult($this->getTestSession()->getActiveId(), $evalPass, true);
195
196 $skillEvaluation->setPass($evalPass);
197 $skillEvaluation->evaluate($testResults);
198
199 if ($skillProfileEnabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS) {
200 $skills = $skillEvaluation->getSkillsInvolvedByAssignment();
201 } else {
202 $skills = $skillEvaluation->getSkillsMatchingNumAnswersBarrier();
203 }
204
205 $availableSkills = array_merge($availableSkills, $skills);
206 }
207
208 $this->setAvailableSkills(array_values($availableSkills));
209 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setAvailableSkillProfiles($availableSkillProfiles)
setNoSkillProfileOptionEnabled($noSkillProfileOptionEnabled)

References $availableSkillProfiles, $availableSkills, ilObjAssessmentFolder\DEFAULT_SKL_TRIG_NUM_ANSWERS_BARRIER, getQuestionList(), getTestSession(), setAvailableSkillProfiles(), setAvailableSkills(), and setNoSkillProfileOptionEnabled().

Referenced by showCmd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAccessDenied()

ilTestSkillEvaluationGUI::isAccessDenied ( )
private

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

135 : bool
136 {
137 return false;
138 }

◆ isNoSkillProfileOptionEnabled()

ilTestSkillEvaluationGUI::isNoSkillProfileOptionEnabled ( )
Returns
boolean

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

References $noSkillProfileOptionEnabled.

Referenced by buildEvaluationToolbarGUI().

+ Here is the caller graph for this function:

◆ manageTabs()

ilTestSkillEvaluationGUI::manageTabs (   $cmd)
private

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

141 {
142 #$this->tabs->clearTargets();
143#
144# $this->tabs->setBackTarget(
145# $this->lng->txt('tst_results_back_introduction'),
146# $this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen')
147# );
148
149# if( $this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired() )
150# {
151# require_once 'Services/Link/classes/class.ilLink.php';
152# $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId());
153# $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink);
154# }
155 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

ilTestSkillEvaluationGUI::setAvailableSkillProfiles (   $availableSkillProfiles)
Parameters
array$availableSkillProfiles

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

306 {
307 $this->availableSkillProfiles = $availableSkillProfiles;
308 }

References $availableSkillProfiles.

Referenced by init().

+ Here is the caller graph for this function:

◆ setAvailableSkills()

ilTestSkillEvaluationGUI::setAvailableSkills (   $availableSkills)
Parameters
array$availableSkills

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

322 {
323 $this->availableSkills = $availableSkills;
324 }

References $availableSkills.

Referenced by init().

+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

ilTestSkillEvaluationGUI::setNoSkillProfileOptionEnabled (   $noSkillProfileOptionEnabled)
Parameters
boolean$noSkillProfileOptionEnabled

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

290 {
291 $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
292 }

References $noSkillProfileOptionEnabled.

Referenced by init().

+ Here is the caller graph for this function:

◆ setObjectiveOrientedContainer()

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

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

122 {
123 $this->objectiveOrientedContainer = $objectiveOrientedContainer;
124 }

References $objectiveOrientedContainer.

◆ setQuestionList()

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

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

106 {
107 $this->questionList = $questionList;
108 }

References $questionList.

◆ setTestSession()

ilTestSkillEvaluationGUI::setTestSession (   $testSession)
Parameters
\ilTestSession$testSession

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

266 {
267 $this->testSession = $testSession;
268 }

References $testSession.

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

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

212 {
213 //ilUtil::sendInfo($this->lng->txt('tst_skl_res_interpretation_hint_msg'));
214
215 $selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
216
217 $this->init($selectedSkillProfile);
218
219 $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($selectedSkillProfile);
220
221 $personalSkillsGUI = $this->buildPersonalSkillsGUI(
222 $this->getTestSession()->getUserId(),
223 $evaluationToolbarGUI->getSelectedEvaluationMode(),
224 $this->getAvailableSkills()
225 );
226
227 $this->tpl->setContent(
228 $this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI)
229 );
230 }
buildEvaluationToolbarGUI($selectedSkillProfileId)
buildPersonalSkillsGUI($usrId, $selectedSkillProfileId, $availableSkills)

References buildEvaluationToolbarGUI(), buildPersonalSkillsGUI(), ILIAS\Repository\ctrl(), ilTestSkillEvaluationToolbarGUI\fetchSkillProfileParam(), getTestSession(), and init().

+ Here is the call graph for this function:

Field Documentation

◆ $availableSkillProfiles

ilTestSkillEvaluationGUI::$availableSkillProfiles = array()
protected

◆ $availableSkills

ilTestSkillEvaluationGUI::$availableSkills = array()
protected

◆ $ctrl

ilTestSkillEvaluationGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilTestSkillEvaluationGUI::$db
private

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

Referenced by __construct().

◆ $lng

ilTestSkillEvaluationGUI::$lng
private

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

Referenced by __construct().

◆ $noSkillProfileOptionEnabled

ilTestSkillEvaluationGUI::$noSkillProfileOptionEnabled = false
protected

◆ $objectiveOrientedContainer

ilTestSkillEvaluationGUI::$objectiveOrientedContainer
private

◆ $questionList

ilTestSkillEvaluationGUI::$questionList
private

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

Referenced by getQuestionList(), and setQuestionList().

◆ $testOBJ

ilTestSkillEvaluationGUI::$testOBJ
protected

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

Referenced by __construct().

◆ $testPassesSelector

ilTestSkillEvaluationGUI::$testPassesSelector = null
protected

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

◆ $testSession

ilTestSkillEvaluationGUI::$testSession
private

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

Referenced by getTestSession(), and setTestSession().

◆ $tpl

ilTestSkillEvaluationGUI::$tpl
private

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

Referenced by __construct().

◆ 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 33 of file class.ilTestSkillEvaluationGUI.php.


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