ILIAS  release_8 Revision v8.24
ilTestExportFactory Class Reference
+ Collaboration diagram for ilTestExportFactory:

Public Member Functions

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

Protected Attributes

 $testOBJ
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilTestExportFactory::__construct ( ilObjTest  $testOBJ)

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

33 {
34 $this->testOBJ = $testOBJ;
35 }

References $testOBJ.

Member Function Documentation

◆ getExporter()

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

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

42 {
43 if ($this->testOBJ->isFixedTest()) {
44 return new ilTestExportFixedQuestionSet($this->testOBJ, $mode);
45 } elseif ($this->testOBJ->isRandomTest()) {
46 return new ilTestExportRandomQuestionSet($this->testOBJ, $mode);
47 }
48 return new ilTestExportDynamicQuestionSet($this->testOBJ, $mode);
49 }

Referenced by ilTestExportFactoryTest\testGetExporter().

+ Here is the caller graph for this function:

Field Documentation

◆ $testOBJ

ilTestExportFactory::$testOBJ
protected

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

Referenced by __construct().


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