4 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php';
16 $questionStage = $this->getQuestionStageForSourcePoolDefinitionList($this->sourcePoolDefinitionList);
22 $requiredAmount = $this->getRequiredQuestionAmountForDefinitionList($sourcePoolDefinitionList);
23 $possibleAmount = count($questionStage);
25 return ( $possibleAmount >= $requiredAmount );
30 $questionSet = array();
32 foreach($this->sourcePoolDefinitionList as $definition)
36 $requiredQuestionAmount = $definition->getQuestionAmount();
41 $potentialQuestionStage, $questionSet
50 $questions = $actualQuestionStage;
56 $requiredQuestionAmount = self::getRequiredQuestionAmountForDefinitionList($this->sourcePoolDefinitionList);
61 $questionStage = $this->getQuestionStageForSourcePoolDefinitionList($this->sourcePoolDefinitionList);
74 $uniqueQuestionCollection = array_diff($potentialQuestionCollection, $otherQuestionCollection);
75 return $uniqueQuestionCollection;
80 return count($questionCollection) > $requiredAmount;
85 return count($questionCollection) < $requiredAmount;
90 return array_merge($questionSet, $questions);
95 return ( $requiredQuestionAmount - count($questionSet) );
100 $requiredQuestionAmountPerTest = 0;
102 foreach($sourcePoolDefinitionList as $definition)
105 $requiredQuestionAmountPerTest += $definition->getQuestionAmount();
108 return $requiredQuestionAmountPerTest;