19 declare(strict_types=0);
33 ?
int $a_user_id =
null 37 if ($a_user_id ===
null) {
38 $a_user_id = $DIC->user()->getId();
42 if ($a_permission ===
'read_learning_progress') {
43 return $DIC->access()->checkRbacOrPositionPermissionAccess(
49 return $DIC->access()->checkAccessOfUser(
62 bool $a_allow_only_read =
true 77 $DIC->access()->checkAccess(
78 'read_learning_progress',
82 $DIC->access()->checkRbacOrPositionPermissionAccess(
92 if (!$DIC->access()->checkAccess(
'read',
'', $a_ref_id)) {
96 if ($DIC->access()->checkAccess(
97 'edit_learning_progress',
108 if (!$olp->isActive()) {
112 if ($a_allow_only_read) {
static _hasLearningProgressLearner()
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
Learning progress access checks.
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static _enabledLearningProgress()
const OP_READ_LEARNING_PROGRESS
static checkPermission(string $a_permission, int $a_ref_id, ?int $a_user_id=null)
wrapper for rbac access checks
static getInstance(int $obj_id)