ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilTestPlayerFactory Class Reference
+ Collaboration diagram for ilTestPlayerFactory:

Public Member Functions

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

Private Attributes

 $testOBJ = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestPlayerFactory::__construct ( ilObjTest  $testOBJ)

constructor

Parameters
ilObjTest$testOBJ

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

References $testOBJ.

27  {
28  $this->testOBJ = $testOBJ;
29  }

Member Function Documentation

◆ getPlayerGUI()

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.

38  {
39  switch ($this->testOBJ->getQuestionSetType()) {
41 
42  require_once 'Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php';
43  return new ilTestPlayerFixedQuestionSetGUI($this->testOBJ);
44 
46 
47  require_once 'Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php';
48  return new ilTestPlayerRandomQuestionSetGUI($this->testOBJ);
49 
51 
52  require_once 'Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php';
53  return new ilTestPlayerDynamicQuestionSetGUI($this->testOBJ);
54  }
55  }
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
const QUESTION_SET_TYPE_DYNAMIC
type setting value for dynamic question set (continues testing mode)

Field Documentation

◆ $testOBJ

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: