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),
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
getMappedFilterTaxNodeId()
getQuestionStageForSourcePoolDefinition(ilTestRandomQuestionSetSourcePoolDefinition $definition)
isQuestionAmountConfigurationModePerPool()
getSourcePoolDefinitionId()
handleQuestionOrdering(ilTestRandomQuestionSetQuestionCollection $questionSet)
buildSetQuestionCollection(ilTestRandomQuestionSetSourcePoolDefinition $definition, $questionIds)
getRandomQuestionCollection($requiredAmount)
getQuestionIdsForSourcePoolDefinitionIds(ilTestRandomQuestionSetSourcePoolDefinition $definition)
static getInstance(ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
hasTaxonomyFilter(ilTestRandomQuestionSetSourcePoolDefinition $definition)
Create styles array
The data for the language used.
__construct(ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
$sourcePoolDefinitionList
fetchQuestionsFromStageRandomly(ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
performBuild(ilTestSession $testSession)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
storeQuestionSet(ilTestSession $testSession, $questionSet)
storeQuestion(ilTestSession $testSession, ilTestRandomQuestionSetQuestion $setQuestion)