ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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() )
40  {
42 
43  require_once 'Modules/Test/classes/class.ilTestPlayerFixedQuestionSetGUI.php';
44  return new ilTestPlayerFixedQuestionSetGUI($this->testOBJ);
45 
47 
48  require_once 'Modules/Test/classes/class.ilTestPlayerRandomQuestionSetGUI.php';
49  return new ilTestPlayerRandomQuestionSetGUI($this->testOBJ);
50 
52 
53  require_once 'Modules/Test/classes/class.ilTestPlayerDynamicQuestionSetGUI.php';
54  return new ilTestPlayerDynamicQuestionSetGUI($this->testOBJ);
55  }
56  }
57 }
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)