ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilQuestionPoolSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilQuestionPoolSkillAdministrationGUI:

Public Member Functions

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

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,
ilAccessHandler  $access,
ilTabsGUI  $tabs,
ilTemplate  $tpl,
ilLanguage  $lng,
ilDBInterface  $db,
ilPluginAdmin  $pluginAdmin,
ilObjQuestionPool  $poolOBJ,
  $refId 
)

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

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

Member Function Documentation

◆ executeCommand()

ilQuestionPoolSkillAdministrationGUI::executeCommand ( )

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

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

122  {
123  if ($this->isAccessDenied()) {
124  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
125  }
126 
127  $nextClass = $this->ctrl->getNextClass();
128 
129  $this->manageTabs($nextClass);
130 
131  switch ($nextClass) {
132  case 'ilassquestionskillassignmentsgui':
133 
134  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
135  $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
136  $questionList->setParentObjId($this->poolOBJ->getId());
137  $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
138  $questionList->load();
139 
140  $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
141  $gui->setAssignmentEditingEnabled(true);
142  $gui->setQuestionContainerId($this->poolOBJ->getId());
143  $gui->setQuestionList($questionList);
144 
145  $this->ctrl->forwardCommand($gui);
146 
147  break;
148 
149  case 'ilassquestionskillusagestablegui':
150 
152  $this->ctrl,
153  $this->tpl,
154  $this->lng,
155  $this->db,
156  $this->poolOBJ->getId()
157  );
158 
159  $this->ctrl->forwardCommand($gui);
160 
161  break;
162  }
163  }
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 78 of file class.ilQuestionPoolSkillAdministrationGUI.php.

References ilObjQuestionPool\isSkillManagementGloballyActivated().

Referenced by executeCommand().

79  {
80  if (!$this->poolOBJ->isSkillServiceEnabled()) {
81  return true;
82  }
83 
85  return true;
86  }
87 
88  if (!$this->access->checkAccess('write', '', $this->refId)) {
89  return true;
90  }
91 
92  return false;
93  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manageTabs()

ilQuestionPoolSkillAdministrationGUI::manageTabs (   $activeSubTabId)

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

References ilAssQuestionSkillUsagesTableGUI\CMD_SHOW, and ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS.

Referenced by executeCommand().

96  {
97  $link = $this->ctrl->getLinkTargetByClass(
98  'ilAssQuestionSkillAssignmentsGUI',
100  );
101  $this->tabs->addSubTab(
102  'ilassquestionskillassignmentsgui',
103  $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
104  $link
105  );
106 
107  $link = $this->ctrl->getLinkTargetByClass(
108  'ilAssQuestionSkillUsagesTableGUI',
110  );
111  $this->tabs->addSubTab(
112  'ilassquestionskillusagestablegui',
113  $this->lng->txt('qpl_skl_sub_tab_usages'),
114  $link
115  );
116 
117  $this->tabs->activateTab('qpl_tab_competences');
118  $this->tabs->activateSubTab($activeSubTabId);
119  }
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilQuestionPoolSkillAdministrationGUI::$access
private

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

Referenced by __construct().

◆ $ctrl

ilQuestionPoolSkillAdministrationGUI::$ctrl
private

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

Referenced by __construct().

◆ $db

ilQuestionPoolSkillAdministrationGUI::$db
private

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

Referenced by __construct().

◆ $ilias

ilQuestionPoolSkillAdministrationGUI::$ilias
private

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

Referenced by __construct().

◆ $lng

ilQuestionPoolSkillAdministrationGUI::$lng
private

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

Referenced by __construct().

◆ $pluginAdmin

ilQuestionPoolSkillAdministrationGUI::$pluginAdmin
private

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

Referenced by __construct().

◆ $poolOBJ

ilQuestionPoolSkillAdministrationGUI::$poolOBJ
private

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

Referenced by __construct().

◆ $tabs

ilQuestionPoolSkillAdministrationGUI::$tabs
private

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

Referenced by __construct().

◆ $tpl

ilQuestionPoolSkillAdministrationGUI::$tpl
private

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

Referenced by __construct().


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