ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilLearningProgressAccess Class Reference

Learning progress access checks. More...

+ Collaboration diagram for ilLearningProgressAccess:

Static Public Member Functions

static checkAccess ($a_ref_id, $a_allow_only_read=true)
 check access to learning progress More...
 

Detailed Description

Learning progress access checks.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 33 of file class.ilLearningProgressAccess.php.

Member Function Documentation

◆ checkAccess()

static ilLearningProgressAccess::checkAccess (   $a_ref_id,
  $a_allow_only_read = true 
)
static

check access to learning progress

Parameters
int$a_ref_idreference ifd of object
bool$a_allow_only_readread access is sufficient (see courses/groups)
Returns

Definition at line 43 of file class.ilLearningProgressAccess.php.

References $ilUser, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_hasLearningProgressLearner(), ilObject\_lookupObjId(), and ilObjectLP\getInstance().

Referenced by ilObjContentObjectGUI\addTabs(), ilLMExplorerGUI\checkLPIcon(), ilLearningProgressGUI\editManual(), ilObjFolderGUI\getTabs(), ilObjSAHSLearningModuleGUI\getTabs(), ilObjFileBasedLMGUI\getTabs(), ilObjExerciseGUI\getTabs(), ilObjSessionGUI\getTabs(), ilObjGroupGUI\getTabs(), ilObjCourseGUI\getTabs(), ilObjTestGUI\getTabs(), ilObjSCORMLearningModuleGUI\offlineModeManager(), ilObjContentObjectGUI\setilLMMenu(), ilSAHSPresentationGUI\setInfoTabs(), and ilLearningProgressGUI\updateManual().

44  {
45  global $ilUser,$ilAccess;
46 
47  if($ilUser->getId() == ANONYMOUS_USER_ID)
48  {
49  return false;
50  }
51 
52  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
54  {
55  return false;
56  }
57 
58  if($ilAccess->checkAccess('read_learning_progress','',$a_ref_id) ||
59  $ilAccess->checkAccess('edit_learning_progress','',$a_ref_id))
60  {
61  return true;
62  }
63 
65  {
66  return false;
67  }
68 
69  include_once './Services/Object/classes/class.ilObjectLP.php';
71  if(!$olp->isActive())
72  {
73  return false;
74  }
75 
76  if(!$ilAccess->checkAccess('read','',$a_ref_id))
77  {
78  return false;
79  }
80 
81  if($a_allow_only_read)
82  {
83  return true;
84  }
85 
86  return false;
87  }
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _lookupObjId($a_id)
global $ilUser
Definition: imgupload.php:15
static getInstance($a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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