3 declare(strict_types=1);
43 $this->
ctrl = $DIC->ctrl();
44 $this->tpl = $DIC[
"tpl"];
45 $this->
tabs = $DIC->tabs();
46 $this->
lng = $DIC->language();
47 $this->
help = $DIC[
"ilHelp"];
48 $ilCtrl = $DIC->ctrl();
50 $ilCtrl->saveParameter($this,
"node_id");
68 $next_class = $ilCtrl->getNextClass($this);
69 $cmd = $ilCtrl->getCmd();
71 switch ($next_class) {
78 public function setTabs(
string $a_tab): void
86 $ilTabs->clearTargets();
93 $ilCtrl->getLinkTarget($this,
'listItems')
99 $lng->
txt(
"settings"),
100 $ilCtrl->getLinkTarget($this,
'editProperties')
106 $parent_node_id = $this->tree_repo->getParentNodeIdForNodeId($this->requested_node_id);
111 if ($parent_type ===
"scat") {
112 $ilCtrl->setParameter(
117 $ilTabs->setBackTarget(
119 $ilCtrl->getLinkTarget($this,
"listItems")
121 $ilCtrl->setParameter(
124 $this->requested_node_id
127 $ilCtrl->setParameterByClass(
130 $this->skill_tree_node_manager->getRootId()
132 $ilTabs->setBackTarget(
133 $lng->
txt(
"skmg_skills"),
134 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"listSkills")
136 $ilCtrl->setParameterByClass(
139 $this->requested_node_id
143 parent::setTitleIcon();
145 $lng->
txt(
"scat") .
": " . $this->node_object->getTitle()
149 $ilTabs->activateTab($a_tab);
157 parent::editProperties();
169 public function initForm(
string $a_mode =
"edit"): void
178 $ti->setMaxLength(200);
180 $ti->setRequired(
true);
181 $this->
form->addItem($ti);
186 $this->
form->addItem($ta);
193 $cb->setInfo($lng->
txt(
"skmg_selectable_info"));
194 $this->
form->addItem($cb);
197 if ($this->tree_access_manager->hasManageCompetencesPermission()) {
198 if ($a_mode ==
"create") {
199 $this->
form->addCommandButton(
"save", $lng->
txt(
"save"));
200 $this->
form->addCommandButton(
"cancelSave", $lng->
txt(
"cancel"));
201 $this->
form->setTitle($lng->
txt(
"skmg_create_skill_category"));
203 $this->
form->addCommandButton(
"update", $lng->
txt(
"save"));
204 $this->
form->setTitle($lng->
txt(
"skmg_edit_scat"));
207 foreach ($this->
form->getItems() as $item) {
208 $item->setDisabled(
true);
212 $ilCtrl->setParameter($this,
"node_id", $this->requested_node_id);
213 $this->
form->setFormAction($ilCtrl->getFormAction($this));
218 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
223 $it->setTitle($this->
form->getInput(
"title"));
224 $it->setDescription($this->
form->getInput(
"description"));
225 $it->setSelfEvaluation((
bool) $this->
form->getInput(
"self_eval"));
226 $it->setStatus((
int) $this->
form->getInput(
"status"));
237 $values[
"title"] = $this->node_object->getTitle();
238 $values[
"description"] = $this->node_object->getDescription();
239 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
240 $values[
"status"] = $this->node_object->getStatus();
241 $this->
form->setValuesByArray($values);
246 if (!$this->tree_access_manager->hasManageCompetencesPermission()) {
250 $this->node_object->setTitle($this->
form->getInput(
"title"));
251 $this->node_object->setDescription($this->
form->getInput(
"description"));
252 $this->node_object->setSelfEvaluation((
bool) $this->
form->getInput(
"self_eval"));
253 $this->node_object->setStatus((
int) $this->
form->getInput(
"status"));
254 $this->node_object->update();
263 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_skill_in_use"));
266 if ($this->tree_access_manager->hasManageCompetencesPermission()) {
267 self::addCreationButtons();
274 $this->requested_node_id,
285 $ilCtrl = $DIC->ctrl();
286 $lng = $DIC->language();
287 $ilToolbar = $DIC->toolbar();
288 $ilUser = $DIC->user();
294 $ilCtrl->setParameterByClass(
299 $ilToolbar->addButton(
300 $lng->
txt(
"skmg_create_skll"),
301 $ilCtrl->getLinkTargetByClass(
"ilbasicskillgui",
"create")
305 $ilCtrl->setParameterByClass(
306 "ilskillcategorygui",
310 $ilToolbar->addButton(
311 $lng->
txt(
"skmg_create_skill_category"),
312 $ilCtrl->getLinkTargetByClass(
"ilskillcategorygui",
"create")
316 $ilCtrl->setParameterByClass(
317 "ilskilltemplatereferencegui",
321 $ilToolbar->addButton(
322 $lng->
txt(
"skmg_create_skill_template_reference"),
323 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatereferencegui",
"create")
328 if ($ilUser->clipboardHasObjectsOfType(
"skll")) {
329 $ilToolbar->addSeparator();
331 $ilToolbar->addButton(
332 $lng->
txt(
"skmg_insert_basic_skill_from_clip"),
333 $ilCtrl->getLinkTargetByClass(
"ilskillcategorygui",
"insertBasicSkillClip")
338 if ($ilUser->clipboardHasObjectsOfType(
"scat")) {
340 $ilToolbar->addSeparator();
343 $ilToolbar->addButton(
344 $lng->
txt(
"skmg_insert_skill_category_from_clip"),
345 $ilCtrl->getLinkTargetByClass(
"ilskillcategorygui",
"insertSkillCategoryClip")
350 if ($ilUser->clipboardHasObjectsOfType(
"sktr")) {
352 $ilToolbar->addSeparator();
355 $ilToolbar->addButton(
356 $lng->
txt(
"skmg_insert_skill_template_reference_from_clip"),
357 $ilCtrl->getLinkTargetByClass(
"ilskillcategorygui",
"insertTemplateReferenceClip")
362 $ilToolbar->addButton(
363 $lng->
txt(
"skmg_import_skills"),
364 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"showImportForm")
379 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"node_id", $this->requested_node_id);
380 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
384 parent::redirectToParent();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skill category GUI class.
static addCreationButtons()
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...
setSkillNodeDescription()
addUsageTab(ilTabsGUI $a_tabs)
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
ilGlobalTemplateInterface $tpl
static _lookupType(int $a_obj_id)
setContent(string $a_html)
Sets content for standard template.
Basic GUI class for skill tree nodes.
__construct(Node\SkillTreeNodeManager $node_manager, int $a_node_id=0)
setScreenIdComponent(string $a_comp)
initForm(string $a_mode="edit")
redirectToParent(bool $a_tmp_mode=false)
Redirect to parent (identified by current node_id)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
SkillAdminGUIRequest $admin_gui_request
form( $class_path, string $cmd, string $submit_caption="")
__construct(Container $dic, ilPlugin $plugin)
This class represents a text area property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValues()
Get current values for from.
addStatusInput(ilPropertyFormGUI $a_form)