38 public static function checkPermission($a_permission, $a_ref_id, $a_user_id = null)
40 if (is_null($a_user_id)) {
41 $a_user_id =
$GLOBALS[
'ilUser']->getId();
45 if ($a_permission ==
'read_learning_progress') {
46 return $GLOBALS[
'DIC']->access()->checkRbacOrPositionPermissionAccess(
47 'read_learning_progress',
48 'read_learning_progress',
52 return $GLOBALS[
'ilAccess']->checkAccessOfUser($a_user_id, $a_permission,
'', $a_ref_id);
64 public static function checkAccess($a_ref_id, $a_allow_only_read =
true)
68 if ($DIC->user()->getId() == ANONYMOUS_USER_ID) {
78 $DIC->access()->checkAccess(
'read_learning_progress',
'', $a_ref_id) ||
80 $DIC->access()->checkRbacOrPositionPermissionAccess(
81 'read_learning_progress',
94 if (!$olp->isActive()) {
98 if (!$DIC->access()->checkAccess(
'read',
'', $a_ref_id)) {
102 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
const OP_READ_LEARNING_PROGRESS
static _lookupObjId($a_id)
static getInstance($a_obj_id)