ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTestSkillLevelThresholdsGUI Class Reference
+ Collaboration diagram for ilTestSkillLevelThresholdsGUI:

Public Member Functions

 __construct (ilCtrl $ctrl, ilGlobalTemplateInterface $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

ilCtrl $ctrl
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilDBInterface $db
 
 $testId
 
 $questionContainerId
 
bool $questionAssignmentColumnsEnabled
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $ctrl, $db, $lng, $testId, $tpl, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ areQuestionAssignmentColumnsEnabled()

ilTestSkillLevelThresholdsGUI::areQuestionAssignmentColumnsEnabled ( )
Returns
bool

Definition at line 95 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 244 of file class.ilTestSkillLevelThresholdsGUI.php.

References getTestId().

Referenced by getPopulatedTable().

245  {
246  $thresholdList = new ilTestSkillLevelThresholdList($this->db);
247  $thresholdList->setTestId($this->getTestId());
248 
249  return $thresholdList;
250  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildSkillQuestionAssignmentList()

ilTestSkillLevelThresholdsGUI::buildSkillQuestionAssignmentList ( )
private

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

References getQuestionContainerId().

Referenced by getPopulatedTable(), and getTestId().

237  {
238  $assignmentList = new ilAssQuestionSkillAssignmentList($this->db);
239  $assignmentList->setParentObjId($this->getQuestionContainerId());
240 
241  return $assignmentList;
242  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildTableGUI()

ilTestSkillLevelThresholdsGUI::buildTableGUI ( )
private

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

References areQuestionAssignmentColumnsEnabled(), ILIAS\Repository\ctrl(), getTestId(), and ILIAS\Repository\lng().

Referenced by getPopulatedTable().

222  {
224  $this,
225  $this->getTestId(),
226  self::CMD_SHOW_SKILL_THRESHOLDS,
227  $this->ctrl,
228  $this->lng
229  );
230  $table->setQuestionAssignmentColumnsEnabled($this->areQuestionAssignmentColumnsEnabled());
231  $table->initColumns();
232 
233  return $table;
234  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillLevelThresholdsGUI::executeCommand ( )

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

References ILIAS\Repository\ctrl().

78  {
79  $cmd = $this->ctrl->getCmd('show') . 'Cmd';
80 
81  $this->$cmd();
82  }
+ Here is the call graph for this function:

◆ getPopulatedTable()

ilTestSkillLevelThresholdsGUI::getPopulatedTable ( )
protected
Returns
ilTestSkillLevelThresholdsTableGUI

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

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

Referenced by getTestId(), and showSkillThresholdsCmd().

205  {
206  $table = $this->buildTableGUI();
207 
208  $skillLevelThresholdList = $this->buildSkillLevelThresholdList();
209  $skillLevelThresholdList->loadFromDb();
210  $table->setSkillLevelThresholdList($skillLevelThresholdList);
211 
212  $assignmentList = $this->buildSkillQuestionAssignmentList();
213  $assignmentList->loadFromDb();
214 
215  $table->setData($table->completeCompetenceTitles(
216  $assignmentList->getUniqueAssignedSkills()
217  ));
218  return $table;
219  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionContainerId()

ilTestSkillLevelThresholdsGUI::getQuestionContainerId ( )
Returns
int

Definition at line 64 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 103 of file class.ilTestSkillLevelThresholdsGUI.php.

References $_SERVER, $data, ILIAS\LTI\ToolProvider\$key, $testId, $valid, buildSkillQuestionAssignmentList(), ILIAS\Repository\ctrl(), getPopulatedTable(), ILIAS\Repository\lng(), and showSkillThresholdsCmd().

Referenced by buildSkillLevelThresholdList(), and buildTableGUI().

103  : int
104  {
105  return $this->testId;
106  }
+ 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 87 of file class.ilTestSkillLevelThresholdsGUI.php.

References $questionAssignmentColumnsEnabled.

Referenced by ilTestSkillAdministrationGUI\executeCommand().

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

◆ setQuestionContainerId()

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

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

References $questionContainerId.

73  {
74  $this->questionContainerId = $questionContainerId;
75  }

◆ showSkillThresholdsCmd()

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

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

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

Referenced by getTestId().

193  {
194  if (null === $table) {
195  $table = $this->getPopulatedTable();
196  }
197 
198  $this->tpl->setContent($this->ctrl->getHTML($table));
199  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilTestSkillLevelThresholdsGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilDBInterface ilTestSkillLevelThresholdsGUI::$db
private

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

Referenced by __construct().

◆ $lng

ilLanguage ilTestSkillLevelThresholdsGUI::$lng
private

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

Referenced by __construct().

◆ $questionAssignmentColumnsEnabled

bool ilTestSkillLevelThresholdsGUI::$questionAssignmentColumnsEnabled
private

◆ $questionContainerId

ilTestSkillLevelThresholdsGUI::$questionContainerId
private

◆ $testId

ilTestSkillLevelThresholdsGUI::$testId
private

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

Referenced by __construct(), and getTestId().

◆ $tpl

ilGlobalTemplateInterface ilTestSkillLevelThresholdsGUI::$tpl
private

Definition at line 35 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: