ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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.

39 {
40 global $DIC;
41 $this->object = $object;
42 $this->access = $DIC->access();
43 }
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getInstance()

static ilCmiXapiAccess::getInstance ( ilObjCmiXapi  $object)
static

◆ hasEditPermissionsAccess()

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

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

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 }

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

+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilCmiXapiAccess::hasHighscoreAccess ( )

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

146 : bool
147 {
148 if ($this->object->getHighscoreEnabled() && $this->hasReadAccess()) {
149 return true;
150 }
151 return false;
152 }

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ hasLearningProgressAccess()

ilCmiXapiAccess::hasLearningProgressAccess ( )

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

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

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

+ Here is the call graph for this function:

◆ hasOutcomesAccess()

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

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

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 }

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

+ Here is the call graph for this function:

◆ hasReadAccess()

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

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

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 }

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

+ Here is the call graph for this function:

◆ hasStatementsAccess()

ilCmiXapiAccess::hasStatementsAccess ( )

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

138 : bool
139 {
140 if ($this->object->isStatementsReportEnabled() && $this->hasReadAccess()) {
141 return true;
142 }
143 return false;
144 }

References ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ hasWriteAccess()

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

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

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 }

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

+ 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: