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

Public Member Functions

 __construct (ilCtrl $ctrl, ilTemplate $tpl, ilLanguage $lng, ilDBInterface $db, $testId)
 
 getQuestionContainerId ()
 
 setQuestionContainerId ($questionContainerId)
 
 executeCommand ()
 
 setQuestionAssignmentColumnsEnabled ($questionAssignmentColumnsEnabled)
 
 areQuestionAssignmentColumnsEnabled ()
 
 getTestId ()
 

Data Fields

const CMD_SHOW_SKILL_THRESHOLDS = 'showSkillThresholds'
 
const CMD_SAVE_SKILL_THRESHOLDS = 'saveSkillThresholds'
 

Protected Member Functions

 getPopulatedTable ()
 

Private Member Functions

 showSkillThresholdsCmd (ilTestSkillLevelThresholdsTableGUI $table=null)
 
 buildTableGUI ()
 
 buildSkillQuestionAssignmentList ()
 
 buildSkillLevelThresholdList ()
 

Private Attributes

 $ctrl
 
 $tpl
 
 $lng
 
 $db
 
 $testId
 
 $questionContainerId
 
 $questionAssignmentColumnsEnabled
 

Detailed Description

Definition at line 13 of file class.ilTestSkillLevelThresholdsGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillLevelThresholdsGUI::__construct ( ilCtrl  $ctrl,
ilTemplate  $tpl,
ilLanguage  $lng,
ilDBInterface  $db,
  $testId 
)

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

References $ctrl, $db, $lng, $testId, and $tpl.

Member Function Documentation

◆ areQuestionAssignmentColumnsEnabled()

ilTestSkillLevelThresholdsGUI::areQuestionAssignmentColumnsEnabled ( )
Returns
bool

Definition at line 93 of file class.ilTestSkillLevelThresholdsGUI.php.

References $questionAssignmentColumnsEnabled.

Referenced by buildTableGUI().

+ Here is the caller graph for this function:

◆ buildSkillLevelThresholdList()

ilTestSkillLevelThresholdsGUI::buildSkillLevelThresholdList ( )
private

Definition at line 248 of file class.ilTestSkillLevelThresholdsGUI.php.

References getTestId().

Referenced by getPopulatedTable().

249  {
250  require_once 'Modules/Test/classes/class.ilTestSkillLevelThresholdList.php';
251  $thresholdList = new ilTestSkillLevelThresholdList($this->db);
252  $thresholdList->setTestId($this->getTestId());
253 
254  return $thresholdList;
255  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSkillQuestionAssignmentList()

ilTestSkillLevelThresholdsGUI::buildSkillQuestionAssignmentList ( )
private

Definition at line 239 of file class.ilTestSkillLevelThresholdsGUI.php.

References getQuestionContainerId().

Referenced by getPopulatedTable(), and getTestId().

240  {
241  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignmentList.php';
242  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
243  $assignmentList->setParentObjId($this->getQuestionContainerId());
244 
245  return $assignmentList;
246  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTableGUI()

ilTestSkillLevelThresholdsGUI::buildTableGUI ( )
private

Definition at line 229 of file class.ilTestSkillLevelThresholdsGUI.php.

References areQuestionAssignmentColumnsEnabled().

Referenced by getPopulatedTable().

230  {
231  require_once 'Modules/Test/classes/tables/class.ilTestSkillLevelThresholdsTableGUI.php';
232  $table = new ilTestSkillLevelThresholdsTableGUI($this, self::CMD_SHOW_SKILL_THRESHOLDS, $this->ctrl, $this->lng);
233  $table->setQuestionAssignmentColumnsEnabled( $this->areQuestionAssignmentColumnsEnabled() );
234  $table->initColumns();
235 
236  return $table;
237  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillLevelThresholdsGUI::executeCommand ( )

Definition at line 75 of file class.ilTestSkillLevelThresholdsGUI.php.

References $cmd.

76  {
77  $cmd = $this->ctrl->getCmd('show') . 'Cmd';
78 
79  $this->$cmd();
80  }
$cmd
Definition: sahs_server.php:35

◆ getPopulatedTable()

ilTestSkillLevelThresholdsGUI::getPopulatedTable ( )
protected
Returns
ilTestSkillLevelThresholdsTableGUI

Definition at line 212 of file class.ilTestSkillLevelThresholdsGUI.php.

References buildSkillLevelThresholdList(), buildSkillQuestionAssignmentList(), and buildTableGUI().

Referenced by getTestId(), and showSkillThresholdsCmd().

213  {
214  $table = $this->buildTableGUI();
215 
216  $skillLevelThresholdList = $this->buildSkillLevelThresholdList();
217  $skillLevelThresholdList->loadFromDb();
218  $table->setSkillLevelThresholdList($skillLevelThresholdList);
219 
220  $assignmentList = $this->buildSkillQuestionAssignmentList();
221  $assignmentList->loadFromDb();
222 
223  $table->setData($table->completeCompetenceTitles(
224  $assignmentList->getUniqueAssignedSkills()
225  ));
226  return $table;
227  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionContainerId()

ilTestSkillLevelThresholdsGUI::getQuestionContainerId ( )
Returns
int

Definition at line 62 of file class.ilTestSkillLevelThresholdsGUI.php.

References $questionContainerId.

Referenced by buildSkillQuestionAssignmentList().

+ Here is the caller graph for this function:

◆ getTestId()

ilTestSkillLevelThresholdsGUI::getTestId ( )
Returns
int

Definition at line 101 of file class.ilTestSkillLevelThresholdsGUI.php.

References $_POST, $_SERVER, $data, $testId, $valid, array, buildSkillQuestionAssignmentList(), getPopulatedTable(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and showSkillThresholdsCmd().

Referenced by buildSkillLevelThresholdList().

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

◆ setQuestionAssignmentColumnsEnabled()

ilTestSkillLevelThresholdsGUI::setQuestionAssignmentColumnsEnabled (   $questionAssignmentColumnsEnabled)
Parameters
boolean$questionAssignmentColumnsEnabled

Definition at line 85 of file class.ilTestSkillLevelThresholdsGUI.php.

References $questionAssignmentColumnsEnabled.

Referenced by ilTestSkillAdministrationGUI\executeCommand().

86  {
87  $this->questionAssignmentColumnsEnabled = $questionAssignmentColumnsEnabled;
88  }
+ Here is the caller graph for this function:

◆ setQuestionContainerId()

ilTestSkillLevelThresholdsGUI::setQuestionContainerId (   $questionContainerId)
Parameters
int$questionContainerId

Definition at line 70 of file class.ilTestSkillLevelThresholdsGUI.php.

References $questionContainerId.

71  {
72  $this->questionContainerId = $questionContainerId;
73  }

◆ showSkillThresholdsCmd()

ilTestSkillLevelThresholdsGUI::showSkillThresholdsCmd ( ilTestSkillLevelThresholdsTableGUI  $table = null)
private
Parameters
ilTestSkillLevelThresholdsTableGUI | null$table

Definition at line 199 of file class.ilTestSkillLevelThresholdsGUI.php.

References getPopulatedTable().

Referenced by getTestId().

200  {
201  if(null === $table)
202  {
203  $table = $this->getPopulatedTable();
204  }
205 
206  $this->tpl->setContent($this->ctrl->getHTML($table));
207  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilTestSkillLevelThresholdsGUI::$ctrl
private

Definition at line 20 of file class.ilTestSkillLevelThresholdsGUI.php.

Referenced by __construct().

◆ $db

ilTestSkillLevelThresholdsGUI::$db
private

Definition at line 35 of file class.ilTestSkillLevelThresholdsGUI.php.

Referenced by __construct().

◆ $lng

ilTestSkillLevelThresholdsGUI::$lng
private

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

Referenced by __construct().

◆ $questionAssignmentColumnsEnabled

ilTestSkillLevelThresholdsGUI::$questionAssignmentColumnsEnabled
private

◆ $questionContainerId

ilTestSkillLevelThresholdsGUI::$questionContainerId
private

◆ $testId

ilTestSkillLevelThresholdsGUI::$testId
private

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

Referenced by __construct(), and getTestId().

◆ $tpl

ilTestSkillLevelThresholdsGUI::$tpl
private

Definition at line 25 of file class.ilTestSkillLevelThresholdsGUI.php.

Referenced by __construct().

◆ CMD_SAVE_SKILL_THRESHOLDS

const ilTestSkillLevelThresholdsGUI::CMD_SAVE_SKILL_THRESHOLDS = 'saveSkillThresholds'

◆ CMD_SHOW_SKILL_THRESHOLDS

const ilTestSkillLevelThresholdsGUI::CMD_SHOW_SKILL_THRESHOLDS = 'showSkillThresholds'

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