ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLTIConsumerGradeSynchronizationGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
30{
32
34
36 {
37 $this->object = $object;
38
39 $this->access = ilLTIConsumerAccess::getInstance($this->object);
40 }
41
45 public function executeCommand(): bool
46 {
47 global $DIC;
48
49 if (!$this->object->getProvider()->isGradeSynchronization()) {
50 throw new ilLtiConsumerException('access denied!');
51 }
52
53 switch ($DIC->ctrl()->getNextClass($this)) {
54 default:
55 $cmd = $DIC->ctrl()->getCmd('show') . 'Cmd';
56 $this->{$cmd}();
57 }
58 return true;
59 }
60
61 protected function showCmd(): void
62 {
63 global $DIC;
64
65 $isMultiActorReport = $this->access->hasOutcomesAccess();
66
67 $table = new ilLTIConsumerGradeSynchronizationTableGUI($isMultiActorReport);
68
69 $cUser = null;
70 if (!$this->access->hasOutcomesAccess()) {
71 $cUser = $DIC->user()->getId();
72 }
73
75 $this->object->getId(),
76 $cUser
77 );
78
79 $table->setRecords($data);
80
81 $DIC->ui()->mainTemplate()->setContent($table->getHTML());
82 }
83}
static getInstance(ilObjLTIConsumer $object)
static getGradesForObject(int $objId, ?int $usrID=null, ?string $activity_progress=null, ?string $grading_progress=null, ?ilDateTime $startDate=null, ?ilDateTime $endDate=null)
global $DIC
Definition: shib_login.php:26