ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ($permission)
 

Protected Attributes

 $object
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilLTIConsumerAccess::__construct ( ilObjLTIConsumer  $object)

ilLTIConsumerAccess constructor.

Parameters
ilObjLTIConsumer$object

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

27 {
28 $this->object = $object;
29 }

References $object.

Member Function Documentation

◆ checkAccess()

ilLTIConsumerAccess::checkAccess (   $permission)
protected
Parameters
$permission
Returns
bool

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

36 {
37 global $DIC; /* @var \ILIAS\DI\Container $DIC */
38
39 return $DIC->access()->checkAccess(
40 $permission,
41 '',
42 $this->object->getRefId(),
43 $this->object->getType(),
44 $this->object->getId()
45 );
46 }
$DIC
Definition: xapitoken.php:46

References $DIC.

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

+ Here is the caller graph for this function:

◆ getInstance()

static ilLTIConsumerAccess::getInstance ( ilObjLTIConsumer  $object)
static
Parameters
ilObjLTIConsumer$object
Returns
ilLTIConsumerAccess

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

114 {
115 return new self($object);
116 }

References $object.

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

+ Here is the caller graph for this function:

◆ hasCustomProviderCreationAccess()

static ilLTIConsumerAccess::hasCustomProviderCreationAccess ( )
static
Returns
bool

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

122 {
123 global $DIC; /* @var \ILIAS\DI\Container $DIC */
124
125 return $DIC->rbac()->system()->checkAccess(
126 'add_consume_provider',
128 );
129 }
static lookupLTISettingsRefId()
Lookup ref_id.

References $DIC, and ilObjLTIAdministration\lookupLTISettingsRefId().

Referenced by ilObjLTIConsumerGUI\afterSave(), ilObjLTIConsumerGUI\initCreationForms(), and ilObjLTIConsumerGUI\saveCustom().

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

◆ hasEditPermissionsAccess()

ilLTIConsumerAccess::hasEditPermissionsAccess ( )

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

65 {
66 return $this->checkAccess('edit_permission');
67 }

References checkAccess().

+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilLTIConsumerAccess::hasHighscoreAccess ( )
Returns
bool

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

97 {
98 if (!$this->object->getUseXapi()) {
99 return false;
100 }
101
102 if ($this->object->getHighscoreEnabled()) {
103 return true;
104 }
105
106 return $this->hasOutcomesAccess();
107 }

References hasOutcomesAccess().

+ Here is the call graph for this function:

◆ hasLearningProgressAccess()

ilLTIConsumerAccess::hasLearningProgressAccess ( )
Returns
bool

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

73 {
74 return ilLearningProgressAccess::checkAccess($this->object->getRefId());
75 }
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress

References ilLearningProgressAccess\checkAccess().

+ Here is the call graph for this function:

◆ hasOutcomesAccess()

ilLTIConsumerAccess::hasOutcomesAccess ( )

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

56 {
57 if ($this->checkAccess('read_outcomes')) {
58 return true;
59 }
60
61 return false;
62 }

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 ( )
Returns
bool

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

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().

+ Here is the call graph for this function:

◆ hasWriteAccess()

ilLTIConsumerAccess::hasWriteAccess ( )

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

49 {
50 global $DIC; /* @var \ILIAS\DI\Container $DIC */
51
52 return $this->checkAccess('write');
53 }

References $DIC, and checkAccess().

+ Here is the call graph for this function:

Field Documentation

◆ $object

ilLTIConsumerAccess::$object
protected

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

Referenced by __construct(), and getInstance().

◆ GLOBAL_ADMIN_ROLE_ID

const ilLTIConsumerAccess::GLOBAL_ADMIN_ROLE_ID = 2

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


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