/** * Copy items to clipboard, then cut them from the current tree */ function cutItems($a_return = "chapters") { global $ilCtrl, $lng; $items = ilUtil::stripSlashesArray($_POST["id"]); if (!is_array($items)) { ilUtil::sendFailure($lng->txt("no_checkbox"), true); $ilCtrl->redirect($this, $a_return); } $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]); } ilLMObject::clipboardCut($this->object->getId(), $items); ilEditClipboard::setAction("cut"); ilUtil::sendInfo($lng->txt("cont_selected_items_have_been_cut"), true); $ilCtrl->redirect($this, $a_return); }