38 public static function checkPermission($a_permission, $a_ref_id , $a_user_id = null)
40 if(is_null($a_user_id))
42 $a_user_id =
$GLOBALS[
'ilUser']->getId();
49 $a_permission ==
'read_learning_progress' ||
50 $a_permission ==
'edit_learning_progress' 53 return $GLOBALS[
'ilAccess']->checkAccessOfUser($a_user_id,
'write',
'', $a_ref_id);
55 return $GLOBALS[
'ilAccess']->checkAccessOfUser($a_user_id, $a_permission,
'', $a_ref_id);
67 public static function checkAccess($a_ref_id, $a_allow_only_read =
true)
71 if($ilUser->getId() == ANONYMOUS_USER_ID)
76 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
84 $ilAccess->checkAccess(
'write',
'',$a_ref_id)
90 if($ilAccess->checkAccess(
'read_learning_progress',
'',$a_ref_id) ||
91 $ilAccess->checkAccess(
'edit_learning_progress',
'',$a_ref_id))
101 include_once
'./Services/Object/classes/class.ilObjectLP.php';
103 if(!$olp->isActive())
108 if(!$ilAccess->checkAccess(
'read',
'',$a_ref_id))
113 if($a_allow_only_read)
static _hasLearningProgressLearner()
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
Learning progress access checks.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
static getInstance($a_obj_id)