/** * creates and returns an instance of a test question set config * that corresponds to the passed question set type (test mode) * * @return ilTestQuestionSetConfig */ public function getQuestionSetConfigByType($questionSetType) { if ($this->testQuestionSetConfig === null) { switch ($questionSetType) { case ilObjTest::QUESTION_SET_TYPE_FIXED: require_once 'Modules/Test/classes/class.ilTestFixedQuestionSetConfig.php'; $this->testQuestionSetConfig = new ilTestFixedQuestionSetConfig($this->tree, $this->db, $this->pluginAdmin, $this->testOBJ); break; case ilObjTest::QUESTION_SET_TYPE_RANDOM: require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetConfig.php'; $this->testQuestionSetConfig = new ilTestRandomQuestionSetConfig($this->tree, $this->db, $this->pluginAdmin, $this->testOBJ); break; case ilObjTest::QUESTION_SET_TYPE_DYNAMIC: require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php'; $this->testQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig($this->tree, $this->db, $this->pluginAdmin, $this->testOBJ); break; } $this->testQuestionSetConfig->loadFromDb(); } return $this->testQuestionSetConfig; }