ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 120 of file class.ilQuestionPoolSkillAdministrationGUI.php.

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

121  {
122  if( $this->isAccessDenied() )
123  {
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  {
133  case 'ilassquestionskillassignmentsgui':
134 
135  require_once 'Modules/TestQuestionPool/classes/class.ilAssQuestionList.php';
136  $questionList = new ilAssQuestionList($this->db, $this->lng, $this->pluginAdmin);
137  $questionList->setParentObjId($this->poolOBJ->getId());
138  $questionList->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
139  $questionList->load();
140 
141  $gui = new ilAssQuestionSkillAssignmentsGUI($this->ctrl, $this->access, $this->tpl, $this->lng, $this->db);
142  $gui->setAssignmentEditingEnabled(true);
143  $gui->setQuestionContainerId($this->poolOBJ->getId());
144  $gui->setQuestionList($questionList);
145 
146  $this->ctrl->forwardCommand($gui);
147 
148  break;
149 
150  case 'ilassquestionskillusagestablegui':
151 
153  $this->ctrl, $this->tpl, $this->lng, $this->db, $this->poolOBJ->getId()
154  );
155 
156  $this->ctrl->forwardCommand($gui);
157 
158  break;
159  }
160  }
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  {
82  return true;
83  }
84 
86  {
87  return true;
88  }
89 
90  if( ! $this->access->checkAccess('write', '', $this->refId) )
91  {
92  return true;
93  }
94 
95  return false;
96  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manageTabs()

ilQuestionPoolSkillAdministrationGUI::manageTabs (   $activeSubTabId)

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

References ilAssQuestionSkillUsagesTableGUI\CMD_SHOW, and ilAssQuestionSkillAssignmentsGUI\CMD_SHOW_SKILL_QUEST_ASSIGNS.

Referenced by executeCommand().

99  {
100  $link = $this->ctrl->getLinkTargetByClass(
101  'ilAssQuestionSkillAssignmentsGUI', ilAssQuestionSkillAssignmentsGUI::CMD_SHOW_SKILL_QUEST_ASSIGNS
102  );
103  $this->tabs->addSubTab(
104  'ilassquestionskillassignmentsgui', $this->lng->txt('qpl_skl_sub_tab_quest_assign'), $link
105 
106  );
107 
108  $link = $this->ctrl->getLinkTargetByClass(
109  'ilAssQuestionSkillUsagesTableGUI', ilAssQuestionSkillUsagesTableGUI::CMD_SHOW
110  );
111  $this->tabs->addSubTab(
112  'ilassquestionskillusagestablegui', $this->lng->txt('qpl_skl_sub_tab_usages'), $link
113 
114  );
115 
116  $this->tabs->activateTab('qpl_tab_competences');
117  $this->tabs->activateSubTab($activeSubTabId);
118  }
+ 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: