ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilMyTestSolutionsGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
33 {
34  public const EVALGUI_CMD_SHOW_PASS_OVERVIEW = 'outUserListOfAnswerPasses';
35 
36  protected ?ilObjTest $testObj = null;
37  protected ?ilTestAccess $testAccess = null;
39 
40  public function getTestObj(): ?ilObjTest
41  {
42  return $this->testObj;
43  }
44 
45  public function setTestObj(ilObjTest $testObj): void
46  {
47  $this->testObj = $testObj;
48  }
49 
50  public function getTestAccess(): ?ilTestAccess
51  {
52  return $this->testAccess;
53  }
54 
55  public function setTestAccess(ilTestAccess $testAccess): void
56  {
57  $this->testAccess = $testAccess;
58  }
59 
61  {
63  }
64 
65  public function setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent): void
66  {
67  $this->objectiveParent = $objectiveParent;
68  }
69 
70  public function executeCommand(): void
71  {
72  /* @var ILIAS\DI\Container $DIC */
73  global $DIC;
74 
75  if (!$DIC->ctrl()->getCmd()) {
76  $DIC->ctrl()->setCmd(self::EVALGUI_CMD_SHOW_PASS_OVERVIEW);
77  }
78 
79  switch ($DIC->ctrl()->getNextClass()) {
80  case "iltestevaluationgui":
81  $gui = new ilTestEvaluationGUI($this->getTestObj());
82  $gui->setObjectiveOrientedContainer($this->getObjectiveParent());
83  $gui->setTestAccess($this->getTestAccess());
84  $DIC->ctrl()->forwardCommand($gui);
85  break;
86 
87  case 'ilassquestionpagegui':
88  $forwarder = new ilAssQuestionPageCommandForwarder();
89  $forwarder->setTestObj($this->getTestObj());
90  $forwarder->forward();
91  break;
92  }
93  }
94 }
global $DIC
Definition: feed.php:28
Output class for assessment test evaluation.
setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent)
setTestAccess(ilTestAccess $testAccess)
ilTestObjectiveOrientedContainer $objectiveParent