/** * Copy items to clipboard, then cut them from the current tree */ function cutItems() { global $ilCtrl, $lng; include_once "./Services/Skill/classes/class.ilSkillTreeNode.php"; if (!is_array($_POST["id"]) || count($_POST["id"]) == 0) { $this->redirectToParent(); } $items = ilUtil::stripSlashesArray($_POST["id"]); $todel = array(); // delete IDs < 0 (needed for non-js editing) foreach ($items as $k => $item) { if ($item < 0) { $todel[] = $k; } } foreach ($todel as $k) { unset($items[$k]); } if (!ilSkillTreeNode::uniqueTypesCheck($items)) { ilUtil::sendInfo($lng->txt("skmg_insert_please_choose_one_type_only"), true); $this->redirectToParent(); } ilSkillTreeNode::clipboardCut(1, $items); include_once "./Modules/LearningModule/classes/class.ilEditClipboard.php"; ilEditClipboard::setAction("cut"); ilUtil::sendInfo($lng->txt("skmg_selected_items_have_been_cut"), true); ilSkillTreeNode::saveChildsOrder((int) $_GET["obj_id"], array(), $_GET["tmpmode"]); $this->redirectToParent(); }