ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilTestExportFactory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
12 {
16  protected $testOBJ;
17 
18  public function __construct(ilObjTest $testOBJ)
19  {
20  $this->testOBJ = $testOBJ;
21  }
22 
27  public function getExporter($mode = "xml")
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  }
46 }
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)
__construct(ilObjTest $testOBJ)