ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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 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 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.

58 {
59 }

Member Function Documentation

◆ executeCommand()

ilQuestionPoolSkillAdministrationGUI::executeCommand ( )

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

95 : void
96 {
97 if ($this->isAccessDenied()) {
98 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_permission'), true);
99 $this->ctrl->setParameterByClass(ilObjQuestionPoolGUI::class, 'ref_id', $this->ref_id);
100 $this->ctrl->redirectByClass(ilObjQuestionPoolGUI::class);
101 }
102
103 $next_class = $this->ctrl->getNextClass();
104
105 $this->manageTabs($next_class);
106
107 switch (strtolower($next_class)) {
108 case strtolower(ilAssQuestionSkillAssignmentsGUI::class):
109 $question_list = new ilAssQuestionList($this->db, $this->lng, $this->refinery, $this->component_repository);
110 $question_list->setParentObjId($this->pool_obj->getId());
111 $question_list->setQuestionInstanceTypeFilter(ilAssQuestionList::QUESTION_INSTANCE_TYPE_ORIGINALS);
112 $question_list->load();
113
115 $this->ctrl,
116 $this->access,
117 $this->tpl,
118 $this->lng,
119 $this->db,
120 $this->request_data_collector,
121 $this->skill_usage_service,
122 $this->ui_factory,
123 $this->ui_renderer,
124 $this->refinery,
125 $this->http,
126 $this->toolbar,
127 $this->tabs
128 );
129 $gui->setAssignmentEditingEnabled(true);
130 $gui->setQuestionContainerId($this->pool_obj->getId());
131 $gui->setQuestionList($question_list);
132
133 $this->ctrl->forwardCommand($gui);
134 break;
135
136 case strtolower(ilAssQuestionSkillUsagesGUI::class):
137 $this->ctrl->forwardCommand(
139 $this->ui_factory,
140 $this->ui_renderer,
141 $this->http_state,
142 $this->lng,
143 $this->tpl,
144 $this->db,
145 $this->pool_obj->getId()
146 )
147 );
148 break;
149 }
150 }
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 61 of file class.ilQuestionPoolSkillAdministrationGUI.php.

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

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 69 of file class.ilQuestionPoolSkillAdministrationGUI.php.

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

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: