5 require_once
"./Services/Object/classes/class.ilObject.php";
27 $this->
ilObject($a_id,$a_call_by_reference);
40 if (!parent::update())
68 if (!parent::delete())
92 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
132 if ($a_node_id==
$_GET[
"ref_id"])
134 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
135 $parent_type = $parent_obj->getType();
136 if($parent_type == $this->
getType())
138 $a_node_id = (int) $tree->getParentId($a_node_id);
142 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
155 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
158 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
165 $target_parent = $tree->getParentId(
$target_id);
168 if ($source_obj->getType() ==
"skll")
170 if ($tree->isInTree($source_obj->getId()))
172 $node_data = $tree->getNodeData($source_obj->getId());
175 if ($movecopy ==
"move")
177 $parent_id = $tree->getParentId($source_obj->getId());
178 $tree->deleteTree($node_data);
183 if(!$tree->isInTree($source_obj->getId()))
190 else if ($as_subitem)
194 $childs = $tree->getChildsByType($parent, array(
"skll",
"scat"));
195 if (count($childs) != 0)
197 $target_pos = $childs[count($childs) - 1][
"obj_id"];
203 $parent = $target_parent;
206 $tree->insertNode($source_obj->getId(),
207 $parent, $target_pos);
213 if ($source_obj->getType() ==
"scat")
215 $source_node = $tree->getNodeData($source_id);
216 $subnodes = $tree->getSubtree($source_node);
219 foreach ($subnodes as $subnode)
234 else if ($as_subitem)
238 $childs = $tree->getChilds($target_parent);
239 if (count($childs) != 0)
241 $target_pos = $childs[count($childs) - 1][
"obj_id"];
246 if ($movecopy ==
"move")
248 $tree->deleteTree($source_node);
251 if (!$tree->isInTree($source_id))
253 $tree->insertNode($source_id, $target_parent, $target_pos);
256 if ($movecopy ==
"move")
258 foreach ($subnodes as $node)
260 if($node[
"obj_id"] != $source_id)
262 $tree->insertNode($node[
"obj_id"], $node[
"parent"]);