4 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetQuestionCollection.php';
70 foreach($sourcePoolDefinitionList as $definition)
75 $questionStage->mergeQuestionCollection($questions);
78 return $questionStage->getUniqueQuestionCollection();
86 return $questionStage;
91 $this->stagingPoolQuestionList->resetQuestionList();
93 $this->stagingPoolQuestionList->setTestObjId( $this->testOBJ->getId() );
94 $this->stagingPoolQuestionList->setTestId( $this->testOBJ->getTestId() );
95 $this->stagingPoolQuestionList->setPoolId( $definition->
getPoolId() );
99 $this->stagingPoolQuestionList->addTaxonomyFilter(
104 $this->stagingPoolQuestionList->loadQuestions();
106 return $this->stagingPoolQuestionList->getQuestions();
113 foreach($questionIds as $questionId)
117 $setQuestion->setQuestionId($questionId);
118 $setQuestion->setSourcePoolDefinitionId($definition->
getId());
120 $setQuestionCollection->addQuestion($setQuestion);
123 return $setQuestionCollection;
145 foreach($questionSet->getQuestions() as $setQuestion)
149 $setQuestion->setSequencePosition($position++);
157 $nextId = $this->db->nextId(
'tst_test_rnd_qst');
159 $this->db->insert(
'tst_test_rnd_qst', array(
160 'test_random_question_id' => array(
'integer', $nextId),
161 'active_fi' => array(
'integer', $testSession->
getActiveId()),
162 'question_fi' => array(
'integer', $setQuestion->
getQuestionId()),
164 'pass' => array(
'integer', $testSession->
getPass()),
165 'tstamp' => array(
'integer', time()),
179 if( $this->testOBJ->getShuffleQuestions() )
195 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerPool.php';
198 $db, $testOBJ, $questionSetConfig, $sourcePoolDefinitionList, $stagingPoolQuestionList
202 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php';
205 $db, $testOBJ, $questionSetConfig, $sourcePoolDefinitionList, $stagingPoolQuestionList