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->getSkillTreePath($this->node_object->getId(),
258 foreach (
$path as $p)
260 if (in_array($p[
"type"], array(
"scat",
"skll",
"sktr")))
262 $desc.= $sep.$p[
"title"];
267 $tpl->setDescription($desc);
278 $tpl->setContent($this->form->getHTML());
295 $radg->addOption($op);
309 $tpl->setContent($this->form->getHTML());
319 $values[
"title"] = $this->node_object->getTitle();
320 $values[
"order_nr"] = $this->node_object->getOrderNr();
321 $values[
"self_eval"] = $this->node_object->getSelfEvaluation();
322 $values[
"status"] = $this->node_object->getStatus();
324 $this->form->setValuesByArray($values);
336 if ($this->form->checkInput())
341 in_array($this->getType(), array(
"sktp",
"sctp")));
346 $this->form->setValuesByPost();
347 $tpl->setContent($this->form->getHtml());
369 if ($this->form->checkInput())
377 $this->form->setValuesByPost();
378 $tpl->setContent($this->form->getHtml());
389 $ilCtrl->redirect($this,
"editProperties");
401 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
408 $ti->setRequired(
true);
409 $this->form->addItem($ti);
415 $ni->setRequired(
true);
416 $this->form->addItem($ni);
419 if ($a_mode ==
"create")
421 $this->form->addCommandButton(
"save", $lng->txt(
"save"));
422 $this->form->addCommandButton(
"cancelSave", $lng->txt(
"cancel"));
423 $this->form->setTitle($lng->txt(
"skmg_create_".$this->getType()));
427 $this->form->addCommandButton(
"update", $lng->txt(
"save"));
428 $this->form->setTitle($lng->txt(
"skmg_edit_".$this->getType()));
432 $ilCtrl->setParameter($this,
"obj_id",
$_GET[
"obj_id"]);
433 $this->form->setFormAction($ilCtrl->getFormAction($this));
458 if (
$_GET[
"tmpmode"])
468 $ilCtrl->setParameterByClass(
"ilskillrootgui",
"obj_id", (
int) $_GET[
"obj_id"]);
471 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listTemplates");
475 $ilCtrl->redirectByClass(
"ilskillrootgui",
"listSkills");
480 $ilCtrl->setParameterByClass(
"ilskilltemplatecategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
481 $ilCtrl->redirectByClass(
"ilskilltemplatecategorygui",
"listItems");
485 $ilCtrl->setParameterByClass(
"ilskillcategorygui",
"obj_id", (
int) $_GET[
"obj_id"]);
486 $ilCtrl->redirectByClass(
"ilskillcategorygui",
"listItems");
500 (
int) $_GET[
"tmpmode"]);
512 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
524 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
536 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
548 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
560 include_once(
"./Services/Skill/classes/class.ilSkillTreeNode.php");
572 $obj_id = (is_object($this->node_object))
573 ? $this->node_object->getId()
577 $obj_id, $this->getType(),
"",
595 $a_tabs->addTab(
"usage",
596 $lng->txt(
"skmg_usage"),
597 $ilCtrl->getLinkTarget($this,
"showUsage"));
608 $this->setTabs(
"usage");
610 include_once(
"./Services/Skill/classes/class.ilSkillUsage.php");
612 $base_skill_id = ($this->base_skill_id > 0)
613 ? $this->base_skill_id
614 : $this->node_object->getId();
615 $usages = $usage_info->getAllUsagesInfoOfSubtree($base_skill_id.
":".$this->tref_id);
618 include_once(
"./Services/Skill/classes/class.ilSkillUsageTableGUI.php");
619 foreach ($usages as $k => $usage)
622 $html.=
$tab->getHTML().
"<br/><br/>";
625 $tpl->setContent($html);