5 include_once(
"./Services/Skill/classes/class.ilBasicSkillTemplate.php");
6 include_once(
"./Services/Skill/classes/class.ilBasicSkillGUI.php");
27 $this->tref_id = $a_tref_id;
29 $ilCtrl->saveParameter($this, array(
"obj_id",
"level_id"));
51 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
58 $ti->setRequired(
true);
59 $this->form->addItem($ti);
65 $ni->setRequired(
true);
66 $this->form->addItem($ni);
69 if ($a_mode ==
"create")
71 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
72 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
73 $this->form->setTitle($lng->txt(
"skmg_create_skll"));
77 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
78 $this->form->setTitle($lng->txt(
"skmg_edit_skll"));
81 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
82 $this->form->setFormAction($ilCtrl->getFormAction($this));
93 $ilTabs->clearTargets();
94 $ilHelp->setScreenIdComponent(
"skmg_lev");
95 $ilTabs->setBackTarget($lng->txt(
"skmg_skill_levels"),
96 $ilCtrl->getLinkTarget($this,
"edit"));
98 if (
$_GET[
"level_id"] > 0)
100 if ($this->tref_id == 0)
102 $ilTabs->addTab(
"level_settings",
103 $lng->txt(
"settings"),
104 $ilCtrl->getLinkTarget($this,
"editLevel"));
108 $ilTabs->addTab(
"level_resources",
109 $lng->txt(
"skmg_resources"),
110 $ilCtrl->getLinkTarget($this,
"showLevelResources"));
123 if (
$_GET[
"level_id"] > 0)
125 $tpl->setTitle($lng->txt(
"skmg_skill_level").
": ".
130 $tpl->setTitle($lng->txt(
"skmg_skill_level"));
133 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
135 $path = $tree->getPathFull($this->node_object->getId());
137 foreach (
$path as $p)
139 if (in_array($p[
"type"], array(
"scat",
"skll")))
141 $desc.= $sep.$p[
"title"];
145 $tpl->setDescription($desc);
149 0,
"sktp",
"_b",
false));
163 $ilTabs->clearTargets();
164 $ilHelp->setScreenIdComponent(
"skmg_sktp");
166 if ($this->tref_id == 0)
168 $ilTabs->setBackTarget($lng->txt(
"skmg_skill_templates"),
169 $ilCtrl->getLinkTargetByClass(
"ilobjskillmanagementgui",
"editSkillTemplates"));
172 if (is_object($this->node_object))
174 if ($this->tref_id == 0)
176 $tpl->setTitle($lng->txt(
"skmg_skill_template").
": ".
177 $this->node_object->getTitle());
182 $this->node_object->getTitle());
186 $ilTabs->addTab(
"levels", $lng->txt(
"skmg_skill_levels"),
187 $ilCtrl->getLinkTarget($this,
'edit'));
189 if ($this->tref_id > 0)
197 if ($this->tref_id == 0)
199 $ilTabs->addTab(
"properties", $lng->txt(
"settings"),
200 $ilCtrl->getLinkTarget($this,
'editProperties'));
203 $ilTabs->activateTab($a_tab);
212 $tpl->setTitle($lng->txt(
"skmg_skill"));
213 $tpl->setDescription(
"");
223 $it->setTitle($this->form->getInput(
"title"));
224 $it->setOrderNr($this->form->getInput(
"order_nr"));
227 $this->node_object = $it;
237 $ilCtrl->setParameterByClass(
"ilbasicskilltemplategui",
"obj_id",
238 $this->node_object->getId());
239 $ilCtrl->redirectByClass(
"ilbasicskilltemplategui",
"edit");
254 if ($this->tref_id == 0)
256 $ilToolbar->addButton($lng->txt(
"skmg_add_level"),
257 $ilCtrl->getLinkTarget($this,
"addLevel"));
260 include_once(
"./Services/Skill/classes/class.ilSkillLevelTableGUI.php");
262 $tpl->setContent($table->getHTML());