5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeGUI.php");
6 include_once(
"./Services/Skill/classes/class.ilSkillTemplateReference.php");
26 $ilCtrl->saveParameter($this,
"obj_id");
46 $tpl->getStandardTemplate();
48 $next_class = $ilCtrl->getNextClass($this);
49 $cmd = $ilCtrl->getCmd();
66 $ilTabs->clearTargets();
68 if (is_object($this->node_object))
71 $ilTabs->addTab(
"content", $lng->txt(
"content"),
72 $ilCtrl->getLinkTarget($this,
'listItems'));
75 $ilTabs->addTab(
"properties", $lng->txt(
"settings"),
76 $ilCtrl->getLinkTarget($this,
'editProperties'));
79 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id",
80 $this->node_object->skill_tree->getRootId());
81 $ilTabs->setBackTarget($lng->txt(
"obj_skmg"),
82 $ilCtrl->getLinkTargetByClass(
"ilskillrootgui",
"listSkills"));
83 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id",
87 $add =
" (".ilSkillTreeNode::_lookupTitle($tid).
")";
91 $lng->txt(
"skmg_sktr").
": ".$this->node_object->getTitle().$add);
94 $ilTabs->activateTab($a_tab);
108 $ilCtrl->saveParameter($this,
"parent_id");
109 $ilCtrl->saveParameter($this,
"target");
111 $tpl->setContent($this->form->getHTML());
126 $tpl->setContent($this->form->getHTML());
138 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
142 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
147 $this->form->addItem($ti);
153 $ni->setRequired(
true);
154 $this->form->addItem($ni);
158 "" => $lng->txt(
"please_select"),
160 foreach ($tmplts as $tmplt)
162 $options[$tmplt[
"child"]] = $tmplt[
"title"];
164 $si =
new ilSelectInputGUI($lng->txt(
"skmg_skill_template"),
"skill_template_id");
166 $si->setRequired(
true);
167 $this->form->addItem($si);
171 $cb->
setInfo($lng->txt(
"skmg_draft_info"));
172 $this->form->addItem($cb);
176 $cb->
setInfo($lng->txt(
"skmg_selectable_info"));
177 $this->form->addItem($cb);
179 if ($a_mode ==
"create")
181 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
182 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
183 $this->form->setTitle($lng->txt(
"skmg_new_sktr"));
187 $this->form->addCommandButton(
"updateSkillTemplateReference", $lng->txt(
"save"));
188 $this->form->setTitle($lng->txt(
"skmg_edit_sktr"));
191 $this->form->setFormAction($ilCtrl->getFormAction($this));
200 $values[
"skill_template_id"] = $this->node_object->getSkillTemplateId();
201 $values[
"title"] = $this->node_object->getTitle();
202 $values[
"selectable"] = $this->node_object->getSelfEvaluation();
203 $values[
"draft"] = $this->node_object->getDraft();
204 $values[
"order_nr"] = $this->node_object->getOrderNr();
205 $this->form->setValuesByArray($values);
214 $sktr->setTitle(
$_POST[
"title"]);
215 $sktr->setSkillTemplateId(
$_POST[
"skill_template_id"]);
216 $sktr->setSelfEvaluation(
$_POST[
"selectable"]);
217 $sktr->setOrderNr(
$_POST[
"order_nr"]);
218 $sktr->setDraft(
$_POST[
"draft"]);
231 if ($this->form->checkInput())
234 $this->node_object->setSkillTemplateId(
$_POST[
"skill_template_id"]);
235 $this->node_object->setTitle(
$_POST[
"title"]);
236 $this->node_object->setSelfEvaluation(
$_POST[
"selectable"]);
237 $this->node_object->setOrderNr(
$_POST[
"order_nr"]);
238 $this->node_object->setDraft(
$_POST[
"draft"]);
239 $this->node_object->update();
242 $ilCtrl->redirect($this,
"editProperties");
245 $this->form->setValuesByPost();
246 $tpl->setContent($this->form->getHtml());
259 $ilCtrl->redirectByClass(
"ilobjskillmanagementgui",
"editSkills");
271 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
273 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
275 $ns->setListClass(
"il_Explorer");
278 $par = ($b[
"id"] == (int) $_GET[
"obj_id"])
284 $tpl->setContent($ns->getHTML());