ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References $object.

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

Member Function Documentation

◆ checkAccess()

ilLTIConsumerAccess::checkAccess ( string  $permission)
protected

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

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

Referenced by ilLTIConsumerSettingsGUI\executeCommand(), hasEditPermissionsAccess(), hasOutcomesAccess(), and hasWriteAccess().

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: feed.php:28
+ 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.

References $object.

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

108  {
109  return new self($object);
110  }
+ Here is the caller graph for this function:

◆ hasCustomProviderCreationAccess()

static ilLTIConsumerAccess::hasCustomProviderCreationAccess ( )
static

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

References $DIC, and ilObjLTIAdministration\lookupLTISettingsRefId().

Referenced by ilObjLTIConsumerGUI\addDynReg(), ilObjLTIConsumerGUI\afterSave(), ilObjLTIConsumerGUI\cancelContentSelection(), ilObjLTIConsumerGUI\cancelDynReg(), ilObjLTIConsumerGUI\contentSelection(), ilObjLTIConsumerGUI\contentSelectionRequest(), ilObjLTIConsumerGUI\contentSelectionResponse(), ilObjLTIConsumerGUI\initCreationForms(), ilObjLTIConsumerGUI\saveCustom(), ilObjLTIConsumerGUI\saveDynReg(), and ilObjLTIConsumerGUI\showToolConfig().

112  : bool
113  {
114  global $DIC; /* @var \ILIAS\DI\Container $DIC */
115 
116  return $DIC->rbac()->system()->checkAccess(
117  'add_consume_provider',
119  );
120  }
global $DIC
Definition: feed.php:28
static lookupLTISettingsRefId()
Lookup ref_id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasEditPermissionsAccess()

ilLTIConsumerAccess::hasEditPermissionsAccess ( )

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

References checkAccess().

70  : bool
71  {
72  return $this->checkAccess('edit_permission');
73  }
checkAccess(string $permission)
+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilLTIConsumerAccess::hasHighscoreAccess ( )

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

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

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  }
+ Here is the call graph for this function:

◆ hasLearningProgressAccess()

ilLTIConsumerAccess::hasLearningProgressAccess ( )

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

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

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
+ Here is the call graph for this function:

◆ hasOutcomesAccess()

ilLTIConsumerAccess::hasOutcomesAccess ( )

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

References checkAccess().

Referenced by hasHighscoreAccess(), and hasStatementsAccess().

65  : bool
66  {
67  return $this->checkAccess('read_outcomes');
68  }
checkAccess(string $permission)
+ 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.

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

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  }
+ Here is the call graph for this function:

◆ hasWriteAccess()

ilLTIConsumerAccess::hasWriteAccess ( )

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

References $DIC, and checkAccess().

58  : bool
59  {
60  global $DIC; /* @var \ILIAS\DI\Container $DIC */
61 
62  return $this->checkAccess('write');
63  }
global $DIC
Definition: feed.php:28
checkAccess(string $permission)
+ 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: