ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLTIConsumerGradeService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
31{
33 public const GRADESERVICE_READ = 1;
34
36 public const GRADESERVICE_FULL = 2;
37
39 public const SCOPE_GRADESERVICE_LINEITEM = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem';
40
42 public const SCOPE_GRADESERVICE_LINEITEM_READ = 'https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly';
43
45 public const SCOPE_GRADESERVICE_RESULT_READ = 'https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly';
46
48 public const SCOPE_GRADESERVICE_SCORE = 'https://purl.imsglobal.org/spec/lti-ags/scope/score';
49
50
54 public function __construct()
55 {
57 $this->id = 'gradebookservice';
58 $this->name = 'ilLTIConsumerGradeService';
59 }
60
64 public function getResources(): array
65 {
66 // The containers should be ordered in the array after their elements.
67 // Lineitems should be after lineitem.
68 if (empty($this->resources)) {
69 $this->resources = array();
70 $this->resources[] = new ilLTIConsumerGradeServiceLineItem($this);
72 $this->resources[] = new ilLTIConsumerGradeServiceResults($this);
73 $this->resources[] = new ilLTIConsumerGradeServiceScores($this);
74 }
75 return $this->resources;
76 }
77
82 public function getPermittedScopes(): array
83 {
84 $scopes = array();
89 return $scopes;
90 }
91
95 public function getScopes(): array
96 {
97 return [
102 ];
103 }
104}
const SCOPE_GRADESERVICE_RESULT_READ
Scope for access to Result service.
const SCOPE_GRADESERVICE_SCORE
Scope for access to Score service.
getPermittedScopes()
Get the scope(s) permitted for this service.
getResources()
Get the resources for this service.
const SCOPE_GRADESERVICE_LINEITEM
Scope for full access to Lineitem service.
const SCOPE_GRADESERVICE_LINEITEM_READ
Scope for full access to Lineitem service.
getScopes()
Get the scopes defined by this service.
const GRADESERVICE_FULL
Full access to Gradebook services.
const GRADESERVICE_READ
Read-only access to Gradebook services.
array $resources
Instances of the resources associated with this service.
$scopes
Definition: ltitoken.php:96
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc