ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMyTestSolutionsGUI.php
Go to the documentation of this file.
1 <?php
2 
31 {
32  public const EVALGUI_CMD_SHOW_PASS_OVERVIEW = 'outUserListOfAnswerPasses';
33 
34  protected ?ilObjTest $testObj = null;
35  protected ?ilTestAccess $testAccess = null;
37 
38  public function getTestObj(): ?ilObjTest
39  {
40  return $this->testObj;
41  }
42 
43  public function setTestObj(ilObjTest $testObj): void
44  {
45  $this->testObj = $testObj;
46  }
47 
48  public function getTestAccess(): ?ilTestAccess
49  {
50  return $this->testAccess;
51  }
52 
53  public function setTestAccess(ilTestAccess $testAccess): void
54  {
55  $this->testAccess = $testAccess;
56  }
57 
59  {
61  }
62 
63  public function setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent): void
64  {
65  $this->objectiveParent = $objectiveParent;
66  }
67 
68  public function executeCommand(): void
69  {
70  global $DIC; /* @var ILIAS\DI\Container $DIC */
71 
72  if (!$DIC->ctrl()->getCmd()) {
73  $DIC->ctrl()->setCmd(self::EVALGUI_CMD_SHOW_PASS_OVERVIEW);
74  }
75 
76  switch ($DIC->ctrl()->getNextClass()) {
77  case "iltestevaluationgui":
78  require_once 'Modules/Test/classes/class.ilTestEvaluationGUI.php';
79  $gui = new ilTestEvaluationGUI($this->getTestObj());
80  $gui->setObjectiveOrientedContainer($this->getObjectiveParent());
81  $gui->setTestAccess($this->getTestAccess());
82  $DIC->ctrl()->forwardCommand($gui);
83  break;
84 
85  case 'ilassquestionpagegui':
86  require_once 'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
87  $forwarder = new ilAssQuestionPageCommandForwarder();
88  $forwarder->setTestObj($this->getTestObj());
89  $forwarder->forward();
90  break;
91  }
92  }
93 }
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent)
setTestAccess(ilTestAccess $testAccess)
ilTestObjectiveOrientedContainer $objectiveParent