3 declare(strict_types=1);
52 bool $a_call_by_reference =
true,
53 bool $a_prepare_output =
true 57 $this->
ctrl = $DIC->ctrl();
58 $this->error = $DIC[
"ilErr"];
59 $this->
access = $DIC->access();
60 $this->
tabs = $DIC->tabs();
61 $this->
lng = $DIC->language();
63 $this->tpl = $DIC[
"tpl"];
64 $this->
toolbar = $DIC->toolbar();
65 $this->
user = $DIC->user();
66 $this->ui_fac = $DIC->ui()->factory();
67 $this->ui_ren = $DIC->ui()->renderer();
68 $ilCtrl = $DIC->ctrl();
73 $this->
lng->loadLanguageModule(
'skmg');
75 $ilCtrl->saveParameter($this,
"node_id");
76 $this->skill_manager = $DIC->skills()->internal()->manager();
77 $this->management_access_manager = $this->skill_manager->getManagementAccessManager($this->
object->getRefId());
85 $next_class = $this->
ctrl->getNextClass($this);
86 $cmd = $this->
ctrl->getCmd();
88 if (!$this->management_access_manager->hasReadManagementPermission()) {
92 switch ($next_class) {
93 case "ilskilltreeadmingui":
95 $ilTabs->activateTab(
"skill_trees");
97 $this->
ctrl->forwardCommand($gui);
100 case 'ilpermissiongui':
102 $this->tabs_gui->activateTab(
'permissions');
104 $ret = $this->
ctrl->forwardCommand($perm_gui);
109 if (!$cmd || $cmd ==
'view') {
124 if ($this->management_access_manager->hasReadManagementPermission()) {
125 $this->tabs_gui->addTab(
128 $this->
ctrl->getLinkTargetByClass(
"ilskilltreeadmingui",
"")
131 $this->tabs_gui->addTab(
134 $this->
ctrl->getLinkTarget($this,
"editSettings")
138 if ($this->management_access_manager->hasEditManagementPermissionsPermission()) {
139 $this->tabs_gui->addTab(
142 $this->
ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
158 $check_enable = $this->ui_fac->input()->field()->checkbox(
$lng->
txt(
"skmg_enable_skmg"))
162 $check_hide_prof = $this->ui_fac->input()->field()->checkbox(
163 $lng->
txt(
"skmg_hide_profile_self_eval"),
164 $lng->
txt(
"skmg_hide_profile_self_eval_info")
165 )->
withValue($skmg_set->getHideProfileBeforeSelfEval());
168 $check_loc_ass_prof = $this->ui_fac->input()->field()->checkbox(
$lng->
txt(
"skmg_local_assignment_profiles"))
169 ->
withValue($skmg_set->getLocalAssignmentOfProfiles());
172 $check_create_loc_prof = $this->ui_fac->input()->field()->checkbox(
173 $lng->
txt(
"skmg_allow_local_profiles"),
174 $lng->
txt(
"skmg_allow_local_profiles_info")
175 )->
withValue($skmg_set->getAllowLocalProfiles());
178 $section_settings = $this->ui_fac->input()->field()->section(
179 [
"check_enable" => $check_enable,
180 "check_hide_prof" => $check_hide_prof,
181 "check_loc_ass_prof" => $check_loc_ass_prof,
182 "check_create_loc_prof" => $check_create_loc_prof],
187 $ilCtrl->setParameterByClass(
188 'ilobjskillmanagementgui',
190 'skill_settings_config' 193 $form = $this->ui_fac->input()->container()->form()->standard(
194 $ilCtrl->getFormAction($this,
"editSettings"),
195 [
"section_settings" => $section_settings]
198 if ($this->request->getMethod() ==
"POST" 199 && $this->request->getQueryParams()[
"skill_settings"] ==
"skill_settings_config") {
200 if (!$this->management_access_manager->hasEditManagementSettingsPermission()) {
204 $form = $form->withRequest($this->request);
205 $result = $form->getData();
207 $skmg_set->activate($result[
"section_settings"][
"check_enable"]);
208 $skmg_set->setHideProfileBeforeSelfEval($result[
"section_settings"][
"check_hide_prof"]);
209 $skmg_set->setLocalAssignmentOfProfiles($result[
"section_settings"][
"check_loc_ass_prof"]);
210 $skmg_set->setAllowLocalProfiles($result[
"section_settings"][
"check_create_loc_prof"]);
212 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
213 $ilCtrl->redirect($this,
"editSettings");
216 $this->tpl->setContent($this->ui_ren->render([$form]));
221 $this->
ctrl->clearParameterByClass(get_class($this),
"node_id");
222 $this->
ctrl->redirectByClass(
"ilskilltreeadmingui",
"listTrees");
An entity that renders components to a string output.
__construct( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
Skill tree administration.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_sub_objects=true)
SkillManagementAccess $management_access_manager
SkillInternalManagerService $skill_manager
Skill internal manager service.
Class ilObjectGUI Basic methods of all Output classes.
activateTab(string $a_id)
Error Handling & global info handling.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Skill management main GUI class.