3 declare(strict_types=1);
43 $this->
ctrl = $DIC->ctrl();
44 $this->
lng = $DIC->language();
45 $this->
tabs = $DIC->tabs();
46 $this->tpl = $DIC[
"tpl"];
47 $this->
help = $DIC[
"ilHelp"];
48 $this->
toolbar = $DIC->toolbar();
49 $ilCtrl = $DIC->ctrl();
51 $this->tref_id = $a_tref_id;
53 $ilCtrl->saveParameter($this, array(
"node_id",
"level_id"));
63 public function initForm(
string $a_mode =
"edit"): void
72 $ti->setMaxLength(200);
74 $ti->setRequired(
true);
75 $this->
form->addItem($ti);
80 $this->
form->addItem($ta);
83 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
84 if ($a_mode ==
"create") {
85 $this->
form->addCommandButton(
"save", $lng->
txt(
"save"));
86 $this->
form->addCommandButton(
"cancelSave", $lng->
txt(
"cancel"));
87 $this->
form->setTitle($lng->
txt(
"skmg_create_skll"));
89 $this->
form->addCommandButton(
"update", $lng->
txt(
"save"));
90 $this->
form->setTitle($lng->
txt(
"skmg_edit_skll"));
93 foreach ($this->
form->getItems() as $item) {
94 $item->setDisabled(
true);
98 $ilCtrl->setParameter($this,
"node_id", $this->requested_node_id);
99 $this->
form->setFormAction($ilCtrl->getFormAction($this));
111 $ilTabs->clearTargets();
113 $ilTabs->setBackTarget(
114 $lng->
txt(
"skmg_skill_levels"),
115 $ilCtrl->getLinkTarget($this,
"edit")
118 if ($this->requested_level_id > 0) {
119 if ($this->tref_id == 0) {
122 $lng->
txt(
"settings"),
123 $ilCtrl->getLinkTarget($this,
"editLevel")
128 $lng->
txt(
"skmg_resources"),
129 $ilCtrl->getLinkTarget($this,
"showLevelResources")
135 if ($this->requested_level_id > 0) {
136 $tpl->
setTitle($lng->
txt(
"skmg_skill_level") .
": " .
142 $desc = $this->skill_tree_node_manager->getWrittenPath($this->node_object->getId());
155 public function setTabs(
string $a_tab =
"levels"): void
163 $ilTabs->clearTargets();
166 $parent_node_id = $this->tree_repo->getParentNodeIdForNodeId($this->requested_node_id);
170 if ($this->tref_id == 0) {
171 if ($parent_type ===
"sctp") {
172 $ilCtrl->setParameterByClass(
173 "ilskilltemplatecategorygui",
177 $ilTabs->setBackTarget(
179 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"listItems")
181 $ilCtrl->setParameterByClass(
182 "ilskilltemplatecategorygui",
187 $ilTabs->setBackTarget(
188 $lng->
txt(
"skmg_skill_templates"),
189 $ilCtrl->getLinkTargetByClass(
"ilobjskilltreegui",
"editSkillTemplates")
194 if (is_object($this->node_object)) {
195 if ($this->tref_id == 0) {
196 $tpl->
setTitle($lng->
txt(
"skmg_skill_template") .
": " .
197 $this->node_object->getTitle());
200 $this->node_object->getTitle()
207 $lng->
txt(
"skmg_skill_levels"),
208 $ilCtrl->getLinkTarget($this,
'edit')
212 if ($this->tref_id == 0) {
215 $lng->
txt(
"settings"),
216 $ilCtrl->getLinkTarget($this,
'editProperties')
229 $ilTabs->activateTab($a_tab);
231 parent::setTitleIcon();
242 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
247 $it->setTitle($this->
form->getInput(
"title"));
248 $it->setDescription($this->
form->getInput(
"description"));
251 $this->node_object = $it;
258 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
263 "ilbasicskilltemplategui",
265 $this->node_object->getId()
267 $ilCtrl->redirectByClass(
"ilbasicskilltemplategui",
"edit");
280 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_skill_in_use"));
281 } elseif ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
282 if ($this->tref_id == 0) {
283 $ilToolbar->addButton(
284 $lng->
txt(
"skmg_add_level"),
285 $ilCtrl->getLinkTarget($this,
"addLevel")
291 $this->requested_node_id,
296 $this->tree_access_manager->hasManageCompetenceTemplatesPermission()
307 if ($this->tref_id > 0) {
316 $usages = $this->usage_manager->getAllUsagesOfTemplate($this->base_skill_id);
319 foreach ($usages as $k => $usage) {
320 $usages_ui = $this->skill_ui_service->getUsagesUI($k, $usage);
321 $html .= $usages_ui->render() .
"<br/><br/>";
332 if ($this->tref_id > 0) {
333 parent::showObjects();
341 $objects = $this->usage_manager->getAssignedObjectsForSkillTemplate($this->base_skill_id);
343 $table = $this->table_manager->getAssignedObjectsTable(
349 $tpl->
setContent($this->ui_ren->render($table));
357 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
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)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static lookupLevelTitle(int $a_id)
static _lookupType(int $a_obj_id)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Node\SkillTreeNodeManager $node_manager, int $a_node_id=0, int $a_tref_id=0)
setContent(string $a_html)
Sets content for standard template.
setScreenIdComponent(string $a_comp)
addObjectsTab(ilTabsGUI $a_tabs)
static getIconPath(int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
form( $class_path, string $cmd, string $submit_caption="")
setDescription(string $a_descr)
Sets description below title in standard template.
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...
ilGlobalTemplateInterface $tpl
initForm(string $a_mode="edit")
setTabs(string $a_tab="levels")
redirectToParent(bool $a_tmp_mode=false)
Basic skill template GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...