ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilTestSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilTestSkillAdministrationGUI:

Public Member Functions

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

Private Member Functions

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

Private Attributes

 $ilias
 
 $ctrl
 
 $access
 
 $tabs
 
 $tpl
 
 $lng
 
 $db
 
 $tree
 
 $pluginAdmin
 
 $testOBJ
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $access, $ctrl, $db, $ilias, $lng, $pluginAdmin, $refId, $tabs, $testOBJ, $tpl, and $tree.

Member Function Documentation

◆ buildAssignmentConfigurationInPoolHintMessage()

ilTestSkillAdministrationGUI::buildAssignmentConfigurationInPoolHintMessage ( )
private

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

218 {
219 $questionSetConfigFactory = new ilTestQuestionSetConfigFactory(
220 $this->tree,
221 $this->db,
222 $this->pluginAdmin,
223 $this->testOBJ
224 );
225
226 $questionSetConfig = $questionSetConfigFactory->getQuestionSetConfig();
227
228 if ($this->testOBJ->isRandomTest()) {
229 $testMode = $this->lng->txt('tst_question_set_type_random');
230 $poolLinks = $questionSetConfig->getCommaSeparatedSourceQuestionPoolLinks();
231
232 return sprintf($this->lng->txt('tst_qst_skl_cfg_in_pool_hint_rndquestset'), $testMode, $poolLinks);
233 } elseif ($this->testOBJ->isDynamicTest()) {
234 $testMode = $this->lng->txt('tst_question_set_type_dynamic');
235 $poolLink = $questionSetConfig->getSourceQuestionPoolLink($questionSetConfig->getSourceQuestionPoolId());
236
237 return sprintf($this->lng->txt('tst_qst_skl_cfg_in_pool_hint_dynquestset'), $testMode, $poolLink);
238 }
239
240 return '';
241 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ executeCommand()

ilTestSkillAdministrationGUI::executeCommand ( )

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

84 {
85 if ($this->isAccessDenied()) {
86 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
87 }
88
89 $nextClass = $this->ctrl->getNextClass();
90
91 $this->manageTabs($nextClass);
92
93 switch ($nextClass) {
94 case 'ilassquestionskillassignmentsgui':
95
96 $questionContainerId = $this->getQuestionContainerId();
97
98 require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
99 $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
100 $questionList->setParentObjId($questionContainerId);
101 $questionList->setQuestionInstanceTypeFilter($this->getRequiredQuestionInstanceTypeFilter());
102 $questionList->load();
103
104 $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
105 $gui->setAssignmentEditingEnabled($this->isAssignmentEditingRequired());
106 $gui->setQuestionContainerId($questionContainerId);
107 $gui->setQuestionList($questionList);
108
109 if ($this->testOBJ->isFixedTest()) {
110 $gui->setQuestionOrderSequence($this->testOBJ->getQuestions());
111 } else {
112 $gui->setAssignmentConfigurationHintMessage($this->buildAssignmentConfigurationInPoolHintMessage());
113 }
114
115 $this->ctrl->forwardCommand($gui);
116
117 break;
118
119 case 'iltestskilllevelthresholdsgui':
120
121 $gui = new ilTestSkillLevelThresholdsGUI($this->ctrl, $this->tpl, $this->lng, $this->db, $this->testOBJ->getTestId());
122 $gui->setQuestionAssignmentColumnsEnabled(!$this->testOBJ->isRandomTest());
123 $gui->setQuestionContainerId($this->getQuestionContainerId());
124 $this->ctrl->forwardCommand($gui);
125 break;
126 }
127 }

References buildAssignmentConfigurationInPoolHintMessage(), getQuestionContainerId(), getRequiredQuestionInstanceTypeFilter(), isAccessDenied(), isAssignmentEditingRequired(), and manageTabs().

+ Here is the call graph for this function:

◆ getQuestionContainerId()

ilTestSkillAdministrationGUI::getQuestionContainerId ( )
private

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

187 {
188 if ($this->testOBJ->isDynamicTest()) {
189 $questionSetConfigFactory = new ilTestQuestionSetConfigFactory(
190 $this->tree,
191 $this->db,
192 $this->pluginAdmin,
193 $this->testOBJ
194 );
195
196 $questionSetConfig = $questionSetConfigFactory->getQuestionSetConfig();
197
198 return $questionSetConfig->getSourceQuestionPoolId();
199 }
200
201 return $this->testOBJ->getId();
202 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ getRequiredQuestionInstanceTypeFilter()

ilTestSkillAdministrationGUI::getRequiredQuestionInstanceTypeFilter ( )
private

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

205 {
206 if ($this->testOBJ->isDynamicTest()) {
208 }
209
210 if ($this->testOBJ->isRandomTest()) {
212 }
213
214 return null;
215 }

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 169 of file class.ilTestSkillAdministrationGUI.php.

170 {
171 if (!$this->testOBJ->isSkillServiceEnabled()) {
172 return true;
173 }
174
176 return true;
177 }
178
179 if (!$this->access->checkAccess('write', '', $this->refId)) {
180 return true;
181 }
182
183 return false;
184 }
static isSkillManagementGloballyActivated()

References 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 129 of file class.ilTestSkillAdministrationGUI.php.

130 {
131 if (!$this->testOBJ->isFixedTest()) {
132 return false;
133 }
134
135 if ($this->testOBJ->participantDataExist()) {
136 return false;
137 }
138
139 return true;
140 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ manageTabs()

ilTestSkillAdministrationGUI::manageTabs (   $activeSubTabId)

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

143 {
144 $link = $this->ctrl->getLinkTargetByClass(
145 'ilAssQuestionSkillAssignmentsGUI',
147 );
148 $this->tabs->addSubTab(
149 'ilassquestionskillassignmentsgui',
150 $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
151 $link
152
153 );
154
155 $link = $this->ctrl->getLinkTargetByClass(
156 'ilTestSkillLevelThresholdsGUI',
158 );
159 $this->tabs->addSubTab(
160 'iltestskilllevelthresholdsgui',
161 $this->lng->txt('tst_skl_sub_tab_thresholds'),
162 $link
163 );
164
165 $this->tabs->activateTab('tst_tab_competences');
166 $this->tabs->activateSubTab($activeSubTabId);
167 }

References ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, and ilTestSkillLevelThresholdsGUI\CMD_SHOW_SKILL_THRESHOLDS.

Referenced by executeCommand().

+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilTestSkillAdministrationGUI::$access
private

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

Referenced by __construct().

◆ $ctrl

ilTestSkillAdministrationGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilTestSkillAdministrationGUI::$db
private

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

Referenced by __construct().

◆ $ilias

ilTestSkillAdministrationGUI::$ilias
private

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

Referenced by __construct().

◆ $lng

ilTestSkillAdministrationGUI::$lng
private

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

Referenced by __construct().

◆ $pluginAdmin

ilTestSkillAdministrationGUI::$pluginAdmin
private

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

Referenced by __construct().

◆ $tabs

ilTestSkillAdministrationGUI::$tabs
private

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

Referenced by __construct().

◆ $testOBJ

ilTestSkillAdministrationGUI::$testOBJ
private

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

Referenced by __construct().

◆ $tpl

ilTestSkillAdministrationGUI::$tpl
private

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

Referenced by __construct().

◆ $tree

ilTestSkillAdministrationGUI::$tree
private

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

Referenced by __construct().


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