ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCmiXapiAccess Class Reference
+ Collaboration diagram for ilCmiXapiAccess:

Public Member Functions

 __construct (ilObjCmiXapi $object)
 ilCmiXapiAccess constructor. More...
 
 hasLearningProgressAccess ()
 
 hasWriteAccess (?int $usrId=null)
 
 hasEditPermissionsAccess (?int $usrId=null)
 
 hasOutcomesAccess (?int $usrId=null)
 
 hasStatementsAccess ()
 
 hasHighscoreAccess ()
 

Static Public Member Functions

static getInstance (ilObjCmiXapi $object)
 

Protected Attributes

ilObjCmiXapi $object
 
ilAccessHandler $access
 

Detailed Description

Definition at line 30 of file class.ilCmiXapiAccess.php.

Constructor & Destructor Documentation

◆ __construct()

ilCmiXapiAccess::__construct ( ilObjCmiXapi  $object)

ilCmiXapiAccess constructor.

Definition at line 38 of file class.ilCmiXapiAccess.php.

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

39  {
40  global $DIC;
41  $this->object = $object;
42  $this->access = $DIC->access();
43  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilCmiXapiAccess::getInstance ( ilObjCmiXapi  $object)
static

Definition at line 132 of file class.ilCmiXapiAccess.php.

References $object.

Referenced by ilCmiXapiStatementsGUI\__construct(), ilCmiXapiScoringGUI\__construct(), ilObjCmiXapiGUI\__construct(), and XapiProxy\XapiProxyRequest\handleGetStatementsRequest().

133  {
134  return new self($object);
135  }
+ Here is the caller graph for this function:

◆ hasEditPermissionsAccess()

ilCmiXapiAccess::hasEditPermissionsAccess ( ?int  $usrId = null)

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

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

72  : bool
73  {
74  if (isset($usrId)) {
75  return $this->access->checkAccessOfUser(
76  $usrId,
77  'edit_permission',
78  '',
79  $this->object->getRefId(),
80  $this->object->getType(),
81  $this->object->getId()
82  );
83  } else {
84  return $this->access->checkAccess(
85  'edit_permission',
86  '',
87  $this->object->getRefId(),
88  $this->object->getType(),
89  $this->object->getId()
90  );
91  }
92  }
+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilCmiXapiAccess::hasHighscoreAccess ( )

Definition at line 124 of file class.ilCmiXapiAccess.php.

References ILIAS\Repository\object().

124  : bool
125  {
126  if ($this->object->getHighscoreEnabled()) {
127  return true;
128  }
129  return false;
130  }
+ Here is the call graph for this function:

◆ hasLearningProgressAccess()

ilCmiXapiAccess::hasLearningProgressAccess ( )

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

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

45  : bool
46  {
47  return ilLearningProgressAccess::checkAccess($this->object->getRefId());
48  }
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()

ilCmiXapiAccess::hasOutcomesAccess ( ?int  $usrId = null)

Definition at line 94 of file class.ilCmiXapiAccess.php.

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

94  : bool
95  {
96  if (isset($usrId)) {
97  return $this->access->checkAccessOfUser(
98  $usrId,
99  'read_outcomes',
100  '',
101  $this->object->getRefId(),
102  $this->object->getType(),
103  $this->object->getId()
104  );
105  } else {
106  return $this->access->checkAccess(
107  'read_outcomes',
108  '',
109  $this->object->getRefId(),
110  $this->object->getType(),
111  $this->object->getId()
112  );
113  }
114  }
+ Here is the call graph for this function:

◆ hasStatementsAccess()

ilCmiXapiAccess::hasStatementsAccess ( )

Definition at line 116 of file class.ilCmiXapiAccess.php.

References ILIAS\Repository\object().

116  : bool
117  {
118  if ($this->object->isStatementsReportEnabled()) {
119  return true;
120  }
121  return false;
122  }
+ Here is the call graph for this function:

◆ hasWriteAccess()

ilCmiXapiAccess::hasWriteAccess ( ?int  $usrId = null)

Definition at line 50 of file class.ilCmiXapiAccess.php.

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

50  : bool
51  {
52  if (isset($usrId)) {
53  return $this->access->checkAccessOfUser(
54  $usrId,
55  'write',
56  '',
57  $this->object->getRefId(),
58  $this->object->getType(),
59  $this->object->getId()
60  );
61  } else {
62  return $this->access->checkAccess(
63  'write',
64  '',
65  $this->object->getRefId(),
66  $this->object->getType(),
67  $this->object->getId()
68  );
69  }
70  }
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilCmiXapiAccess::$access
protected

Definition at line 33 of file class.ilCmiXapiAccess.php.

◆ $object

ilObjCmiXapi ilCmiXapiAccess::$object
protected

Definition at line 32 of file class.ilCmiXapiAccess.php.

Referenced by __construct(), and getInstance().


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