ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTestSkillEvaluationGUI Class Reference
+ Collaboration diagram for ilTestSkillEvaluationGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilTabsGUI $tabs, ilTemplate $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)
 
 isTestResultButtonRequired ()
 
 buildPersonalSkillsGUI ($usrId, $selectedSkillProfileId, $availableSkills)
 

Private Attributes

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

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillEvaluationGUI::__construct ( ilCtrl  $ctrl,
ilTabsGUI  $tabs,
ilTemplate  $tpl,
ilLanguage  $lng,
ilDBInterface  $db,
ilObjTest  $testOBJ 
)

Member Function Documentation

◆ buildEvaluationToolbarGUI()

ilTestSkillEvaluationGUI::buildEvaluationToolbarGUI (   $selectedSkillProfileId)
private

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

224 {
225 if(!$this->isNoSkillProfileOptionEnabled() && !$selectedSkillProfileId)
226 {
227 $selectedSkillProfileId = key($this->getAvailableSkillProfiles());
228 }
229
230 $gui = new ilTestSkillEvaluationToolbarGUI($this->ctrl, $this->lng, $this, self::CMD_SHOW);
231
232 $gui->setAvailableSkillProfiles($this->getAvailableSkillProfiles());
233 $gui->setNoSkillProfileOptionEnabled($this->isNoSkillProfileOptionEnabled());
234 $gui->setSelectedEvaluationMode($selectedSkillProfileId);
235
236 $gui->setTestResultButtonEnabled($this->isTestResultButtonRequired());
237
238 $gui->build();
239
240 return $gui;
241 }

References getAvailableSkillProfiles(), isNoSkillProfileOptionEnabled(), and isTestResultButtonRequired().

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

259 {
260 $gui = new ilTestPersonalSkillsGUI($this->lng, $this->testOBJ->getId());
261
262 $gui->setAvailableSkills($availableSkills);
263 $gui->setSelectedSkillProfile($selectedSkillProfileId);
264
265 $gui->setReachedSkillLevels($reachedSkillLevels);
266 $gui->setUsrId($usrId);
267
268 return $gui;
269 }

References $availableSkills.

Referenced by showCmd().

+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillEvaluationGUI::executeCommand ( )

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

119 {
120 $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
121
122 $this->manageTabs($cmd);
123
124 $this->$cmd();
125 }
$cmd
Definition: sahs_server.php:35

References $cmd, and manageTabs().

+ Here is the call graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationGUI::getAvailableSkillProfiles ( )
Returns
array

Definition at line 306 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 322 of file class.ilTestSkillEvaluationGUI.php.

323 {
325 }

References $availableSkills.

◆ getObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::getObjectiveOrientedContainer ( )
Returns
ilTestObjectiveOrientedContainer

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

References $objectiveOrientedContainer.

Referenced by manageTabs().

+ Here is the caller graph for this function:

◆ getQuestionList()

ilTestSkillEvaluationGUI::getQuestionList ( )
Returns
ilAssQuestionList

Definition at line 89 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 282 of file class.ilTestSkillEvaluationGUI.php.

References $testSession.

Referenced by init(), and showCmd().

+ Here is the caller graph for this function:

◆ init()

ilTestSkillEvaluationGUI::init (   $skillProfileEnabled)
protected

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

150 {
151 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
152 $this->testPassesSelector = new ilTestPassesSelector($this->db, $this->testOBJ);
153 $this->testPassesSelector->setActiveId($this->testSession->getActiveId());
154 $this->testPassesSelector->setLastFinishedPass($this->testSession->getLastFinishedPass());
155
156 $assSettings = new ilSetting('assessment');
157 require_once 'Modules/Test/classes/class.ilTestSkillEvaluation.php';
158 $skillEvaluation = new ilTestSkillEvaluation(
159 $this->db, $this->testOBJ->getTestId(), $this->testOBJ->getRefId()
160 );
161
162 $skillEvaluation->setUserId($this->getTestSession()->getUserId());
163 $skillEvaluation->setActiveId($this->getTestSession()->getActiveId());
164
165 $skillEvaluation->setNumRequiredBookingsForSkillTriggering( $assSettings->get(
167 ));
168
169 $skillEvaluation->init($this->getQuestionList());
170
171 $availableSkillProfiles = $skillEvaluation->getAssignedSkillMatchingSkillProfiles();
173 $skillEvaluation->noProfileMatchingAssignedSkillExists($availableSkillProfiles)
174 );
176
177 // should be reportedPasses - yes - indeed, skill level status will not respect - avoid confuse here
178 $evaluationPasses = $this->testPassesSelector->getExistingPasses();
179
180 $availableSkills = array();
181
182 foreach($evaluationPasses as $evalPass)
183 {
184 $testResults = $this->testOBJ->getTestResult($this->getTestSession()->getActiveId(), $evalPass, true);
185
186 $skillEvaluation->setPass($evalPass);
187 $skillEvaluation->evaluate($testResults);
188
189 if($skillProfileEnabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS)
190 {
191 $skills = $skillEvaluation->getSkillsInvolvedByAssignment();
192 }
193 else
194 {
195 $skills = $skillEvaluation->getSkillsMatchingNumAnswersBarrier();
196 }
197
198 $availableSkills = array_merge($availableSkills, $skills);
199 }
200
201 $this->setAvailableSkills(array_values($availableSkills));
202 }
ILIAS Setting Class.
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 127 of file class.ilTestSkillEvaluationGUI.php.

128 {
129 return false;
130 }

◆ isNoSkillProfileOptionEnabled()

ilTestSkillEvaluationGUI::isNoSkillProfileOptionEnabled ( )
Returns
boolean

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

References $noSkillProfileOptionEnabled.

Referenced by buildEvaluationToolbarGUI().

+ Here is the caller graph for this function:

◆ isTestResultButtonRequired()

ilTestSkillEvaluationGUI::isTestResultButtonRequired ( )
private

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

244 {
245 if( !$this->testOBJ->canShowTestResults($this->testSession) )
246 {
247 return false;
248 }
249
250 if( !count($this->testPassesSelector->getReportablePasses()) )
251 {
252 return false;
253 }
254
255 return true;
256 }

Referenced by buildEvaluationToolbarGUI().

+ Here is the caller graph for this function:

◆ manageTabs()

ilTestSkillEvaluationGUI::manageTabs (   $cmd)
private

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

133 {
134 $this->tabs->clearTargets();
135
136 $this->tabs->setBackTarget(
137 $this->lng->txt('tst_results_back_introduction'),
138 $this->ctrl->getLinkTargetByClass('ilObjTestGUI', 'infoScreen')
139 );
140
141 if( $this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired() )
142 {
143 require_once 'Services/Link/classes/class.ilLink.php';
144 $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId());
145 $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink);
146 }
147 }

References ilLink\_getLink(), and getObjectiveOrientedContainer().

Referenced by executeCommand().

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

◆ setAvailableSkillProfiles()

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

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

315 {
316 $this->availableSkillProfiles = $availableSkillProfiles;
317 }

References $availableSkillProfiles.

Referenced by init().

+ Here is the caller graph for this function:

◆ setAvailableSkills()

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

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

331 {
332 $this->availableSkills = $availableSkills;
333 }

References $availableSkills.

Referenced by init().

+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

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

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

299 {
300 $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
301 }

References $noSkillProfileOptionEnabled.

Referenced by init().

+ Here is the caller graph for this function:

◆ setObjectiveOrientedContainer()

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

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

114 {
115 $this->objectiveOrientedContainer = $objectiveOrientedContainer;
116 }

References $objectiveOrientedContainer.

◆ setQuestionList()

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

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

98 {
99 $this->questionList = $questionList;
100 }

References $questionList.

◆ setTestSession()

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

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

275 {
276 $this->testSession = $testSession;
277 }

References $testSession.

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

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

205 {
206 //ilUtil::sendInfo($this->lng->txt('tst_skl_res_interpretation_hint_msg'));
207
209
210 $this->init($selectedSkillProfile);
211
212 $evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($selectedSkillProfile);
213
214 $personalSkillsGUI = $this->buildPersonalSkillsGUI( $this->getTestSession()->getUserId(),
215 $evaluationToolbarGUI->getSelectedEvaluationMode(), $this->getAvailableSkills()
216 );
217
218 $this->tpl->setContent(
219 $this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI)
220 );
221 }
$_POST["username"]
buildEvaluationToolbarGUI($selectedSkillProfileId)
buildPersonalSkillsGUI($usrId, $selectedSkillProfileId, $availableSkills)

References $_POST, buildEvaluationToolbarGUI(), buildPersonalSkillsGUI(), 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 25 of file class.ilTestSkillEvaluationGUI.php.

Referenced by __construct().

◆ $db

ilTestSkillEvaluationGUI::$db
private

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

Referenced by __construct().

◆ $lng

ilTestSkillEvaluationGUI::$lng
private

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

Referenced by __construct().

◆ $noSkillProfileOptionEnabled

ilTestSkillEvaluationGUI::$noSkillProfileOptionEnabled = false
protected

◆ $objectiveOrientedContainer

ilTestSkillEvaluationGUI::$objectiveOrientedContainer
private

◆ $questionList

ilTestSkillEvaluationGUI::$questionList
private

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

Referenced by getQuestionList(), and setQuestionList().

◆ $tabs

ilTestSkillEvaluationGUI::$tabs
private

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

Referenced by __construct().

◆ $testOBJ

ilTestSkillEvaluationGUI::$testOBJ
protected

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

Referenced by __construct().

◆ $testPassesSelector

ilTestSkillEvaluationGUI::$testPassesSelector = null
protected

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

◆ $testSession

ilTestSkillEvaluationGUI::$testSession
private

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

Referenced by getTestSession(), and setTestSession().

◆ $tpl

ilTestSkillEvaluationGUI::$tpl
private

Definition at line 35 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 19 of file class.ilTestSkillEvaluationGUI.php.


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