ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilTestInfoScreenToolbarFactory Class Reference
+ Collaboration diagram for ilTestInfoScreenToolbarFactory:

Public Member Functions

 getTestRefId ()
 
 setTestRefId ($testRefId)
 
 getTestOBJ ()
 
 setTestOBJ ($testOBJ)
 
 getToolbarInstance ()
 

Protected Member Functions

 ensureInitialised ()
 

Private Member Functions

 ensureTestObjectInitialised ()
 

Private Attributes

 $testRefId
 
 $testOBJ
 
 $testQuestionSetConfigFactory
 
 $testPlayerFactory
 
 $testSessionFactory
 
 $testSequenceFactory
 

Detailed Description

Definition at line 17 of file class.ilTestInfoScreenToolbarFactory.php.

Member Function Documentation

◆ ensureInitialised()

ilTestInfoScreenToolbarFactory::ensureInitialised ( )
protected

Definition at line 81 of file class.ilTestInfoScreenToolbarFactory.php.

82 {
84
85 $d = $GLOBALS['DIC'];
86
87 $this->testQuestionSetConfigFactory = new ilTestQuestionSetConfigFactory(
88 $d['tree'],
89 $d['ilDB'],
90 $d['ilPluginAdmin'],
91 $this->getTestOBJ()
92 );
93
94 $this->testPlayerFactory = new ilTestPlayerFactory($this->getTestOBJ());
95 $this->testSessionFactory = new ilTestSessionFactory($this->getTestOBJ());
96
97 $this->testSequenceFactory = new ilTestSequenceFactory(
98 $d['ilDB'],
99 $d['lng'],
100 $d['ilPluginAdmin'],
101 $this->getTestOBJ()
102 );
103 }
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $d, $GLOBALS, ensureTestObjectInitialised(), and getTestOBJ().

Referenced by getToolbarInstance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ensureTestObjectInitialised()

ilTestInfoScreenToolbarFactory::ensureTestObjectInitialised ( )
private

Definition at line 105 of file class.ilTestInfoScreenToolbarFactory.php.

106 {
107 if (!($this->testOBJ instanceof ilObjTest)) {
108 $this->testOBJ = ilObjectFactory::getInstanceByRefId($this->testRefId);
109 }
110 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References ilObjectFactory\getInstanceByRefId().

Referenced by ensureInitialised().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTestOBJ()

ilTestInfoScreenToolbarFactory::getTestOBJ ( )
Returns
ilObjTest

Definition at line 68 of file class.ilTestInfoScreenToolbarFactory.php.

References $testOBJ.

Referenced by ensureInitialised(), and getToolbarInstance().

+ Here is the caller graph for this function:

◆ getTestRefId()

ilTestInfoScreenToolbarFactory::getTestRefId ( )

◆ getToolbarInstance()

ilTestInfoScreenToolbarFactory::getToolbarInstance ( )

Definition at line 112 of file class.ilTestInfoScreenToolbarFactory.php.

113 {
114 $this->ensureInitialised();
115
116 $d = $GLOBALS['DIC'];
117
118 $toolbar = new ilTestInfoScreenToolbarGUI($d['ilDB'], $d['ilAccess'], $d['ilCtrl'], $d['lng'], $d['ilPluginAdmin']);
119
120 $toolbar->setTestOBJ($this->getTestOBJ());
121 $toolbar->setTestPlayerGUI($this->testPlayerFactory->getPlayerGUI());
122
123 $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
124 $testSession = $this->testSessionFactory->getSession();
125 $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
126 $testSequence->loadFromDb();
127 $testSequence->loadQuestions($testQuestionSetConfig, new ilTestDynamicQuestionSetFilterSelection());
128
129 $toolbar->setTestQuestionSetConfig($testQuestionSetConfig);
130 $toolbar->setTestSession($testSession);
131 $toolbar->setTestSequence($testSequence);
132
133 return $toolbar;
134 }

References $d, $GLOBALS, ensureInitialised(), and getTestOBJ().

+ Here is the call graph for this function:

◆ setTestOBJ()

ilTestInfoScreenToolbarFactory::setTestOBJ (   $testOBJ)
Parameters
ilObjTest$testOBJ

Definition at line 76 of file class.ilTestInfoScreenToolbarFactory.php.

77 {
78 $this->testOBJ = $testOBJ;
79 }

References $testOBJ.

◆ setTestRefId()

ilTestInfoScreenToolbarFactory::setTestRefId (   $testRefId)
Parameters
int$testRefId

Definition at line 60 of file class.ilTestInfoScreenToolbarFactory.php.

61 {
62 $this->testRefId = $testRefId;
63 }

References $testRefId.

Field Documentation

◆ $testOBJ

ilTestInfoScreenToolbarFactory::$testOBJ
private

Definition at line 27 of file class.ilTestInfoScreenToolbarFactory.php.

Referenced by getTestOBJ(), and setTestOBJ().

◆ $testPlayerFactory

ilTestInfoScreenToolbarFactory::$testPlayerFactory
private

Definition at line 37 of file class.ilTestInfoScreenToolbarFactory.php.

◆ $testQuestionSetConfigFactory

ilTestInfoScreenToolbarFactory::$testQuestionSetConfigFactory
private

Definition at line 32 of file class.ilTestInfoScreenToolbarFactory.php.

◆ $testRefId

ilTestInfoScreenToolbarFactory::$testRefId
private

Definition at line 22 of file class.ilTestInfoScreenToolbarFactory.php.

Referenced by getTestRefId(), and setTestRefId().

◆ $testSequenceFactory

ilTestInfoScreenToolbarFactory::$testSequenceFactory
private

Definition at line 47 of file class.ilTestInfoScreenToolbarFactory.php.

◆ $testSessionFactory

ilTestInfoScreenToolbarFactory::$testSessionFactory
private

Definition at line 42 of file class.ilTestInfoScreenToolbarFactory.php.


The documentation for this class was generated from the following file: