protected function generateRandomTestPassForActiveUser() { global $tree, $ilDB, $ilPluginAdmin; require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetConfig.php'; $questionSetConfig = new ilTestRandomQuestionSetConfig($tree, $ilDB, $ilPluginAdmin, $this->object); $questionSetConfig->loadFromDb(); require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php'; $sourcePoolDefinitionFactory = new ilTestRandomQuestionSetSourcePoolDefinitionFactory($ilDB, $this->object); require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php'; $sourcePoolDefinitionList = new ilTestRandomQuestionSetSourcePoolDefinitionList($ilDB, $this->object, $sourcePoolDefinitionFactory); $sourcePoolDefinitionList->loadDefinitions(); $this->processLocker->requestRandomPassBuildLock($sourcePoolDefinitionList->hasTaxonomyFilters()); if (!$this->performTearsAndAngerBrokenConfessionChecks()) { require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolQuestionList.php'; $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($ilDB, $ilPluginAdmin); require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php'; $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance($ilDB, $this->object, $questionSetConfig, $sourcePoolDefinitionList, $stagingPoolQuestionList); $questionSetBuilder->performBuild($this->testSession); } $this->processLocker->releaseRandomPassBuildLock(); }
public function isQuestionSetBuildable() { $sourcePoolDefinitionList = $this->buildSourcePoolDefinitionList(); $sourcePoolDefinitionList->loadDefinitions(); require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetStagingPoolQuestionList.php'; $stagingPoolQuestionList = new ilTestRandomQuestionSetStagingPoolQuestionList($this->db, $this->pluginAdmin); require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php'; $questionSetBuilder = ilTestRandomQuestionSetBuilder::getInstance($this->db, $this->testOBJ, $this, $sourcePoolDefinitionList, $stagingPoolQuestionList); return $questionSetBuilder->checkBuildable(); }