ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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'], $d['ilDB'], $d['ilPluginAdmin'], $this->getTestOBJ()
89 );
90
91 $this->testPlayerFactory = new ilTestPlayerFactory($this->getTestOBJ());
92 $this->testSessionFactory = new ilTestSessionFactory($this->getTestOBJ());
93
94 $this->testSequenceFactory = new ilTestSequenceFactory(
95 $d['ilDB'], $d['lng'], $d['ilPluginAdmin'], $this->getTestOBJ()
96 );
97 }
for($col=0; $col< 50; $col++) $d
$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 99 of file class.ilTestInfoScreenToolbarFactory.php.

100 {
101 if( !($this->testOBJ instanceof ilObjTest) )
102 {
103 $this->testOBJ = ilObjectFactory::getInstanceByRefId($this->testRefId);
104 }
105 }
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 107 of file class.ilTestInfoScreenToolbarFactory.php.

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

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: