ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilTestDashboardGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 use ILiAS\UI\Renderer as UIRenderer;
23 
25 
38 {
42 
43  public function __construct(
44  protected ilObjTest $test_obj,
45  protected ilObjUser $user,
46  protected ilAccess $access,
47  protected ilGlobalTemplateInterface $main_tpl,
48  protected UIFactory $ui_factory,
49  protected UIRenderer $ui_renderer,
50  protected ilLanguage $lng,
51  protected ilDBInterface $db,
52  protected ilCtrl $ctrl,
53  protected ilTabsGUI $tabs,
54  protected ilToolbarGUI $toolbar,
55  protected ilTestQuestionSetConfig $question_set_config,
56  protected InternalRequestService $testrequest
57  ) {
58  }
59 
60  public function getTestObj(): ilObjTest
61  {
62  return $this->test_obj;
63  }
64 
65  public function setTestObj(ilObjTest $test_obj)
66  {
67  $this->test_obj = $test_obj;
68  }
69 
71  {
72  return $this->question_set_config;
73  }
74 
75  public function setQuestionSetConfig(ilTestQuestionSetConfig $question_set_config): void
76  {
77  $this->question_set_config = $question_set_config;
78  }
79 
80  public function getTestAccess(): ilTestAccess
81  {
82  return $this->test_access;
83  }
84 
85  public function setTestAccess(ilTestAccess $test_access): void
86  {
87  $this->test_access = $test_access;
88  }
89 
90  public function getTestTabs(): ilTestTabsManager
91  {
92  return $this->tabs_manager;
93  }
94 
95  public function setTestTabs(ilTestTabsManager $tabs_manager): void
96  {
97  $this->tabs_manager = $tabs_manager;
98  }
99 
101  {
103  }
104 
105  public function setObjectiveParent(ilTestObjectiveOrientedContainer $objective_parent)
106  {
107  $this->objective_parent = $objective_parent;
108  }
109 
110  public function executeCommand(): void
111  {
112  if (!$this->getTestAccess()->checkManageParticipantsAccess()) {
113  ilObjTestGUI::accessViolationRedirect();
114  }
115 
117  $this->getTestTabs()->getDashboardSubTabs();
118 
119  switch ($this->ctrl->getNextClass()) {
120  case 'iltestparticipantsgui':
122 
123  $gui = new ilTestParticipantsGUI(
124  $this->getTestObj(),
125  $this->getQuestionSetConfig(),
126  $this->access,
127  $this->main_tpl,
128  $this->ui_factory,
129  $this->ui_renderer,
130  $this->lng,
131  $this->ctrl,
132  $this->db,
133  $this->tabs,
134  $this->toolbar,
135  $this->testrequest
136  );
137  $gui->setTestAccess($this->getTestAccess());
138  $gui->setObjectiveParent($this->getObjectiveParent());
139  $this->ctrl->forwardCommand($gui);
140  break;
141 
142  case 'iltestparticipantstimeextensiongui':
144 
146  $this->getTestObj(),
147  $this->user,
148  $this->ctrl,
149  $this->lng,
150  $this->db,
151  $this->main_tpl,
153  );
154  $this->ctrl->forwardCommand($gui);
155  break;
156  }
157  }
158 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilTestTabsManager $tabs_manager
setQuestionSetConfig(ilTestQuestionSetConfig $question_set_config)
ilTestObjectiveOrientedContainer $objective_parent
$lng
setTestTabs(ilTestTabsManager $tabs_manager)
setTestAccess(ilTestAccess $test_access)
__construct(protected ilObjTest $test_obj, protected ilObjUser $user, protected ilAccess $access, protected ilGlobalTemplateInterface $main_tpl, protected UIFactory $ui_factory, protected UIRenderer $ui_renderer, protected ilLanguage $lng, protected ilDBInterface $db, protected ilCtrl $ctrl, protected ilTabsGUI $tabs, protected ilToolbarGUI $toolbar, protected ilTestQuestionSetConfig $question_set_config, protected InternalRequestService $testrequest)
setObjectiveParent(ilTestObjectiveOrientedContainer $objective_parent)
setTestObj(ilObjTest $test_obj)