5 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
26 $this->node_object = null;
42 $this->parentgui = $a_parentgui;
52 return $this->parentgui;
60 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
72 $ilCtrl->redirect($this,
"showOrganization");
82 $ilCtrl->setParameter($this,
"backcmd",
$_GET[
"backcmd"]);
93 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
102 foreach($items as $k => $item)
109 foreach($todel as $k)
116 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
122 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
140 if (!is_array(
$_POST[
"id"]) || count(
$_POST[
"id"]) == 0)
145 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
149 foreach($items as $k => $item)
156 foreach($todel as $k)
162 ilUtil::sendInfo($lng->txt(
"skmg_insert_please_choose_one_type_only"),
true);
168 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
206 $ilLocator->addRepositoryItems(
$_GET[
"ref_id"]);
209 if (
$_GET[
"obj_id"] > 0)
211 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
214 for( $i = 1; $i < count(
$path); $i++)
216 switch(
$path[$i][
"type"])
219 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id",
221 $ilLocator->addItem(
$path[$i][
"title"],
222 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
223 "ilskillcategorygui"),
"", 0,
$path[$i][
"type"],
228 $ilCtrl->setParameterByClass(
"ilbasicskillgui",
"obj_id",
230 $ilLocator->addItem(
$path[$i][
"title"],
231 $ilCtrl->getLinkTargetByClass(
"ilskillmanagementgui",
232 "ilbasicskillgui"),
"", 0,
$path[$i][
"type"],
239 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
251 if (is_object($this->node_object))
253 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
255 $path = $this->node_object->skill_tree->getPathFull($this->node_object->getId());
257 foreach (
$path as $p)
259 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr")))
261 $desc.= $sep.$p[
"title"];
266 $tpl->setDescription($desc);
277 $tpl->setContent($this->form->getHTML());
289 $tpl->setContent($this->form->getHTML());
299 $values[
"title"] = $this->node_object->getTitle();
300 $values[
"order_nr"] = $this->node_object->getOrderNr();
301 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
302 $values[
"draft"] = $this->node_object->getDraft();
304 $this->form->setValuesByArray($values);
316 if ($this->form->checkInput())
321 in_array($this->getType(), array(
"sktp",
"sctp")));
326 $this->form->setValuesByPost();
327 $tpl->setContent($this->form->getHtml());
349 if ($this->form->checkInput())
357 $this->form->setValuesByPost();
358 $tpl->setContent($this->form->getHtml());
369 $ilCtrl->redirect($this,
"editProperties");
381 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
388 $ti->setRequired(
true);
389 $this->form->addItem($ti);
395 $ni->setRequired(
true);
396 $this->form->addItem($ni);
399 if ($a_mode ==
"create")
401 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
402 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
403 $this->form->setTitle($lng->txt(
"skmg_create_".$this->getType()));
407 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
408 $this->form->setTitle($lng->txt(
"skmg_edit_".$this->getType()));
412 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
413 $this->form->setFormAction($ilCtrl->getFormAction($this));
438 if (
$_GET[
"tmpmode"])
448 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int) $_GET[
"obj_id"]);
451 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
455 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
460 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
461 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
465 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
466 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
480 (
int) $_GET[
"tmpmode"]);
492 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
504 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
516 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
528 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
540 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
552 $obj_id = (is_object($this->node_object))
553 ? $this->node_object->getId()
557 $obj_id, $this->getType(),
"_b",