ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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 72 of file class.ilCmiXapiAccess.php.

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 }

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

+ Here is the call graph for this function:

◆ hasHighscoreAccess()

ilCmiXapiAccess::hasHighscoreAccess ( )

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

124 : bool
125 {
126 if ($this->object->getHighscoreEnabled()) {
127 return true;
128 }
129 return false;
130 }

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 94 of file class.ilCmiXapiAccess.php.

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 }

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

+ Here is the call graph for this function:

◆ hasStatementsAccess()

ilCmiXapiAccess::hasStatementsAccess ( )

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

116 : bool
117 {
118 if ($this->object->isStatementsReportEnabled()) {
119 return true;
120 }
121 return false;
122 }

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: