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()) 133 $this->stagingPoolQuestionList->setLifecycleFilter($definition->
getLifecycleFilter());
138 $this->stagingPoolQuestionList->setTypeFilter($definition->
getTypeFilter());
142 $this->stagingPoolQuestionList->loadQuestions();
144 return $this->stagingPoolQuestionList->getQuestions();
151 foreach ($questionIds as $questionId) {
154 $setQuestion->setQuestionId($questionId);
155 $setQuestion->setSourcePoolDefinitionId($definition->
getId());
157 $setQuestionCollection->addQuestion($setQuestion);
160 return $setQuestionCollection;
169 #if( !(int)$definition->getMappedFilterTaxId() ) 174 #if( !(int)$definition->getMappedFilterTaxNodeId() ) 197 foreach ($questionSet->getQuestions() as $setQuestion) {
200 $setQuestion->setSequencePosition($position++);
208 $nextId = $this->db->nextId(
'tst_test_rnd_qst');
210 $this->db->insert(
'tst_test_rnd_qst', array(
211 'test_random_question_id' => array(
'integer', $nextId),
212 'active_fi' => array(
'integer', $testSession->
getActiveId()),
213 'question_fi' => array(
'integer', $setQuestion->
getQuestionId()),
215 'pass' => array(
'integer', $testSession->
getPass()),
216 'tstamp' => array(
'integer', time()),
230 if ($this->testOBJ->getShuffleQuestions()) {
245 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerPool.php';
251 $sourcePoolDefinitionList,
252 $stagingPoolQuestionList
256 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php';
262 $sourcePoolDefinitionList,
263 $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)
__construct(ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
$sourcePoolDefinitionList
fetchQuestionsFromStageRandomly(ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
performBuild(ilTestSession $testSession)
getSrcPoolDefListRelatedQuestCombinationCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
storeQuestionSet(ilTestSession $testSession, $questionSet)
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
storeQuestion(ilTestSession $testSession, ilTestRandomQuestionSetQuestion $setQuestion)