ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLOMemberTestResultGUI.php
Go to the documentation of this file.
1<?php
2
19declare(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 default:
53 if (!$cmd) {
54 $cmd = 'viewResult';
55 }
56 $this->$cmd();
57 break;
58 }
59 }
60
61 public function getParentObject(): ilObject
62 {
63 return $this->container;
64 }
65
66 public function getParentGUI(): ilObjectGUI
67 {
69 }
70
71 public function getUserId(): int
72 {
73 return $this->user_id;
74 }
75
79 protected function viewResult(): void
80 {
81 $result_table = new ilLOMemberTestResultTableGUI($this, $this->getParentObject(), 'viewResult');
82 $result_table->setUserId($this->getUserId());
83 $result_table->init();
84 $result_table->parse();
85
86 $this->tpl->setContent($result_table->getHTML());
87 }
88}
__construct(ilObjectGUI $parent_gui, ilObject $parent, int $a_user_id)
Class ilLOmemberTestResultTableGUI.
Class ilObjectGUI Basic methods of all Output classes.
Class ilObject Basic functions for all objects.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26