41 $this->
ctrl = $DIC->ctrl();
42 $this->
lng = $DIC->language();
43 $this->
tabs = $DIC->tabs();
44 $this->tpl = $DIC[
"tpl"];
45 $this->
help = $DIC[
"ilHelp"];
46 $this->
toolbar = $DIC->toolbar();
47 $ilCtrl = $DIC->ctrl();
49 $this->tref_id = $a_tref_id;
51 $ilCtrl->saveParameter($this, array(
"node_id",
"level_id"));
61 public function initForm(
string $a_mode =
"edit"): void
70 $ti->setMaxLength(200);
72 $ti->setRequired(
true);
73 $this->
form->addItem($ti);
78 $this->
form->addItem($ta);
81 if ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
82 if ($a_mode ==
"create") {
83 $this->
form->addCommandButton(
"save", $lng->
txt(
"save"));
84 $this->
form->addCommandButton(
"cancelSave", $lng->
txt(
"cancel"));
85 $this->
form->setTitle($lng->
txt(
"skmg_create_skll"));
87 $this->
form->addCommandButton(
"update", $lng->
txt(
"save"));
88 $this->
form->setTitle($lng->
txt(
"skmg_edit_skll"));
91 foreach ($this->
form->getItems() as $item) {
92 $item->setDisabled(
true);
96 $ilCtrl->setParameter($this,
"node_id", $this->requested_node_id);
97 $this->
form->setFormAction($ilCtrl->getFormAction($this));
109 $ilTabs->clearTargets();
111 $ilTabs->setBackTarget(
112 $lng->
txt(
"skmg_skill_levels"),
113 $ilCtrl->getLinkTarget($this,
"edit")
116 if ($this->requested_level_id > 0) {
117 if ($this->tref_id == 0) {
120 $lng->
txt(
"settings"),
121 $ilCtrl->getLinkTarget($this,
"editLevel")
126 $lng->
txt(
"skmg_resources"),
127 $ilCtrl->getLinkTarget($this,
"showLevelResources")
133 if ($this->requested_level_id > 0) {
134 $tpl->
setTitle($lng->
txt(
"skmg_skill_level") .
": " .
140 $desc = $this->skill_tree_node_manager->getWrittenPath($this->node_object->getId());
153 public function setTabs(
string $a_tab =
"levels"): void
161 $ilTabs->clearTargets();
164 $parent_node_id = $this->tree_repo->getParentNodeIdForNodeId($this->requested_node_id);
168 if ($this->tref_id == 0) {
169 if ($parent_type ===
"sctp") {
170 $ilCtrl->setParameterByClass(
171 "ilskilltemplatecategorygui",
175 $ilTabs->setBackTarget(
177 $ilCtrl->getLinkTargetByClass(
"ilskilltemplatecategorygui",
"listItems")
179 $ilCtrl->setParameterByClass(
180 "ilskilltemplatecategorygui",
185 $ilTabs->setBackTarget(
186 $lng->
txt(
"skmg_skill_templates"),
187 $ilCtrl->getLinkTargetByClass(
"ilobjskilltreegui",
"editSkillTemplates")
192 if (is_object($this->node_object)) {
193 if ($this->tref_id == 0) {
194 $tpl->
setTitle($lng->
txt(
"skmg_skill_template") .
": " .
195 $this->node_object->getTitle());
198 $this->node_object->getTitle()
205 $lng->
txt(
"skmg_skill_levels"),
206 $ilCtrl->getLinkTarget($this,
'edit')
210 if ($this->tref_id == 0) {
213 $lng->
txt(
"settings"),
214 $ilCtrl->getLinkTarget($this,
'editProperties')
227 $ilTabs->activateTab($a_tab);
229 parent::setTitleIcon();
240 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
245 $it->setTitle($this->
form->getInput(
"title"));
246 $it->setDescription($this->
form->getInput(
"description"));
249 $this->node_object = $it;
256 if (!$this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
261 "ilbasicskilltemplategui",
263 $this->node_object->getId()
265 $ilCtrl->redirectByClass(
"ilbasicskilltemplategui",
"edit");
278 $this->tpl->setOnScreenMessage(
'info', $lng->
txt(
"skmg_skill_in_use"));
279 } elseif ($this->tree_access_manager->hasManageCompetenceTemplatesPermission()) {
280 if ($this->tref_id == 0) {
281 $ilToolbar->addButton(
282 $lng->
txt(
"skmg_add_level"),
283 $ilCtrl->getLinkTarget($this,
"addLevel")
289 $this->requested_node_id,
294 $this->tree_access_manager->hasManageCompetenceTemplatesPermission()
305 if ($this->tref_id > 0) {
315 $usages = $usage_info->getAllUsagesOfTemplate($this->base_skill_id);
318 foreach ($usages as $k => $usage) {
320 $html .= $tab->getHTML() .
"<br/><br/>";
331 if ($this->tref_id > 0) {
332 parent::showObjects();
341 $objects = $usage_info->getAssignedObjectsForSkillTemplate($this->base_skill_id);
353 $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)
__construct(Tree\SkillTreeNodeManager $node_manager, int $a_node_id=0, int $a_tref_id=0)
static lookupLevelTitle(int $a_id)
static _lookupType(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
TableGUI class for skill usages.
form( $class_path, string $cmd)
__construct(Container $dic, ilPlugin $plugin)
setDescription(string $a_descr)
Sets description below title in standard template.
This class represents a text area property in a property form.
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...