ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
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_DYNAMIC
type setting value for dynamic question set (continues testing mode)
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
__construct(ilObjTest $testOBJ)
constructor
getPlayerGUI()
creates and returns an instance of a player gui that corresponds to the current test mode