ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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)
 
 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 224 of file class.ilTestSkillEvaluationGUI.php.

References getAvailableSkillProfiles(), and isNoSkillProfileOptionEnabled().

Referenced by showCmd().

225  {
226  if (!$this->isNoSkillProfileOptionEnabled() && !$selectedSkillProfileId) {
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->build();
237 
238  return $gui;
239  }
+ 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 241 of file class.ilTestSkillEvaluationGUI.php.

References $availableSkills, and ilTestPersonalSkillsGUI\setAvailableSkills().

Referenced by showCmd().

242  {
243  $gui = new ilTestPersonalSkillsGUI($this->lng, $this->testOBJ->getId());
244 
246  $gui->setSelectedSkillProfile($selectedSkillProfileId);
247 
248  $gui->setReachedSkillLevels($reachedSkillLevels);
249  $gui->setUsrId($usrId);
250 
251  return $gui;
252  }
+ 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 289 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 305 of file class.ilTestSkillEvaluationGUI.php.

References $availableSkills.

Referenced by showCmd().

+ Here is the caller graph for this function:

◆ getObjectiveOrientedContainer()

ilTestSkillEvaluationGUI::getObjectiveOrientedContainer ( )

◆ 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 265 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.

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

Referenced by showCmd().

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,
160  $this->testOBJ->getTestId(),
161  $this->testOBJ->getRefId()
162  );
163 
164  $skillEvaluation->setUserId($this->getTestSession()->getUserId());
165  $skillEvaluation->setActiveId($this->getTestSession()->getActiveId());
166 
167  $skillEvaluation->setNumRequiredBookingsForSkillTriggering($assSettings->get(
168  'ass_skl_trig_num_answ_barrier',
170  ));
171 
172  $skillEvaluation->init($this->getQuestionList());
173 
174  $availableSkillProfiles = $skillEvaluation->getAssignedSkillMatchingSkillProfiles();
176  $skillEvaluation->noProfileMatchingAssignedSkillExists($availableSkillProfiles)
177  );
179 
180  // should be reportedPasses - yes - indeed, skill level status will not respect - avoid confuse here
181  $evaluationPasses = $this->testPassesSelector->getExistingPasses();
182 
183  $availableSkills = array();
184 
185  foreach ($evaluationPasses as $evalPass) {
186  $testResults = $this->testOBJ->getTestResult($this->getTestSession()->getActiveId(), $evalPass, true);
187 
188  $skillEvaluation->setPass($evalPass);
189  $skillEvaluation->evaluate($testResults);
190 
191  if ($skillProfileEnabled && self::INVOLVE_SKILLS_BELOW_NUM_ANSWERS_BARRIER_FOR_GAP_ANALASYS) {
192  $skills = $skillEvaluation->getSkillsInvolvedByAssignment();
193  } else {
194  $skills = $skillEvaluation->getSkillsMatchingNumAnswersBarrier();
195  }
196 
197  $availableSkills = array_merge($availableSkills, $skills);
198  }
199 
200  $this->setAvailableSkills(array_values($availableSkills));
201  }
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 273 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 132 of file class.ilTestSkillEvaluationGUI.php.

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 # {
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  }
+ Here is the caller graph for this function:

◆ setAvailableSkillProfiles()

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

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

References $availableSkillProfiles.

Referenced by init().

298  {
299  $this->availableSkillProfiles = $availableSkillProfiles;
300  }
+ Here is the caller graph for this function:

◆ setAvailableSkills()

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

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

References $availableSkills.

Referenced by init().

314  {
315  $this->availableSkills = $availableSkills;
316  }
+ Here is the caller graph for this function:

◆ setNoSkillProfileOptionEnabled()

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

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

References $noSkillProfileOptionEnabled.

Referenced by init().

282  {
283  $this->noSkillProfileOptionEnabled = $noSkillProfileOptionEnabled;
284  }
+ 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.

Referenced by ilTestResultsGUI\executeCommand().

98  {
99  $this->questionList = $questionList;
100  }
+ Here is the caller graph for this function:

◆ setTestSession()

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

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

References $testSession.

258  {
259  $this->testSession = $testSession;
260  }

◆ showCmd()

ilTestSkillEvaluationGUI::showCmd ( )
private

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

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

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

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

◆ 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: