66 $questionStage = array();
68 foreach($sourcePoolDefinitionList as $definition)
73 $questionStage = array_merge($questionStage, $questions);
76 return array_unique($questionStage);
81 $this->stagingPoolQuestionList->resetQuestionList();
83 $this->stagingPoolQuestionList->setTestObjId( $this->testOBJ->getId() );
84 $this->stagingPoolQuestionList->setTestId( $this->testOBJ->getTestId() );
85 $this->stagingPoolQuestionList->setPoolId( $definition->
getPoolId() );
89 $this->stagingPoolQuestionList->addTaxonomyFilter(
94 $this->stagingPoolQuestionList->loadQuestions();
96 return $this->stagingPoolQuestionList->getQuestions();
116 foreach($questionSet as $sequencePosition => $questionId)
118 $this->
storeQuestion($testSession, $questionId, $sequencePosition);
124 $nextId = $this->db->nextId(
'tst_test_rnd_qst');
126 $this->db->insert(
'tst_test_rnd_qst', array(
127 'test_random_question_id' => array(
'integer', $nextId),
128 'active_fi' => array(
'integer', $testSession->
getActiveId()),
129 'question_fi' => array(
'integer', $questionId),
130 'sequence' => array(
'integer', $sequencePosition),
131 'pass' => array(
'integer', $testSession->
getPass()),
132 'tstamp' => array(
'integer', time())
140 $questionSet = array();
142 foreach($randomKeys as $randomKey)
144 $questionSet[] = $questionStage[$randomKey];
159 return array_rand($array, $numKeys);
162 return array( array_rand($array, $numKeys) );
167 if( $this->testOBJ->getShuffleQuestions() )
169 shuffle($questionSet);
185 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerPool.php';
188 $db, $testOBJ, $questionSetConfig, $sourcePoolDefinitionList, $stagingPoolQuestionList
192 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php';
195 $db, $testOBJ, $questionSetConfig, $sourcePoolDefinitionList, $stagingPoolQuestionList