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

Public Member Functions

 __construct (ilTree $tree, ilDB $db, ilPluginAdmin $pluginAdmin, ilObjTest $testOBJ)
 constructor
 getQuestionSetConfig ()
 creates and returns an instance of a test question set config that corresponds to the test's current question set type (test mode)
 getQuestionSetConfigByType ($questionSetType)
 creates and returns an instance of a test question set config that corresponds to the passed question set type (test mode)

Private Attributes

 $testQuestionSetConfig = null
 $tree = null
 $db = null
 $pluginAdmin = null
 $testOBJ = null

Detailed Description

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

Constructor & Destructor Documentation

ilTestQuestionSetConfigFactory::__construct ( ilTree  $tree,
ilDB  $db,
ilPluginAdmin  $pluginAdmin,
ilObjTest  $testOBJ 
)

constructor

Parameters
ilObjTest$testOBJ

Definition at line 54 of file class.ilTestQuestionSetConfigFactory.php.

References $db, $pluginAdmin, $testOBJ, and $tree.

{
$this->tree = $tree;
$this->db = $db;
$this->pluginAdmin = $pluginAdmin;
$this->testOBJ = $testOBJ;
}

Member Function Documentation

ilTestQuestionSetConfigFactory::getQuestionSetConfig ( )

creates and returns an instance of a test question set config that corresponds to the test's current question set type (test mode)

Returns
ilTestQuestionSetConfig

Definition at line 68 of file class.ilTestQuestionSetConfigFactory.php.

References getQuestionSetConfigByType().

{
return $this->getQuestionSetConfigByType( $this->testOBJ->getQuestionSetType() );
}

+ Here is the call graph for this function:

ilTestQuestionSetConfigFactory::getQuestionSetConfigByType (   $questionSetType)

creates and returns an instance of a test question set config that corresponds to the passed question set type (test mode)

Returns
ilTestQuestionSetConfig

Definition at line 79 of file class.ilTestQuestionSetConfigFactory.php.

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

Referenced by getQuestionSetConfig().

{
if($this->testQuestionSetConfig === null)
{
switch( $questionSetType )
{
require_once 'Modules/Test/classes/class.ilTestFixedQuestionSetConfig.php';
$this->testQuestionSetConfig = new ilTestFixedQuestionSetConfig(
$this->tree, $this->db, $this->pluginAdmin, $this->testOBJ
);
break;
require_once 'Modules/Test/classes/class.ilTestRandomQuestionSetConfig.php';
$this->testQuestionSetConfig = new ilTestRandomQuestionSetConfig(
$this->tree, $this->db, $this->pluginAdmin, $this->testOBJ
);
break;
require_once 'Modules/Test/classes/class.ilObjTestDynamicQuestionSetConfig.php';
$this->testQuestionSetConfig = new ilObjTestDynamicQuestionSetConfig(
$this->tree, $this->db, $this->pluginAdmin, $this->testOBJ
);
break;
}
$this->testQuestionSetConfig->loadFromDb();
}
}

+ Here is the caller graph for this function:

Field Documentation

ilTestQuestionSetConfigFactory::$db = null
private

Definition at line 33 of file class.ilTestQuestionSetConfigFactory.php.

Referenced by __construct().

ilTestQuestionSetConfigFactory::$pluginAdmin = null
private

Definition at line 40 of file class.ilTestQuestionSetConfigFactory.php.

Referenced by __construct().

ilTestQuestionSetConfigFactory::$testOBJ = null
private

Definition at line 47 of file class.ilTestQuestionSetConfigFactory.php.

Referenced by __construct().

ilTestQuestionSetConfigFactory::$testQuestionSetConfig = null
private

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

Referenced by getQuestionSetConfigByType().

ilTestQuestionSetConfigFactory::$tree = null
private

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

Referenced by __construct().


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