ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilTestRandomQuestionSetBuilderWithAmountPerTest Class Reference
+ Inheritance diagram for ilTestRandomQuestionSetBuilderWithAmountPerTest:
+ Collaboration diagram for ilTestRandomQuestionSetBuilderWithAmountPerTest:

Public Member Functions

 checkBuildable ()
 performBuild (ilTestSession $testSession)

Additional Inherited Members

- Static Public Member Functions inherited from ilTestRandomQuestionSetBuilder
static getInstance (ilDB $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
- Protected Member Functions inherited from ilTestRandomQuestionSetBuilder
 __construct (ilDB $db, ilObjTest $testOBJ, ilTestRandomQuestionSetConfig $questionSetConfig, ilTestRandomQuestionSetSourcePoolDefinitionList $sourcePoolDefinitionList, ilTestRandomQuestionSetStagingPoolQuestionList $stagingPoolQuestionList)
 getQuestionStageForSourcePoolDefinition (ilTestRandomQuestionSetSourcePoolDefinition $definition)
 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

Detailed Description

Member Function Documentation

ilTestRandomQuestionSetBuilderWithAmountPerTest::checkBuildable ( )

Reimplemented from ilTestRandomQuestionSetBuilder.

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

{
$questionStage = $this->getQuestionStageForSourcePoolDefinitionList($this->sourcePoolDefinitionList);
if( $questionStage->isSmallerThan($this->questionSetConfig->getQuestionAmountPerTest()) )
{
return false;
}
return true;
}
ilTestRandomQuestionSetBuilderWithAmountPerTest::performBuild ( ilTestSession  $testSession)

Reimplemented from ilTestRandomQuestionSetBuilder.

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

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

{
$questionStage = $this->getQuestionStageForSourcePoolDefinitionList($this->sourcePoolDefinitionList);
$questionSet = $this->fetchQuestionsFromStageRandomly(
$questionStage, $this->questionSetConfig->getQuestionAmountPerTest()
);
$this->handleQuestionOrdering($questionSet);
$this->storeQuestionSet($testSession, $questionSet);
}

+ Here is the call graph for this function:


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