ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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="")
 
- Public Member Functions inherited from ilContainerReferenceAccess
 _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...
 

Static Public Member Functions

static _preloadData ($a_obj_ids, $a_ref_ids)
 
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 = "" 
)

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

References $DIC, and ilContainerReference\_lookupTargetRefId().

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  }
$DIC
Definition: xapitoken.php:46
static _lookupTargetRefId($a_obj_id)
Lookup target ref_id.
+ 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.

References $DIC, and ilObjCourseAccess\_getCommands().

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');
90  $commands = ilObjCourseAccess::_getCommands();
91  }
92  return $commands;
93  }
$DIC
Definition: xapitoken.php:46
static _getCommands()
get commands
+ Here is the call graph for this function:

◆ _preloadData()

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

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

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

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  }
$objId
Definition: xapitoken.php:41
$DIC
Definition: xapitoken.php:46
static _lookupTargetId($a_obj_id)
lookup target id
+ Here is the call graph for this function:

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