75 $this->stagingPoolQuestionList->setTestObjId($this->testOBJ->getId());
76 $this->stagingPoolQuestionList->setTestId($this->testOBJ->getTestId());
87 foreach ($sourcePoolDefinitionList as $definition) {
89 $questionStage->mergeQuestionCollection($questions);
92 return $questionStage;
104 return $questionStage;
115 return $combinationCollection->getUniqueQuestionCollection();
121 $this->stagingPoolQuestionList->resetQuestionList();
123 $this->stagingPoolQuestionList->setPoolId($definition->
getPoolId());
127 $this->stagingPoolQuestionList->addTaxonomyFilter($taxId, $nodeIds);
132 $this->stagingPoolQuestionList->setLifecycleFilter($definition->
getLifecycleFilter());
137 $this->stagingPoolQuestionList->setTypeFilter($definition->
getTypeFilter());
141 $this->stagingPoolQuestionList->loadQuestions();
143 return $this->stagingPoolQuestionList->getQuestions();
150 foreach ($questionIds as $questionId) {
153 $setQuestion->setQuestionId($questionId);
154 $setQuestion->setSourcePoolDefinitionId($definition->
getId());
156 $setQuestionCollection->addQuestion($setQuestion);
159 return $setQuestionCollection;
185 foreach ($questionSet->getQuestions() as $setQuestion) {
188 $setQuestion->setSequencePosition($position++);
196 $nextId = $this->db->nextId(
'tst_test_rnd_qst');
198 $this->db->insert(
'tst_test_rnd_qst', array(
199 'test_random_question_id' => array(
'integer', $nextId),
200 'active_fi' => array(
'integer', $testSession->
getActiveId()),
201 'question_fi' => array(
'integer', $setQuestion->
getQuestionId()),
203 'pass' => array(
'integer', $testSession->
getPass()),
204 'tstamp' => array(
'integer', time()),
218 if ($this->testOBJ->getShuffleQuestions()) {
233 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerPool.php';
239 $sourcePoolDefinitionList,
240 $stagingPoolQuestionList
244 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php';
250 $sourcePoolDefinitionList,
251 $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)
getSrcPoolDefListRelatedQuestCombinationCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
__construct(ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
$sourcePoolDefinitionList
fetchQuestionsFromStageRandomly(ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
performBuild(ilTestSession $testSession)
storeQuestionSet(ilTestSession $testSession, $questionSet)
getMappedTaxonomyFilter()
get the mapped taxonomy filter conditions
storeQuestion(ilTestSession $testSession, ilTestRandomQuestionSetQuestion $setQuestion)