ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilLOMemberTestResultGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=0);
26 {
29  private int $user_id;
30 
33 
34  public function __construct(ilObjectGUI $parent_gui, ilObject $parent, int $a_user_id)
35  {
36  global $DIC;
37 
38  $this->container_gui = $parent_gui;
39  $this->container = $parent;
40  $this->user_id = $a_user_id;
41 
42  $this->ctrl = $DIC->ctrl();
43  $this->tpl = $DIC->ui()->mainTemplate();
44  }
45 
46  public function executeCommand(): void
47  {
48  $next_class = $this->ctrl->getNextClass($this);
49  $cmd = $this->ctrl->getCmd();
50 
51  switch ($next_class) {
52 
53  default:
54  if (!$cmd) {
55  $cmd = 'viewResult';
56  }
57  $this->$cmd();
58  break;
59  }
60  }
61 
62  public function getParentObject(): ilObject
63  {
64  return $this->container;
65  }
66 
67  public function getParentGUI(): ilObjectGUI
68  {
69  return $this->container_gui;
70  }
71 
72  public function getUserId(): int
73  {
74  return $this->user_id;
75  }
76 
80  protected function viewResult(): void
81  {
82  $result_table = new ilLOMemberTestResultTableGUI($this, $this->getParentObject(), 'viewResult');
83  $result_table->setUserId($this->getUserId());
84  $result_table->init();
85  $result_table->parse();
86 
87  $this->tpl->setContent($result_table->getHTML());
88  }
89 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjectGUI $parent_gui, ilObject $parent, int $a_user_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
Class ilObjectGUI Basic methods of all Output classes.