ILIAS  release_8 Revision v8.24
ilObjRemoteLearningModuleAccess Class Reference
+ Inheritance diagram for ilObjRemoteLearningModuleAccess:
+ Collaboration diagram for ilObjRemoteLearningModuleAccess:

Public Member Functions

 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
- Public Member Functions inherited from ilObjectAccess
 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More...
 
 canBeDelivered (ilWACPath $ilWACPath)
 
 canBeDelivered (ilWACPath $ilWACPath)
 

Static Public Member Functions

static _getCommands ()
 get commands More...
 
- Static Public Member Functions inherited from ilObjectAccess
static _getCommands ()
 get commands More...
 
static _checkGoto (string $target)
 check whether goto script will succeed More...
 
static _isOffline (int $obj_id)
 Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More...
 
static _preloadData (array $obj_ids, array $ref_ids)
 Preload data. More...
 

Detailed Description

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

Definition at line 30 of file class.ilObjRemoteLearningModuleAccess.php.

Member Function Documentation

◆ _checkAccess()

ilObjRemoteLearningModuleAccess::_checkAccess ( string  $cmd,
string  $permission,
int  $ref_id,
int  $obj_id,
?int  $user_id = null 
)

checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)

Reimplemented from ilObjectAccess.

Definition at line 36 of file class.ilObjRemoteLearningModuleAccess.php.

36 : bool
37 {
38 global $ilUser, $lng, $rbacsystem, $ilAccess;
39
40 if (is_null($user_id)) {
41 $user_id = $ilUser->getId();
42 }
43
44 switch ($permission) {
45 case "visible":
47 $tutor = $rbacsystem->checkAccessOfUser($user_id, 'write', $ref_id);
48
49 if (!$active) {
50 $ilAccess->addInfoItem(ilAccessInfo::IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
51 }
52 if (!$tutor and !$active) {
53 return false;
54 }
55 break;
56
57 case 'read':
58 $tutor = $rbacsystem->checkAccessOfUser($user_id, 'write', $ref_id);
59 if ($tutor) {
60 return true;
61 }
63
64 if (!$active) {
65 $ilAccess->addInfoItem(ilAccessInfo::IL_NO_OBJECT_ACCESS, $lng->txt("offline"));
66 return false;
67 }
68 break;
69 }
70 return true;
71 }
static _lookupOnline($a_obj_id)
Lookup online.
$ilUser
Definition: imgupload.php:34
$ref_id
Definition: ltiauth.php:67
$lng

References $ilUser, $lng, $ref_id, ilObjRemoteLearningModule\_lookupOnline(), and ilAccessInfo\IL_NO_OBJECT_ACCESS.

+ Here is the call graph for this function:

◆ _getCommands()

static ilObjRemoteLearningModuleAccess::_getCommands ( )
static

get commands

this method returns an array of all possible commands/permission combinations

example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );

Reimplemented from ilObjectAccess.

Definition at line 85 of file class.ilObjRemoteLearningModuleAccess.php.

85 : array
86 {
87 $commands = array(
88 array("permission" => "read", "cmd" => "show", "lang_var" => "info",
89 "default" => true),
90 array("permission" => "write", "cmd" => "edit", "lang_var" => "edit")
91 );
92
93 return $commands;
94 }

Referenced by ilObjRemoteLearningModuleListGUI\init().

+ Here is the caller graph for this function:

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