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

Public Member Functions

 __construct (ilObjTest $testOBJ)
 constructor
 getPlayerGUI ()
 creates and returns an instance of a player gui that corresponds to the current test mode

Private Attributes

 $testOBJ = null

Detailed Description

Definition at line 12 of file class.ilTestPlayerFactory.php.

Constructor & Destructor Documentation

ilTestPlayerFactory::__construct ( ilObjTest  $testOBJ)

constructor

Parameters
ilObjTest$testOBJ

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

References $testOBJ.

{
$this->testOBJ = $testOBJ;
}

Member Function Documentation

ilTestPlayerFactory::getPlayerGUI ( )

creates and returns an instance of a player gui that corresponds to the current test mode

Returns
ilTestPlayerAbstractGUI

Definition at line 37 of file class.ilTestPlayerFactory.php.

References ilObjTest\QUESTION_SET_TYPE_DYNAMIC, ilObjTest\QUESTION_SET_TYPE_FIXED, and ilObjTest\QUESTION_SET_TYPE_RANDOM.

{
switch( $this->testOBJ->getQuestionSetType() )
{
require_once 'Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php';
return new ilTestPlayerFixedQuestionSetGUI($this->testOBJ);
require_once 'Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php';
return new ilTestPlayerRandomQuestionSetGUI($this->testOBJ);
require_once 'Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php';
return new ilTestPlayerDynamicQuestionSetGUI($this->testOBJ);
}
}

Field Documentation

ilTestPlayerFactory::$testOBJ = null
private

Definition at line 19 of file class.ilTestPlayerFactory.php.

Referenced by __construct().


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