ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjCourseReferenceAccess Class Reference
+ Inheritance diagram for ilObjCourseReferenceAccess:
+ Collaboration diagram for ilObjCourseReferenceAccess:

Public Member Functions

 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)
Parameters
string$a_cmdcommand (not permission!)
string$a_permissionpermission
int$a_ref_idreference id
int$a_obj_idobject id
int$a_user_iduser id (if not provided, current user is taken)
Returns
boolean true, if everything is ok
More...
 
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id)
 check condition More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
Parameters
ilWACPath$ilWACPath
Returns
bool
More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Static Public Member Functions

static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data.
Parameters
array$a_obj_idsarray of object ids
More...
 
static _getCommands ($a_ref_id=0)
 
- Static Public Member Functions inherited from ilContainerReferenceAccess
static _isAccessible ($a_ref_id)
 Check if target is accessible and not deleted. More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto ($a_target)
 check whether goto script will succeed More...
 
static _isOffline ($a_obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData ($a_obj_ids, $a_ref_ids)
 Preload data. More...
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilObjCourseReferenceAccess.php.

Member Function Documentation

◆ _checkAccess()

ilObjCourseReferenceAccess::_checkAccess (   $a_cmd,
  $a_permission,
  $a_ref_id,
  $a_obj_id,
  $a_user_id = "" 
)

checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)

Parameters
string$a_cmdcommand (not permission!)
string$a_permissionpermission
int$a_ref_idreference id
int$a_obj_idobject id
int$a_user_iduser id (if not provided, current user is taken)
Returns
boolean true, if everything is ok

Reimplemented from ilContainerReferenceAccess.

Definition at line 41 of file class.ilObjCourseReferenceAccess.php.

42 {
43 global $DIC;
44
45 switch ($a_permission) {
46 case 'visible':
47 case 'read':
48 case 'edit_learning_progress':
49 include_once './Modules/CourseReference/classes/class.ilObjCourseReference.php';
50 $target_ref_id = ilObjCourseReference::_lookupTargetRefId($a_obj_id);
51
52 if (!$DIC->access()->checkAccessOfUser($a_user_id, $a_permission, $a_cmd, $target_ref_id)) {
53 return false;
54 }
55 break;
56 }
57
58 return true;
59 }
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
$DIC
Definition: xapitoken.php:46

References $DIC, and ilContainerReference\_lookupTargetRefId().

+ Here is the call graph for this function:

◆ _getCommands()

static ilObjCourseReferenceAccess::_getCommands (   $a_ref_id = 0)
static

Definition at line 78 of file class.ilObjCourseReferenceAccess.php.

79 {
80 global $DIC;
81
82 if ($DIC->access()->checkAccess('write', '', $a_ref_id)) {
83 // Only local (reference specific commands)
84 $commands = array(
85 array("permission" => "visible", "cmd" => "", "lang_var" => "show","default" => true),
86 array("permission" => "write", "cmd" => "editReference", "lang_var" => "edit")
87 );
88 } else {
89 include_once('./Modules/Course/classes/class.ilObjCourseAccess.php');
91 }
92 return $commands;
93 }
static _getCommands()
get commands

References $DIC, and ilObjCourseAccess\_getCommands().

+ Here is the call graph for this function:

◆ _preloadData()

static ilObjCourseReferenceAccess::_preloadData (   $a_obj_ids,
  $a_ref_ids 
)
static

Preload data.

Parameters
array$a_obj_idsarray of object ids

Reimplemented from ilObjectAccess.

Definition at line 64 of file class.ilObjCourseReferenceAccess.php.

65 {
66 global $DIC;
67
68 $repository = new ilUserCertificateRepository();
69 $coursePreload = new ilCertificateObjectsForUserPreloader($repository);
70 $coursePreload->preLoad($DIC->user()->getId(), array_map(function ($objId) {
72 }, $a_obj_ids));
73 }
static _lookupTargetId($a_obj_id)
lookup target id
$objId
Definition: xapitoken.php:41

References $DIC, $objId, and ilContainerReference\_lookupTargetId().

+ Here is the call graph for this function:

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