/**
  * Save order
  */
 function saveOrder()
 {
     global $ilCtrl, $lng;
     ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], $_POST["order"], (int) $_GET["tmpmode"]);
     ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
     $this->redirectToParent((int) $_GET["tmpmode"]);
 }
 /**
  * Insert basic skills from clipboard
  */
 static function insertItemsFromClip($a_type, $a_obj_id)
 {
     global $ilCtrl, $ilUser;
     // @todo: move this to a service since it can be used here, too
     include_once "./Modules/LearningModule/classes/class.ilEditClipboard.php";
     include_once "./Services/Skill/classes/class.ilSkillTree.php";
     $tree = new ilSkillTree();
     $parent_id = $a_obj_id;
     $target = IL_LAST_NODE;
     // cut and paste
     $skills = $ilUser->getClipboardObjects($a_type);
     // this will get all skills _regardless_ of level
     $copied_nodes = array();
     foreach ($skills as $skill) {
         // if skill was already copied as part of tree - do not copy it again
         if (!in_array($skill["id"], array_keys($copied_nodes))) {
             $cid = ilSkillTreeNode::pasteTree($skill["id"], $parent_id, $target, $skill["insert_time"], $copied_nodes, ilEditClipboard::getAction() == "copy", true);
             //				$target = $cid;
         }
     }
     //		if (ilEditClipboard::getAction() == "cut")
     //		{
     self::clearClipboard();
     //		}
     ilSkillTreeNode::saveChildsOrder($a_obj_id, array(), in_array($a_type, array("sktp", "sctp")));
     return $copied_nodes;
 }