public function copyQuestionsToPoolObject($returnResult = false) { //var_dump($_REQUEST); include_once 'Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php'; $qpool = new ilObjQuestionPool($_REQUEST['sel_qpl'], true); $qpool->setOnline(ilObjQuestionPool::_lookupOnline($_REQUEST['sel_qpl'], true)); $newIds = array(); foreach ($_REQUEST['q_id'] as $q_id) { $newId = $qpool->copyQuestion($q_id, $qpool->getId()); $newIds[$q_id] = $newId; } $result = new stdClass(); $result->ids = $newIds; $result->qpool = $qpool; if ($returnResult) { return $result; } else { $this->backObject(); } }