ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilTestDashboardGUI.php
Go to the documentation of this file.
1 <?php
2 
31 {
35  protected $testObj;
36 
40  protected $questionSetConfig;
41 
45  protected $testAccess;
46 
50  protected $testTabs;
51 
55  protected $objectiveParent;
56 
62  {
63  $this->testObj = $testObj;
64  $this->questionSetConfig = $questionSetConfig;
65  }
66 
70  public function getTestObj(): ilObjTest
71  {
72  return $this->testObj;
73  }
74 
78  public function setTestObj($testObj)
79  {
80  $this->testObj = $testObj;
81  }
82 
87  {
89  }
90 
95  {
96  $this->questionSetConfig = $questionSetConfig;
97  }
98 
102  public function getTestAccess(): ilTestAccess
103  {
104  return $this->testAccess;
105  }
106 
110  public function setTestAccess($testAccess)
111  {
112  $this->testAccess = $testAccess;
113  }
114 
118  public function getTestTabs(): ilTestTabsManager
119  {
120  return $this->testTabs;
121  }
122 
126  public function setTestTabs($testTabs)
127  {
128  $this->testTabs = $testTabs;
129  }
130 
135  {
136  return $this->objectiveParent;
137  }
138 
143  {
144  $this->objectiveParent = $objectiveParent;
145  }
146 
150  public function executeCommand()
151  {
152  global $DIC; /* @var ILIAS\DI\Container $DIC */
153 
154  if (!$this->getTestAccess()->checkManageParticipantsAccess()) {
156  }
157 
159  $this->getTestTabs()->getDashboardSubTabs();
160 
161  switch ($DIC->ctrl()->getNextClass()) {
162  case 'iltestparticipantsgui':
163 
165 
166  require_once 'Modules/Test/classes/class.ilTestParticipantsGUI.php';
167  $gui = new ilTestParticipantsGUI($this->getTestObj(), $this->getQuestionSetConfig());
168  $gui->setTestAccess($this->getTestAccess());
169  $gui->setObjectiveParent($this->getObjectiveParent());
170  $DIC->ctrl()->forwardCommand($gui);
171  break;
172 
173  case 'iltestparticipantstimeextensiongui':
174 
176 
177  require_once 'Modules/Test/classes/class.ilTestParticipantsTimeExtensionGUI.php';
178  $gui = new ilTestParticipantsTimeExtensionGUI($this->getTestObj());
179  $DIC->ctrl()->forwardCommand($gui);
180  break;
181  }
182  }
183 }
__construct(ilObjTest $testObj, ilTestQuestionSetConfig $questionSetConfig)
ilTestDashboardGUI constructor.
setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent)
static accessViolationRedirect()
global $DIC
Definition: feed.php:28
setQuestionSetConfig($questionSetConfig)
executeCommand()
Execute Command.