ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilCmiXapiAccess Class Reference
+ Collaboration diagram for ilCmiXapiAccess:

Public Member Functions

 __construct (ilObjCmiXapi $object)
 ilCmiXapiAccess constructor. More...
 
 hasLearningProgressAccess ()
 
 hasWriteAccess (?int $usrId=null)
 
 hasReadAccess (?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: shib_login.php:25
+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilCmiXapiAccess::getInstance ( ilObjCmiXapi  $object)
static

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

References $object.

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

155  {
156  return new self($object);
157  }
+ Here is the caller graph for this function:

◆ hasEditPermissionsAccess()

ilCmiXapiAccess::hasEditPermissionsAccess ( ?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  'edit_permission',
100  '',
101  $this->object->getRefId(),
102  $this->object->getType(),
103  $this->object->getId()
104  );
105  } else {
106  return $this->access->checkAccess(
107  'edit_permission',
108  '',
109  $this->object->getRefId(),
110  $this->object->getType(),
111  $this->object->getId()
112  );
113  }
114  }
+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilCmiXapiAccess::hasHighscoreAccess ( )

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

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

146  : bool
147  {
148  if ($this->object->getHighscoreEnabled() && $this->hasReadAccess()) {
149  return true;
150  }
151  return false;
152  }
hasReadAccess(?int $usrId=null)
+ 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 116 of file class.ilCmiXapiAccess.php.

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

116  : bool
117  {
118  if (isset($usrId)) {
119  return $this->access->checkAccessOfUser(
120  $usrId,
121  'read_outcomes',
122  '',
123  $this->object->getRefId(),
124  $this->object->getType(),
125  $this->object->getId()
126  );
127  } else {
128  return $this->access->checkAccess(
129  'read_outcomes',
130  '',
131  $this->object->getRefId(),
132  $this->object->getType(),
133  $this->object->getId()
134  );
135  }
136  }
+ Here is the call graph for this function:

◆ hasReadAccess()

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

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

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

Referenced by hasHighscoreAccess(), and hasStatementsAccess().

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

◆ hasStatementsAccess()

ilCmiXapiAccess::hasStatementsAccess ( )

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

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

138  : bool
139  {
140  if ($this->object->isStatementsReportEnabled() && $this->hasReadAccess()) {
141  return true;
142  }
143  return false;
144  }
hasReadAccess(?int $usrId=null)
+ 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: