ILIAS  trunk Revision v11.0_alpha-1862-g4e205cb56d4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilObjSurveyQuestionPoolAccess Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilObjSurveyQuestionPoolAccess:
+ Collaboration diagram for ilObjSurveyQuestionPoolAccess:

Public Member Functions

 _checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null)
 
- 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)
 

Static Public Member Functions

static _getCommands ()
 
static _checkGoto (string $target)
 
- 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 of file class.ilObjSurveyQuestionPoolAccess.php.

Member Function Documentation

◆ _checkAccess()

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

Definition at line 51 of file class.ilObjSurveyQuestionPoolAccess.php.

References $DIC, $user_id, and ilObject\_lookupObjId().

51  : bool
52  {
53  global $DIC;
54  $ilAccess = $DIC->access();
55 
56  if (in_array($permission, ["read", "visible"]) && self::_isOffline(ilObject::_lookupObjId($ref_id))) {
57  if (!$ilAccess->checkAccessOfUser($user_id, "write", "", $ref_id)) {
58  return false;
59  }
60  }
61  return true;
62  }
static _lookupObjId(int $ref_id)
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ _checkGoto()

static ilObjSurveyQuestionPoolAccess::_checkGoto ( string  $target)
static

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

References $DIC.

36  : bool
37  {
38  global $DIC;
39 
40  $ilAccess = $DIC->access();
41 
42  $t_arr = explode("_", $target);
43 
44  if ($ilAccess->checkAccess("visible", "", $t_arr[1]) ||
45  $ilAccess->checkAccess("read", "", $t_arr[1])) {
46  return true;
47  }
48  return false;
49  }
global $DIC
Definition: shib_login.php:22

◆ _getCommands()

static ilObjSurveyQuestionPoolAccess::_getCommands ( )
static

Definition at line 21 of file class.ilObjSurveyQuestionPoolAccess.php.

Referenced by ilObjSurveyQuestionPoolListGUI\init().

21  : array
22  {
23  $commands = array(
24  array("permission" => "read",
25  "cmd" => "questions",
26  "lang_var" => "edit_questions",
27  "default" => true
28  ),
29  array("permission" => "write", "cmd" => "questions", "lang_var" => "edit_questions"),
30  array("permission" => "write", "cmd" => "properties", "lang_var" => "settings")
31  );
32 
33  return $commands;
34  }
+ Here is the caller graph for this function:

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