ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilQuestionPoolSkillAdministrationGUI Class Reference
+ Collaboration diagram for ilQuestionPoolSkillAdministrationGUI:

Public Member Functions

 __construct (private readonly ilCtrl $ctrl, private readonly Factory $ui_factory, private readonly Renderer $ui_renderer, private readonly GlobalHttpState $http_state, private readonly Refinery $refinery, private readonly ilAccessHandler $access, private readonly ilTabsGUI $tabs, private readonly ilGlobalTemplateInterface $tpl, private readonly ilLanguage $lng, private readonly ilDBInterface $db, private readonly ilComponentRepository $component_repository, private readonly ilComponentFactory $component_factory, private readonly ilObjQuestionPool $pool_obj, private readonly HTTP $http, private readonly ilToolbarGUI $toolbar, private readonly SkillUsageService $skill_usage_service, private readonly RequestDataCollector $request_data_collector, private readonly int $ref_id)
 
 manageTabs ($activeSubTabId)
 
 executeCommand ()
 

Private Member Functions

 isAccessDenied ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilQuestionPoolSkillAdministrationGUI::__construct ( private readonly ilCtrl  $ctrl,
private readonly Factory  $ui_factory,
private readonly Renderer  $ui_renderer,
private readonly GlobalHttpState  $http_state,
private readonly Refinery  $refinery,
private readonly ilAccessHandler  $access,
private readonly ilTabsGUI  $tabs,
private readonly ilGlobalTemplateInterface  $tpl,
private readonly ilLanguage  $lng,
private readonly ilDBInterface  $db,
private readonly ilComponentRepository  $component_repository,
private readonly ilComponentFactory  $component_factory,
private readonly ilObjQuestionPool  $pool_obj,
private readonly HTTP  $http,
private readonly ilToolbarGUI  $toolbar,
private readonly SkillUsageService  $skill_usage_service,
private readonly RequestDataCollector  $request_data_collector,
private readonly int  $ref_id 
)

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

59 {
60 }

Member Function Documentation

◆ executeCommand()

ilQuestionPoolSkillAdministrationGUI::executeCommand ( )

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

96 : void
97 {
98 if ($this->isAccessDenied()) {
99 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_permission'), true);
100 $this->ctrl->setParameterByClass(ilObjQuestionPoolGUI::class, 'ref_id', $this->ref_id);
101 $this->ctrl->redirectByClass(ilObjQuestionPoolGUI::class);
102 }
103
104 $next_class = $this->ctrl->getNextClass();
105
106 $this->manageTabs($next_class);
107
108 switch (strtolower($next_class)) {
109 case strtolower(ilAssQuestionSkillAssignmentsGUI::class):
110 $question_list = new ilAssQuestionList(
111 $this->db,
112 $this->lng,
113 $this->refinery,
114 $this->component_repository,
115 $this->component_factory
116 );
117 $question_list->setParentObjId($this->pool_obj->getId());
118 $question_list->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
119 $question_list->load();
120
122 $this->ctrl,
123 $this->access,
124 $this->tpl,
125 $this->lng,
126 $this->db,
127 $this->request_data_collector,
128 $this->skill_usage_service,
129 $this->ui_factory,
130 $this->ui_renderer,
131 $this->refinery,
132 $this->http,
133 $this->toolbar,
134 $this->tabs
135 );
136 $gui->setAssignmentEditingEnabled(true);
137 $gui->setQuestionContainerId($this->pool_obj->getId());
138 $gui->setQuestionList($question_list);
139
140 $this->ctrl->forwardCommand($gui);
141 break;
142
143 case strtolower(ilAssQuestionSkillUsagesGUI::class):
144 $this->ctrl->forwardCommand(
146 $this->ui_factory,
147 $this->ui_renderer,
148 $this->http_state,
149 $this->lng,
150 $this->tpl,
151 $this->db,
152 $this->pool_obj->getId()
153 )
154 );
155 break;
156 }
157 }
setParentObjId(?int $parentObjId)
static http()
Fetches the global http state from ILIAS.

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

+ Here is the call graph for this function:

◆ isAccessDenied()

ilQuestionPoolSkillAdministrationGUI::isAccessDenied ( )
private

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

62 : bool
63 {
64 return
65 !$this->pool_obj->isSkillServiceEnabled()
67 || !$this->access->checkAccess('write', '', $this->ref_id);
68 }

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

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ manageTabs()

ilQuestionPoolSkillAdministrationGUI::manageTabs (   $activeSubTabId)

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

70 : void
71 {
72 $link = $this->ctrl->getLinkTargetByClass(
73 ilAssQuestionSkillAssignmentsGUI::class,
75 );
76 $this->tabs->addSubTab(
77 strtolower(ilAssQuestionSkillAssignmentsGUI::class),
78 $this->lng->txt('qpl_skl_sub_tab_quest_assign'),
79 $link
80 );
81
82 $link = $this->ctrl->getLinkTargetByClass(
83 ilAssQuestionSkillUsagesGUI::class,
84 ilAssQuestionSkillUsagesGUI::CMD_SHOW
85 );
86 $this->tabs->addSubTab(
87 strtolower(ilAssQuestionSkillUsagesGUI::class),
88 $this->lng->txt('qpl_skl_sub_tab_usages'),
89 $link
90 );
91
92 $this->tabs->activateTab('qpl_tab_competences');
93 $this->tabs->activateSubTab($activeSubTabId);
94 }

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

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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