ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLTIConsumerAccess Class Reference
+ Collaboration diagram for ilLTIConsumerAccess:

Public Member Functions

 __construct (ilObjLTIConsumer $object)
 ilLTIConsumerAccess constructor. More...
 
 hasWriteAccess ()
 
 hasOutcomesAccess ()
 
 hasEditPermissionsAccess ()
 
 hasLearningProgressAccess ()
 
 hasStatementsAccess ()
 
 hasHighscoreAccess ()
 

Static Public Member Functions

static getInstance (ilObjLTIConsumer $object)
 
static hasCustomProviderCreationAccess ()
 

Data Fields

const GLOBAL_ADMIN_ROLE_ID = 2
 

Protected Member Functions

 checkAccess (string $permission)
 

Protected Attributes

ilObjLTIConsumer $object
 

Detailed Description

Definition at line 29 of file class.ilLTIConsumerAccess.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumerAccess::__construct ( ilObjLTIConsumer  $object)

ilLTIConsumerAccess constructor.

Definition at line 40 of file class.ilLTIConsumerAccess.php.

41 {
42 $this->object = $object;
43 }

References $object.

Member Function Documentation

◆ checkAccess()

ilLTIConsumerAccess::checkAccess ( string  $permission)
protected

Definition at line 45 of file class.ilLTIConsumerAccess.php.

45 : bool
46 {
47 global $DIC; /* @var \ILIAS\DI\Container $DIC */
48
49 return $DIC->access()->checkAccess(
50 $permission,
51 '',
52 $this->object->getRefId(),
53 $this->object->getType(),
54 $this->object->getId()
55 );
56 }
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\object().

Referenced by hasEditPermissionsAccess(), hasOutcomesAccess(), and hasWriteAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInstance()

static ilLTIConsumerAccess::getInstance ( ilObjLTIConsumer  $object)
static

Definition at line 107 of file class.ilLTIConsumerAccess.php.

108 {
109 return new self($object);
110 }

References $object.

Referenced by ilLTIConsumerGradeSynchronizationGUI\__construct(), ilLTIConsumerScoringGUI\__construct(), and ilLTIConsumerXapiStatementsGUI\__construct().

+ Here is the caller graph for this function:

◆ hasCustomProviderCreationAccess()

static ilLTIConsumerAccess::hasCustomProviderCreationAccess ( )
static

◆ hasEditPermissionsAccess()

ilLTIConsumerAccess::hasEditPermissionsAccess ( )

Definition at line 70 of file class.ilLTIConsumerAccess.php.

70 : bool
71 {
72 return $this->checkAccess('edit_permission');
73 }
checkAccess(string $permission)

References checkAccess().

+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilLTIConsumerAccess::hasHighscoreAccess ( )

Definition at line 93 of file class.ilLTIConsumerAccess.php.

93 : bool
94 {
95 // Todo -check
96 if (!$this->object->getUseXapi()) {
97 return false;
98 }
99
100 if ($this->object->getHighscoreEnabled()) {
101 return true;
102 }
103
104 return $this->hasOutcomesAccess();
105 }

References hasOutcomesAccess(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ hasLearningProgressAccess()

ilLTIConsumerAccess::hasLearningProgressAccess ( )

Definition at line 75 of file class.ilLTIConsumerAccess.php.

75 : bool
76 {
77 return ilLearningProgressAccess::checkAccess($this->object->getRefId());
78 }
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress

References ilLearningProgressAccess\checkAccess(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ hasOutcomesAccess()

ilLTIConsumerAccess::hasOutcomesAccess ( )

Definition at line 65 of file class.ilLTIConsumerAccess.php.

65 : bool
66 {
67 return $this->checkAccess('read_outcomes');
68 }

References checkAccess().

Referenced by hasHighscoreAccess(), and hasStatementsAccess().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasStatementsAccess()

ilLTIConsumerAccess::hasStatementsAccess ( )

Definition at line 80 of file class.ilLTIConsumerAccess.php.

80 : bool
81 {
82 if (!$this->object->getUseXapi()) {
83 return false;
84 }
85
86 if ($this->object->isStatementsReportEnabled()) {
87 return true;
88 }
89
90 return $this->hasOutcomesAccess();
91 }

References hasOutcomesAccess(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ hasWriteAccess()

ilLTIConsumerAccess::hasWriteAccess ( )

Definition at line 58 of file class.ilLTIConsumerAccess.php.

58 : bool
59 {
60 global $DIC; /* @var \ILIAS\DI\Container $DIC */
61
62 return $this->checkAccess('write');
63 }

References $DIC, and checkAccess().

+ Here is the call graph for this function:

Field Documentation

◆ $object

ilObjLTIConsumer ilLTIConsumerAccess::$object
protected

Definition at line 35 of file class.ilLTIConsumerAccess.php.

Referenced by __construct(), and getInstance().

◆ GLOBAL_ADMIN_ROLE_ID

const ilLTIConsumerAccess::GLOBAL_ADMIN_ROLE_ID = 2

Definition at line 31 of file class.ilLTIConsumerAccess.php.


The documentation for this class was generated from the following file: