/** * creates and returns an instance of a test sequence * that corresponds to the current test mode and given pass * * @param ilTestSession|ilTestSessionDynamicQuestionSet $testSession * @param integer $pass * @return ilTestSequence|ilTestSequenceDynamicQuestionSet */ public function getSequenceByPass($testSession, $pass) { if ($this->testSequence === null) { switch ($this->testOBJ->getQuestionSetType()) { case ilObjTest::QUESTION_SET_TYPE_FIXED: require_once 'Modules/Test/classes/class.ilTestSequenceFixedQuestionSet.php'; $this->testSequence = new ilTestSequenceFixedQuestionSet($testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()); break; case ilObjTest::QUESTION_SET_TYPE_RANDOM: require_once 'Modules/Test/classes/class.ilTestSequenceRandomQuestionSet.php'; $this->testSequence = new ilTestSequenceRandomQuestionSet($testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()); break; case ilObjTest::QUESTION_SET_TYPE_DYNAMIC: require_once 'Modules/Test/classes/class.ilTestSequenceDynamicQuestionSet.php'; require_once 'Modules/Test/classes/class.ilTestDynamicQuestionSet.php'; $questionSet = new ilTestDynamicQuestionSet($this->db, $this->lng, $this->pluginAdmin, $this->testOBJ); $this->testSequence = new ilTestSequenceDynamicQuestionSet($this->db, $questionSet, $testSession->getActiveId()); #$this->testSequence->setPreventCheckedQuestionsFromComingUpEnabled( # $this->testOBJ->isInstantFeedbackAnswerFixationEnabled() #); // checked questions now has to come up any time, so they can be set to unchecked right at this moment break; } } return $this->testSequence; }
/** * @return string */ private function getPassDeletionTarget() { require_once 'Modules/Test/classes/confirmations/class.ilTestPassDeletionConfirmationGUI.php'; $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'context', ilTestPassDeletionConfirmationGUI::CONTEXT_DYN_TEST_PLAYER); $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'active_id', $this->testSession->getActiveId()); $this->ctrl->setParameterByClass('ilTestEvaluationGUI', 'pass', $this->testSession->getPass()); return $this->ctrl->getLinkTargetByClass('ilTestEvaluationGUI', 'confirmDeletePass'); }
/** * creates and returns an instance of a test sequence * that corresponds to the current test mode and given pass * * @param ilTestSession|ilTestSessionDynamicQuestionSet $testSession * @param integer $pass * @return ilTestSequence|ilTestSequenceDynamicQuestionSet */ public function getSequenceByPass($testSession, $pass) { if ($this->testSequence === null) { switch ($this->testOBJ->getQuestionSetType()) { case ilObjTest::QUESTION_SET_TYPE_FIXED: require_once 'Modules/Test/classes/class.ilTestSequence.php'; $this->testSequence = new ilTestSequence($testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()); break; case ilObjTest::QUESTION_SET_TYPE_RANDOM: require_once 'Modules/Test/classes/class.ilTestSequenceRandomQuestionSet.php'; $this->testSequence = new ilTestSequenceRandomQuestionSet($testSession->getActiveId(), $pass, $this->testOBJ->isRandomTest()); break; case ilObjTest::QUESTION_SET_TYPE_DYNAMIC: require_once 'Modules/Test/classes/class.ilTestSequenceDynamicQuestionSet.php'; require_once 'Modules/Test/classes/class.ilTestDynamicQuestionSet.php'; $questionSet = new ilTestDynamicQuestionSet($this->db, $this->lng, $this->pluginAdmin, $this->testOBJ); $this->testSequence = new ilTestSequenceDynamicQuestionSet($this->db, $questionSet, $testSession->getActiveId()); break; } } return $this->testSequence; }
/** * creates and returns an instance of a test sequence * that corresponds to the current test mode and the pass stored in test session * * @param ilTestSession|ilTestSessionDynamicQuestionSet $testSession * @return ilTestSequence|ilTestSequenceDynamicQuestionSet */ public function getSequenceByTestSession($testSession) { return $this->getSequenceByActiveIdAndPass($testSession->getActiveId(), $testSession->getPass()); }