ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestRandomQuestionSetBuilderWithAmountPerTest Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetBuilderWithAmountPerTest:
+ Collaboration diagram for ilTestRandomQuestionSetBuilderWithAmountPerTest:

Public Member Functions

 checkBuildable ()
 
 performBuild (ilTestSession $testSession)
 
- Public Member Functions inherited from ilTestRandomQuestionSetBuilder
 checkBuildable ()
 
 performBuild (ilTestSession $testSession)
 
 getSrcPoolDefRelatedQuestCollection (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 
 getSrcPoolDefListRelatedQuestUniqueCollection (ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
 
 getCheckMessages ()
 
- Public Member Functions inherited from ilTestRandomSourcePoolDefinitionQuestionCollectionProvider
 getSrcPoolDefListRelatedQuestCombinationCollection (ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTestRandomQuestionSetBuilder
static getInstance (ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
 
- Protected Member Functions inherited from ilTestRandomQuestionSetBuilder
 __construct (ilDBInterface $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
 
 storeQuestionSet (ilTestSession $testSession, $questionSet)
 
 fetchQuestionsFromStageRandomly (ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
 
 handleQuestionOrdering (ilTestRandomQuestionSetQuestionCollection $questionSet)
 
- Protected Attributes inherited from ilTestRandomQuestionSetBuilder
 $db = null
 
 $testOBJ = null
 
 $questionSetConfig = null
 
 $sourcePoolDefinitionList = null
 
 $stagingPoolQuestionList = null
 
 $checkMessages = array()
 

Detailed Description

Member Function Documentation

◆ checkBuildable()

ilTestRandomQuestionSetBuilderWithAmountPerTest::checkBuildable ( )
Returns
bool

Definition at line 17 of file class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php.

References ilTestRandomQuestionSetBuilder\getSrcPoolDefListRelatedQuestUniqueCollection().

18  {
19  $questionStage = $this->getSrcPoolDefListRelatedQuestUniqueCollection($this->sourcePoolDefinitionList);
20 
21  if ($questionStage->isSmallerThan($this->questionSetConfig->getQuestionAmountPerTest())) {
22  return false;
23  }
24 
25  return true;
26  }
getSrcPoolDefListRelatedQuestUniqueCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
+ Here is the call graph for this function:

◆ performBuild()

ilTestRandomQuestionSetBuilderWithAmountPerTest::performBuild ( ilTestSession  $testSession)
Parameters
ilTestSession$testSession

Definition at line 31 of file class.ilTestRandomQuestionSetBuilderWithAmountPerTest.php.

References ilTestRandomQuestionSetBuilder\fetchQuestionsFromStageRandomly(), ilTestRandomQuestionSetBuilder\getSrcPoolDefListRelatedQuestUniqueCollection(), ilTestRandomQuestionSetBuilder\handleQuestionOrdering(), and ilTestRandomQuestionSetBuilder\storeQuestionSet().

32  {
33  $questionStage = $this->getSrcPoolDefListRelatedQuestUniqueCollection($this->sourcePoolDefinitionList);
34 
35  $questionSet = $this->fetchQuestionsFromStageRandomly(
36  $questionStage,
37  $this->questionSetConfig->getQuestionAmountPerTest()
38  );
39 
40  $this->handleQuestionOrdering($questionSet);
41 
42  $this->storeQuestionSet($testSession, $questionSet);
43  }
getSrcPoolDefListRelatedQuestUniqueCollection(ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList)
handleQuestionOrdering(ilTestRandomQuestionSetQuestionCollection $questionSet)
fetchQuestionsFromStageRandomly(ilTestRandomQuestionSetQuestionCollection $questionStage, $requiredQuestionAmount)
storeQuestionSet(ilTestSession $testSession, $questionSet)
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: