protected function createQuestionPool($name = "dummy") { global $tree; $parent_ref = $tree->getParentId($this->object->getRefId()); include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php"; $qpl = new ilObjSurveyQuestionPool(); $qpl->setType("spl"); $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(); }