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())
101 return $roles ? $roles : array();
117 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
157 if ($a_node_id==
$_GET[
"ref_id"])
159 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
160 $parent_type = $parent_obj->getType();
161 if($parent_type == $this->
getType())
163 $a_node_id = (int) $tree->getParentId($a_node_id);
167 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
180 include_once(
"./Services/Skill/classes/class.ilSkillTree.php");
183 include_once(
"./Services/Skill/classes/class.ilSkillTreeNodeFactory.php");
190 $target_parent = $tree->getParentId(
$target_id);
193 if ($source_obj->getType() ==
"skll")
195 if ($tree->isInTree($source_obj->getId()))
197 $node_data = $tree->getNodeData($source_obj->getId());
200 if ($movecopy ==
"move")
202 $parent_id = $tree->getParentId($source_obj->getId());
203 $tree->deleteTree($node_data);
208 if(!$tree->isInTree($source_obj->getId()))
215 else if ($as_subitem)
219 $childs = $tree->getChildsByType($parent, array(
"skll",
"scat"));
220 if (count($childs) != 0)
222 $target_pos = $childs[count($childs) - 1][
"obj_id"];
228 $parent = $target_parent;
231 $tree->insertNode($source_obj->getId(),
232 $parent, $target_pos);
238 if ($source_obj->getType() ==
"scat")
240 $source_node = $tree->getNodeData($source_id);
241 $subnodes = $tree->getSubtree($source_node);
244 foreach ($subnodes as $subnode)
259 else if ($as_subitem)
263 $childs = $tree->getChilds($target_parent);
264 if (count($childs) != 0)
266 $target_pos = $childs[count($childs) - 1][
"obj_id"];
271 if ($movecopy ==
"move")
273 $tree->deleteTree($source_node);
276 if (!$tree->isInTree($source_id))
278 $tree->insertNode($source_id, $target_parent, $target_pos);
281 if ($movecopy ==
"move")
283 foreach ($subnodes as $node)
285 if($node[
"obj_id"] != $source_id)
287 $tree->insertNode($node[
"obj_id"], $node[
"parent"]);