ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilQuestionPoolSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilQuestionPoolSkillAdministrationGUI:

Public Member Functions

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

Private Member Functions

 isAccessDenied ()
 

Private Attributes

 $ilias
 
 $ctrl
 
Refinery $refinery
 
 $access
 
 $tabs
 
 $tpl
 
 $lng
 
 $db
 
ilComponentRepository $component_repository
 
 $poolOBJ
 
 $refId
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilQuestionPoolSkillAdministrationGUI::__construct ( ILIAS  $ilias,
ilCtrl  $ctrl,
Refinery  $refinery,
ilAccessHandler  $access,
ilTabsGUI  $tabs,
ilGlobalTemplateInterface  $tpl,
ilLanguage  $lng,
ilDBInterface  $db,
ilComponentRepository  $component_repository,
ilObjQuestionPool  $poolOBJ,
  $refId 
)

Definition at line 79 of file class.ilQuestionPoolSkillAdministrationGUI.php.

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

91  {
92  $this->ilias = $ilias;
93  $this->ctrl = $ctrl;
94  $this->refinery = $refinery;
95  $this->access = $access;
96  $this->tabs = $tabs;
97  $this->tpl = $tpl;
98  $this->lng = $lng;
99  $this->db = $db;
100  $this->component_repository = $component_repository;
101  $this->poolOBJ = $poolOBJ;
102  $this->refId = $refId;
103  }
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilQuestionPoolSkillAdministrationGUI::executeCommand ( )

Definition at line 148 of file class.ilQuestionPoolSkillAdministrationGUI.php.

References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), isAccessDenied(), ILIAS\Repository\lng(), manageTabs(), ilAssQuestionList\QUESTION_INSTANCE_TYPE_ORIGINALS, and ILIAS\Repository\refinery().

148  : void
149  {
150  if ($this->isAccessDenied()) {
151  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
152  }
153 
154  $nextClass = $this->ctrl->getNextClass();
155 
156  $this->manageTabs($nextClass);
157 
158  switch ($nextClass) {
159  case 'ilassquestionskillassignmentsgui':
160  $questionList = new ilAssQuestionList(
161  $this->db,
162  $this->lng,
163  $this->refinery,
164  $this->component_repository
165  );
166  $questionList->setParentObjId($this->poolOBJ->getId());
167  $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
168  $questionList->load();
169 
170  $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
171  $gui->setAssignmentEditingEnabled(true);
172  $gui->setQuestionContainerId($this->poolOBJ->getId());
173  $gui->setQuestionList($questionList);
174 
175  $this->ctrl->forwardCommand($gui);
176 
177  break;
178 
179  case 'ilassquestionskillusagestablegui':
180 
182  $this->ctrl,
183  $this->tpl,
184  $this->lng,
185  $this->db,
186  $this->poolOBJ->getId()
187  );
188 
189  $this->ctrl->forwardCommand($gui);
190 
191  break;
192  }
193  }
Class ilObjForumAdministration.
+ Here is the call graph for this function:

◆ isAccessDenied()

ilQuestionPoolSkillAdministrationGUI::isAccessDenied ( )
private

Definition at line 105 of file class.ilQuestionPoolSkillAdministrationGUI.php.

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

Referenced by executeCommand().

105  : bool
106  {
107  if (!$this->poolOBJ->isSkillServiceEnabled()) {
108  return true;
109  }
110 
112  return true;
113  }
114 
115  if (!$this->access->checkAccess('write', '', $this->refId)) {
116  return true;
117  }
118 
119  return false;
120  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manageTabs()

ilQuestionPoolSkillAdministrationGUI::manageTabs (   $activeSubTabId)

Definition at line 122 of file class.ilQuestionPoolSkillAdministrationGUI.php.

References ilAssQuestionSkillUsagesTableGUI\CMD_SHOW, ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

122  : void
123  {
124  $link = $this->ctrl->getLinkTargetByClass(
125  'ilAssQuestionSkillAssignmentsGUI',
127  );
128  $this->tabs->addSubTab(
129  'ilassquestionskillassignmentsgui',
130  $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
131  $link
132  );
133 
134  $link = $this->ctrl->getLinkTargetByClass(
135  'ilAssQuestionSkillUsagesTableGUI',
137  );
138  $this->tabs->addSubTab(
139  'ilassquestionskillusagestablegui',
140  $this->lng->txt('qpl_skl_sub_tab_usages'),
141  $link
142  );
143 
144  $this->tabs->activateTab('qpl_tab_competences');
145  $this->tabs->activateSubTab($activeSubTabId);
146  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilQuestionPoolSkillAdministrationGUI::$access
private

Definition at line 47 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().

◆ $component_repository

ilComponentRepository ilQuestionPoolSkillAdministrationGUI::$component_repository
private

Definition at line 69 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().

◆ $ctrl

ilQuestionPoolSkillAdministrationGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilQuestionPoolSkillAdministrationGUI::$db
private

Definition at line 67 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().

◆ $ilias

ilQuestionPoolSkillAdministrationGUI::$ilias
private

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

Referenced by __construct().

◆ $lng

ilQuestionPoolSkillAdministrationGUI::$lng
private

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

Referenced by __construct().

◆ $poolOBJ

ilQuestionPoolSkillAdministrationGUI::$poolOBJ
private

Definition at line 74 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().

◆ $refId

ilQuestionPoolSkillAdministrationGUI::$refId
private

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

Referenced by __construct().

◆ $refinery

Refinery ilQuestionPoolSkillAdministrationGUI::$refinery
private

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

Referenced by __construct().

◆ $tabs

ilQuestionPoolSkillAdministrationGUI::$tabs
private

Definition at line 52 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().

◆ $tpl

ilQuestionPoolSkillAdministrationGUI::$tpl
private

Definition at line 57 of file class.ilQuestionPoolSkillAdministrationGUI.php.

Referenced by __construct().


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