ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilTestPlayerFactory.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
13 {
19  private $testOBJ = null;
20 
26  public function __construct(ilObjTest $testOBJ)
27  {
28  $this->testOBJ = $testOBJ;
29  }
30 
37  public function getPlayerGUI()
38  {
39  switch ($this->testOBJ->getQuestionSetType()) {
41 
42  require_once 'Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php';
43  return new ilTestPlayerFixedQuestionSetGUI($this->testOBJ);
44 
46 
47  require_once 'Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php';
48  return new ilTestPlayerRandomQuestionSetGUI($this->testOBJ);
49 
51 
52  require_once 'Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php';
53  return new ilTestPlayerDynamicQuestionSetGUI($this->testOBJ);
54  }
55  }
56 }
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
__construct(ilObjTest $testOBJ)
constructor
getPlayerGUI()
creates and returns an instance of a player gui that corresponds to the current test mode ...
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)