4 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetQuestionCollection.php';
5 require_once
'Modules/Test/interfaces/interface.ilTestRandomSourcePoolDefinitionQuestionCollectionProvider.php';
75 foreach ($sourcePoolDefinitionList as $definition) {
81 $questionStage->mergeQuestionCollection($questions);
84 return $questionStage;
98 return $questionStage;
109 return $combinationCollection->getUniqueQuestionCollection();
115 $this->stagingPoolQuestionList->resetQuestionList();
117 $this->stagingPoolQuestionList->setTestObjId($this->testOBJ->getId());
118 $this->stagingPoolQuestionList->setTestId($this->testOBJ->getTestId());
119 $this->stagingPoolQuestionList->setPoolId($definition->
getPoolId());
124 $this->stagingPoolQuestionList->addTaxonomyFilter($taxId, $nodeIds);
126 #$this->stagingPoolQuestionList->addTaxonomyFilter( 127 # $definition->getMappedFilterTaxId(), array($definition->getMappedFilterTaxNodeId()) 134 $this->stagingPoolQuestionList->setTypeFilter($definition->
getTypeFilter());
138 $this->stagingPoolQuestionList->loadQuestions();
140 return $this->stagingPoolQuestionList->getQuestions();
147 foreach ($questionIds as $questionId) {
150 $setQuestion->setQuestionId($questionId);
151 $setQuestion->setSourcePoolDefinitionId($definition->
getId());
153 $setQuestionCollection->addQuestion($setQuestion);
156 return $setQuestionCollection;
165 #if( !(int)$definition->getMappedFilterTaxId() ) 170 #if( !(int)$definition->getMappedFilterTaxNodeId() ) 193 foreach ($questionSet->getQuestions() as $setQuestion) {
196 $setQuestion->setSequencePosition($position++);
204 $nextId = $this->db->nextId(
'tst_test_rnd_qst');
206 $this->db->insert(
'tst_test_rnd_qst',
array(
207 'test_random_question_id' =>
array(
'integer', $nextId),
226 if ($this->testOBJ->getShuffleQuestions()) {
241 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerPool.php';
247 $sourcePoolDefinitionList,
248 $stagingPoolQuestionList
252 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php';
258 $sourcePoolDefinitionList,
259 $stagingPoolQuestionList
getSrcPoolDefListRelatedQuestUniqueCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
isQuestionAmountConfigurationModePerPool()
getSourcePoolDefinitionId()
handleQuestionOrdering(ilTestRandomQuestionSetQuestionCollection $questionSet)
buildSetQuestionCollection(ilTestRandomQuestionSetSourcePoolDefinition $definition, $questionIds)
getRandomQuestionCollection($requiredAmount)
getQuestionIdsForSourcePoolDefinitionIds(ilTestRandomQuestionSetSourcePoolDefinition $definition)
hasTypeFilter(ilTestRandomQuestionSetSourcePoolDefinition $definition)
static getInstance(ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
getSrcPoolDefRelatedQuestCollection(ilTestRandomQuestionSetSourcePoolDefinition $definition)
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.
getSrcPoolDefListRelatedQuestCombinationCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
storeQuestionSet(ilTestSession $testSession, $questionSet)
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
storeQuestion(ilTestSession $testSession, ilTestRandomQuestionSetQuestion $setQuestion)