ILIAS  release_8 Revision v8.24
ilTestSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilTestSkillAdministrationGUI:

Public Member Functions

 __construct (ILIAS $ilias, ilCtrl $ctrl, ilAccessHandler $access, ilTabsGUI $tabs, ilGlobalTemplateInterface $tpl, ilLanguage $lng, Refinery $refinery, ilDBInterface $db, ilTree $tree, ilComponentRepository $component_repository, ilObjTest $testOBJ, $refId)
 
 executeCommand ()
 
 manageTabs ($activeSubTabId)
 

Private Member Functions

 isAssignmentEditingRequired ()
 
 isAccessDenied ()
 
 getQuestionContainerId ()
 
 getRequiredQuestionInstanceTypeFilter ()
 
 buildAssignmentConfigurationInPoolHintMessage ()
 

Private Attributes

ILIAS $ilias
 
ilCtrlInterface $ctrl
 
ilAccessHandler $access
 
ilTabsGUI $tabs
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilDBInterface $db
 
Refinery $refinery
 
ilTree $tree
 
ilComponentRepository $component_repository
 
ilObjTest $testOBJ
 
 $refId
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestSkillAdministrationGUI::__construct ( ILIAS  $ilias,
ilCtrl  $ctrl,
ilAccessHandler  $access,
ilTabsGUI  $tabs,
ilGlobalTemplateInterface  $tpl,
ilLanguage  $lng,
Refinery  $refinery,
ilDBInterface  $db,
ilTree  $tree,
ilComponentRepository  $component_repository,
ilObjTest  $testOBJ,
  $refId 
)

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

58 {
59 $this->ilias = $ilias;
60 $this->ctrl = $ctrl;
61 $this->access = $access;
62 $this->tabs = $tabs;
63 $this->tpl = $tpl;
64 $this->lng = $lng;
65 $this->refinery = $refinery;
66 $this->db = $db;
67 $this->tree = $tree;
68 $this->component_repository = $component_repository;
69 $this->testOBJ = $testOBJ;
70 $this->refId = $refId;
71 }
header include for all ilias files.

References $access, $component_repository, $ctrl, $db, $ilias, $lng, $refId, $refinery, $tabs, $testOBJ, $tpl, $tree, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildAssignmentConfigurationInPoolHintMessage()

ilTestSkillAdministrationGUI::buildAssignmentConfigurationInPoolHintMessage ( )
private

Definition at line 205 of file class.ilTestSkillAdministrationGUI.php.

205 : string
206 {
207 $questionSetConfigFactory = new ilTestQuestionSetConfigFactory(
208 $this->tree,
209 $this->db,
210 $this->component_repository,
211 $this->testOBJ
212 );
213
214 $questionSetConfig = $questionSetConfigFactory->getQuestionSetConfig();
215
216 if ($this->testOBJ->isRandomTest()) {
217 $testMode = $this->lng->txt('tst_question_set_type_random');
218 $poolLinks = $questionSetConfig->getCommaSeparatedSourceQuestionPoolLinks();
219
220 return sprintf($this->lng->txt('tst_qst_skl_cfg_in_pool_hint_rndquestset'), $testMode, $poolLinks);
221 }
222
223 return '';
224 }

References ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ executeCommand()

ilTestSkillAdministrationGUI::executeCommand ( )

Definition at line 73 of file class.ilTestSkillAdministrationGUI.php.

74 {
75 if ($this->isAccessDenied()) {
76 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
77 }
78
79 $nextClass = $this->ctrl->getNextClass();
80
81 $this->manageTabs($nextClass);
82
83 switch ($nextClass) {
84 case 'ilassquestionskillassignmentsgui':
85
86 $questionContainerId = $this->getQuestionContainerId();
87
88 $questionList = new ilAssQuestionList($this->db, $this->lng, $this->refinery, $this->component_repository);
89 $questionList->setParentObjId($questionContainerId);
90 $questionList->setQuestionInstanceTypeFilter($this->getRequiredQuestionInstanceTypeFilter());
91 $questionList->load();
92
93 $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
94 $gui->setAssignmentEditingEnabled($this->isAssignmentEditingRequired());
95 $gui->setQuestionContainerId($questionContainerId);
96 $gui->setQuestionList($questionList);
97
98 if ($this->testOBJ->isFixedTest()) {
99 $gui->setQuestionOrderSequence($this->testOBJ->getQuestions());
100 } else {
101 $gui->setAssignmentConfigurationHintMessage($this->buildAssignmentConfigurationInPoolHintMessage());
102 }
103
104 $this->ctrl->forwardCommand($gui);
105
106 break;
107
108 case 'iltestskilllevelthresholdsgui':
109
110 $gui = new ilTestSkillLevelThresholdsGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->testOBJ->getTestId());
111 $gui->setQuestionAssignmentColumnsEnabled(!$this->testOBJ->isRandomTest());
112 $gui->setQuestionContainerId($this->getQuestionContainerId());
113 $this->ctrl->forwardCommand($gui);
114 break;
115 }
116 }

References ILIAS\Repository\access(), buildAssignmentConfigurationInPoolHintMessage(), ILIAS\Repository\ctrl(), getQuestionContainerId(), getRequiredQuestionInstanceTypeFilter(), isAccessDenied(), isAssignmentEditingRequired(), ILIAS\Repository\lng(), manageTabs(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ getQuestionContainerId()

ilTestSkillAdministrationGUI::getQuestionContainerId ( )
private

Definition at line 174 of file class.ilTestSkillAdministrationGUI.php.

174 : ?int
175 {
176 if ($this->testOBJ->isDynamicTest()) {
177 $questionSetConfigFactory = new ilTestQuestionSetConfigFactory(
178 $this->tree,
179 $this->db,
180 $this->component_repository,
181 $this->testOBJ
182 );
183
184 $questionSetConfig = $questionSetConfigFactory->getQuestionSetConfig();
185
186 return $questionSetConfig->getSourceQuestionPoolId();
187 }
188
189 return $this->testOBJ->getId();
190 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getRequiredQuestionInstanceTypeFilter()

ilTestSkillAdministrationGUI::getRequiredQuestionInstanceTypeFilter ( )
private

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

192 : ?string
193 {
194 if ($this->testOBJ->isDynamicTest()) {
196 }
197
198 if ($this->testOBJ->isRandomTest()) {
200 }
201
202 return null;
203 }

References ilAssQuestionList\QUESTION_INSTANCE_TYPE_DUPLICATES, and ilAssQuestionList\QUESTION_INSTANCE_TYPE_ORIGINALS.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ isAccessDenied()

ilTestSkillAdministrationGUI::isAccessDenied ( )
private

Definition at line 157 of file class.ilTestSkillAdministrationGUI.php.

157 : bool
158 {
159 if (!$this->testOBJ->isSkillServiceEnabled()) {
160 return true;
161 }
162
164 return true;
165 }
166
167 if (!$this->access->checkAccess('write', '', $this->refId)) {
168 return true;
169 }
170
171 return false;
172 }
static isSkillManagementGloballyActivated()

References ILIAS\Repository\access(), and ilObjTest\isSkillManagementGloballyActivated().

Referenced by executeCommand().

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

◆ isAssignmentEditingRequired()

ilTestSkillAdministrationGUI::isAssignmentEditingRequired ( )
private

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

118 : bool
119 {
120 if (!$this->testOBJ->isFixedTest()) {
121 return false;
122 }
123
124 if ($this->testOBJ->participantDataExist()) {
125 return false;
126 }
127
128 return true;
129 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ manageTabs()

ilTestSkillAdministrationGUI::manageTabs (   $activeSubTabId)

Definition at line 131 of file class.ilTestSkillAdministrationGUI.php.

132 {
133 $link = $this->ctrl->getLinkTargetByClass(
134 'ilAssQuestionSkillAssignmentsGUI',
136 );
137 $this->tabs->addSubTab(
138 'ilassquestionskillassignmentsgui',
139 $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
140 $link
141 );
142
143 $link = $this->ctrl->getLinkTargetByClass(
144 'ilTestSkillLevelThresholdsGUI',
146 );
147 $this->tabs->addSubTab(
148 'iltestskilllevelthresholdsgui',
149 $this->lng->txt('tst_skl_sub_tab_thresholds'),
150 $link
151 );
152
153 $this->tabs->activateTab('tst_tab_competences');
154 $this->tabs->activateSubTab($activeSubTabId);
155 }

References ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, ilTestSkillLevelThresholdsGUI\CMD_SHOW_SKILL_THRESHOLDS, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

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

Field Documentation

◆ $access

ilAccessHandler ilTestSkillAdministrationGUI::$access
private

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

Referenced by __construct().

◆ $component_repository

ilComponentRepository ilTestSkillAdministrationGUI::$component_repository
private

Definition at line 41 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $ctrl

ilCtrlInterface ilTestSkillAdministrationGUI::$ctrl
private

Definition at line 33 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $db

ilDBInterface ilTestSkillAdministrationGUI::$db
private

Definition at line 38 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $ilias

ILIAS ilTestSkillAdministrationGUI::$ilias
private

Definition at line 32 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $lng

ilLanguage ilTestSkillAdministrationGUI::$lng
private

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

Referenced by __construct().

◆ $refId

ilTestSkillAdministrationGUI::$refId
private

Definition at line 43 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $refinery

Refinery ilTestSkillAdministrationGUI::$refinery
private

Definition at line 39 of file class.ilTestSkillAdministrationGUI.php.

Referenced by __construct().

◆ $tabs

ilTabsGUI ilTestSkillAdministrationGUI::$tabs
private

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

Referenced by __construct().

◆ $testOBJ

ilObjTest ilTestSkillAdministrationGUI::$testOBJ
private

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

Referenced by __construct().

◆ $tpl

ilGlobalTemplateInterface ilTestSkillAdministrationGUI::$tpl
private

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

Referenced by __construct().

◆ $tree

ilTree ilTestSkillAdministrationGUI::$tree
private

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

Referenced by __construct().


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