4 require_once
'Modules/Test/classes/class.ilTestRandomQuestionSetBuilder.php';
18 public function checkBuildableNewer()
24 require_once
'Modules/Test/classes/class.ilTestRandomQuestionsQuantitiesDistribution.php';
26 $quantitiesDistribution->setSourcePoolDefinitionList($this->sourcePoolDefinitionList);
27 $quantitiesDistribution->initialise();
33 foreach ($this->sourcePoolDefinitionList as $definition) {
36 $quantityCalculation = $quantitiesDistribution->calculateQuantities($definition);
38 if ($quantityCalculation->isRequiredAmountGuaranteedAvailable()) {
44 $this->checkMessages[] = $quantityCalculation->getDistributionReport(
$lng);
57 return $this->checkBuildableNewer();
62 if ($questionStage->isSmallerThan($this->sourcePoolDefinitionList->getQuestionAmount())) {
73 foreach ($this->sourcePoolDefinitionList as $definition) {
76 $requiredQuestionAmount = $definition->getQuestionAmount();
80 $actualQuestionStage = $potentialQuestionStage->getRelativeComplementCollection($questionSet);
82 if ($actualQuestionStage->isGreaterThan($requiredQuestionAmount)) {
86 if ($actualQuestionStage->isSmallerThan($requiredQuestionAmount)) {
89 require_once(
"./Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php");
91 $translator->loadLabels($this->sourcePoolDefinitionList);
93 $ilLog->write(
"RANDOM TEST: missing questions for: " 94 . implode(
" - ",
array($definition->getPoolTitle(),
$translator->getTaxonomyFilterLabel($definition->getMappedTaxonomyFilter()))));
97 $questions = $actualQuestionStage;
100 $questionSet->mergeQuestionCollection($questions);
103 $requiredQuestionAmount = $this->sourcePoolDefinitionList->getQuestionAmount();
105 if ($questionSet->isSmallerThan($requiredQuestionAmount)) {
106 $missingQuestionCount = $questionSet->getMissingCount($requiredQuestionAmount);
109 $actualQuestionStage = $potentialQuestionStage->getRelativeComplementCollection($questionSet);
112 $questionSet->mergeQuestionCollection($questions);
getSrcPoolDefListRelatedQuestUniqueCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
handleQuestionOrdering(ilTestRandomQuestionSetQuestionCollection $questionSet)
getSrcPoolDefRelatedQuestCollection(ilTestRandomQuestionSetSourcePoolDefinition $definition)
Create styles array
The data for the language used.
fetchQuestionsFromStageRandomly(ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
performBuild(ilTestSession $testSession)
storeQuestionSet(ilTestSession $testSession, $questionSet)