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

Public Member Functions

 __construct (ilObjTest $testOBJ)
 
 getExporter ($mode="xml")
 

Protected Attributes

 $testOBJ
 

Detailed Description

Definition at line 11 of file class.ilTestExportFactory.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestExportFactory::__construct ( ilObjTest  $testOBJ)

Definition at line 18 of file class.ilTestExportFactory.php.

References $testOBJ.

19  {
20  $this->testOBJ = $testOBJ;
21  }

Member Function Documentation

◆ getExporter()

ilTestExportFactory::getExporter (   $mode = "xml")
Parameters
string$mode
Returns
ilTestExportDynamicQuestionSet|ilTestExportFixedQuestionSet|ilTestExportRandomQuestionSet

Definition at line 27 of file class.ilTestExportFactory.php.

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

28  {
29  switch ($this->testOBJ->getQuestionSetType()) {
31 
32  require_once 'Modules/Test/classes/class.ilTestExportFixedQuestionSet.php';
33  return new ilTestExportFixedQuestionSet($this->testOBJ, $mode);
34 
36 
37  require_once 'Modules/Test/classes/class.ilTestExportRandomQuestionSet.php';
38  return new ilTestExportRandomQuestionSet($this->testOBJ, $mode);
39 
41 
42  require_once 'Modules/Test/classes/class.ilTestExportDynamicQuestionSet.php';
43  return new ilTestExportDynamicQuestionSet($this->testOBJ, $mode);
44  }
45  }
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

ilTestExportFactory::$testOBJ
protected

Definition at line 16 of file class.ilTestExportFactory.php.

Referenced by __construct().


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