ILIAS  release_7 Revision v7.30-3-g800a261c036
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['refinery'],
101 $d['ilPluginAdmin'],
102 $this->getTestOBJ()
103 );
104 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
for( $i=6;$i< 13;$i++) for($i=1; $i< 13; $i++) $d
Definition: date.php:296

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 106 of file class.ilTestInfoScreenToolbarFactory.php.

107 {
108 if (!($this->testOBJ instanceof ilObjTest)) {
109 $this->testOBJ = ilObjectFactory::getInstanceByRefId($this->testRefId);
110 }
111 }
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 113 of file class.ilTestInfoScreenToolbarFactory.php.

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

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: