/** * Save questionpool properties */ function savePropertiesObject() { $qpl_online = $_POST["online"]; if (strlen($qpl_online) == 0) { $qpl_online = "0"; } $this->object->setOnline($qpl_online); $this->object->saveToDb(); ilUtil::sendSuccess($this->lng->txt("saved_successfully"), true); $this->ctrl->redirect($this, "properties"); }
/** * Creates a new questionpool and returns the reference id * * Creates a new questionpool and returns the reference id * * @return integer Reference id of the newly created questionpool * @access public */ function createQuestionPool($name = "Dummy") { global $tree; $parent_ref = $tree->getParentId($_GET["ref_id"]); include_once "./Modules/TestQuestionPool/classes/class.ilObjQuestionPool.php"; $qpl = new ilObjQuestionPool(); $qpl->setType("qpl"); $qpl->setTitle($name); $qpl->setDescription(""); $qpl->create(); $qpl->createReference(); $qpl->putInTree($parent_ref); $qpl->setPermissions($parent_ref); $qpl->setOnline(1); // must be online to be available $qpl->saveToDb(); return $qpl->getRefId(); }