ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTestExportFactory.php
Go to the documentation of this file.
1 <?php
2 
26 {
30  protected $testOBJ;
31 
32  public function __construct(ilObjTest $testOBJ)
33  {
34  $this->testOBJ = $testOBJ;
35  }
36 
41  public function getExporter($mode = "xml")
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  }
50 }
__construct(ilObjTest $testOBJ)