ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilQuestionPoolSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilQuestionPoolSkillAdministrationGUI:

Public Member Functions

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

Protected Attributes

 $refinery
 

Private Member Functions

 isAccessDenied ()
 

Private Attributes

 $ilias
 
 $ctrl
 
 $access
 
 $tabs
 
 $tpl
 
 $lng
 
 $db
 
 $pluginAdmin
 
 $poolOBJ
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

References $access, $ctrl, $db, $ilias, $lng, $pluginAdmin, $poolOBJ, $refId, $refinery, $tabs, and $tpl.

72  {
73  $this->ilias = $ilias;
74  $this->ctrl = $ctrl;
75  $this->refinery = $refinery;
76  $this->access = $access;
77  $this->tabs = $tabs;
78  $this->tpl = $tpl;
79  $this->lng = $lng;
80  $this->db = $db;
81  $this->pluginAdmin = $pluginAdmin;
82  $this->poolOBJ = $poolOBJ;
83  $this->refId = $refId;
84  }
$refId
Definition: xapitoken.php:40
redirection script todo: (a better solution should control the processing via a xml file) ...

Member Function Documentation

◆ executeCommand()

ilQuestionPoolSkillAdministrationGUI::executeCommand ( )

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

References isAccessDenied(), manageTabs(), and ilAssQuestionList\QUESTION_INSTANCE_TYPE_ORIGINALS.

130  {
131  if ($this->isAccessDenied()) {
132  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
133  }
134 
135  $nextClass = $this->ctrl->getNextClass();
136 
137  $this->manageTabs($nextClass);
138 
139  switch ($nextClass) {
140  case 'ilassquestionskillassignmentsgui':
141  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
142  $questionList = new ilAssQuestionList($this->db, $this->lng, $this->refinery, $this->pluginAdmin);
143  $questionList->setParentObjId($this->poolOBJ->getId());
144  $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
145  $questionList->load();
146 
147  $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
148  $gui->setAssignmentEditingEnabled(true);
149  $gui->setQuestionContainerId($this->poolOBJ->getId());
150  $gui->setQuestionList($questionList);
151 
152  $this->ctrl->forwardCommand($gui);
153 
154  break;
155 
156  case 'ilassquestionskillusagestablegui':
157 
159  $this->ctrl,
160  $this->tpl,
161  $this->lng,
162  $this->db,
163  $this->poolOBJ->getId()
164  );
165 
166  $this->ctrl->forwardCommand($gui);
167 
168  break;
169  }
170  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ isAccessDenied()

ilQuestionPoolSkillAdministrationGUI::isAccessDenied ( )
private

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

References ilObjQuestionPool\isSkillManagementGloballyActivated().

Referenced by executeCommand().

87  {
88  if (!$this->poolOBJ->isSkillServiceEnabled()) {
89  return true;
90  }
91 
93  return true;
94  }
95 
96  if (!$this->access->checkAccess('write', '', $this->refId)) {
97  return true;
98  }
99 
100  return false;
101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manageTabs()

ilQuestionPoolSkillAdministrationGUI::manageTabs (   $activeSubTabId)

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

References ilAssQuestionSkillUsagesTableGUI\CMD_SHOW, and ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS.

Referenced by executeCommand().

104  {
105  $link = $this->ctrl->getLinkTargetByClass(
106  'ilAssQuestionSkillAssignmentsGUI',
108  );
109  $this->tabs->addSubTab(
110  'ilassquestionskillassignmentsgui',
111  $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
112  $link
113  );
114 
115  $link = $this->ctrl->getLinkTargetByClass(
116  'ilAssQuestionSkillUsagesTableGUI',
118  );
119  $this->tabs->addSubTab(
120  'ilassquestionskillusagestablegui',
121  $this->lng->txt('qpl_skl_sub_tab_usages'),
122  $link
123  );
124 
125  $this->tabs->activateTab('qpl_tab_competences');
126  $this->tabs->activateSubTab($activeSubTabId);
127  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilQuestionPoolSkillAdministrationGUI::$access
private

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

Referenced by __construct().

◆ $ctrl

ilQuestionPoolSkillAdministrationGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilQuestionPoolSkillAdministrationGUI::$db
private

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

Referenced by __construct().

◆ $ilias

ilQuestionPoolSkillAdministrationGUI::$ilias
private

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

Referenced by __construct().

◆ $lng

ilQuestionPoolSkillAdministrationGUI::$lng
private

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

Referenced by __construct().

◆ $pluginAdmin

ilQuestionPoolSkillAdministrationGUI::$pluginAdmin
private

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

Referenced by __construct().

◆ $poolOBJ

ilQuestionPoolSkillAdministrationGUI::$poolOBJ
private

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

Referenced by __construct().

◆ $refinery

ilQuestionPoolSkillAdministrationGUI::$refinery
protected

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

Referenced by __construct().

◆ $tabs

ilQuestionPoolSkillAdministrationGUI::$tabs
private

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

Referenced by __construct().

◆ $tpl

ilQuestionPoolSkillAdministrationGUI::$tpl
private

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

Referenced by __construct().


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