ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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.

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

Referenced by showCmd().

224  {
225  if (!$this->isNoSkillProfileOptionEnabled() && !$selectedSkillProfileId) {
226  $selectedSkillProfileId = key($this->getAvailableSkillProfiles());
227  }
228 
229  $gui = new ilTestSkillEvaluationToolbarGUI($this->ctrl, $this->lng, $this, self::CMD_SHOW);
230 
231  $gui->setAvailableSkillProfiles($this->getAvailableSkillProfiles());
232  $gui->setNoSkillProfileOptionEnabled($this->isNoSkillProfileOptionEnabled());
233  $gui->setSelectedEvaluationMode($selectedSkillProfileId);
234 
235  $gui->setTestResultButtonEnabled($this->isTestResultButtonRequired());
236 
237  $gui->build();
238 
239  return $gui;
240  }
+ 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 255 of file class.ilTestSkillEvaluationGUI.php.

References $availableSkills, and ilTestPersonalSkillsGUI\setAvailableSkills().

Referenced by showCmd().

256  {
257  $gui = new ilTestPersonalSkillsGUI($this->lng, $this->testOBJ->getId());
258 
260  $gui->setSelectedSkillProfile($selectedSkillProfileId);
261 
262  $gui->setReachedSkillLevels($reachedSkillLevels);
263  $gui->setUsrId($usrId);
264 
265  return $gui;
266  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillEvaluationGUI::executeCommand ( )

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

References manageTabs().

119  {
120  $cmd = $this->ctrl->getCmd(self::CMD_SHOW) . 'Cmd';
121 
122  $this->manageTabs($cmd);
123 
124  $this->$cmd();
125  }
+ Here is the call graph for this function:

◆ getAvailableSkillProfiles()

ilTestSkillEvaluationGUI::getAvailableSkillProfiles ( )
Returns
array

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

References $availableSkills.

Referenced by showCmd().

+ Here is the caller graph for this function:

◆ 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

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

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

Referenced by showCmd().

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

Referenced by buildEvaluationToolbarGUI().

243  {
244  if (!$this->testOBJ->canShowTestResults($this->testSession)) {
245  return false;
246  }
247 
248  if (!count($this->testPassesSelector->getReportablePasses())) {
249  return false;
250  }
251 
252  return true;
253  }
+ Here is the caller graph for this function:

◆ manageTabs()

ilTestSkillEvaluationGUI::manageTabs (   $cmd)
private

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

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

Referenced by executeCommand().

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  require_once 'Services/Link/classes/class.ilLink.php';
143  $courseLink = ilLink::_getLink($this->getObjectiveOrientedContainer()->getRefId());
144  $this->tabs->setBack2Target($this->lng->txt('back_to_objective_container'), $courseLink);
145  }
146  }
+ 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 311 of file class.ilTestSkillEvaluationGUI.php.

References $availableSkillProfiles.

Referenced by init().

312  {
313  $this->availableSkillProfiles = $availableSkillProfiles;
314  }
+ Here is the caller graph for this function:

◆ setAvailableSkills()

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

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

References $availableSkills.

Referenced by init().

328  {
329  $this->availableSkills = $availableSkills;
330  }
+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

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

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

References $noSkillProfileOptionEnabled.

Referenced by init().

296  {
297  $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
298  }
+ Here is the caller graph for this function:

◆ setObjectiveOrientedContainer()

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

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

References $objectiveOrientedContainer.

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

◆ setQuestionList()

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

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

References $questionList.

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

◆ setTestSession()

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

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

References $testSession.

272  {
273  $this->testSession = $testSession;
274  }

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

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

References $_POST, buildEvaluationToolbarGUI(), buildPersonalSkillsGUI(), ilTestSkillEvaluationToolbarGUI\fetchSkillProfileParam(), getAvailableSkills(), getTestSession(), and init().

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