ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilObjLearningModuleAccess.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Modules/LearningModule/classes/class.ilObjContentObjectAccess.php");
6 include_once './Services/AccessControl/interfaces/interface.ilConditionHandling.php';
7 require_once('./Services/WebAccessChecker/interfaces/interface.ilWACCheckingClass.php');
8 require_once('./Services/Object/classes/class.ilObject2.php');
9 
20 
24  public static function getConditionOperators() {
25  // currently only one mode "ilConditionHandler::OPERATOR_LP"
26  // which is automatically added by condition handling, if lp is activated
27  return array();
28  }
29 
30 
41  public static function checkCondition($a_trigger_obj_id, $a_operator, $a_value, $a_usr_id) {
42  return true;
43  }
44 
45 
58  static function _getCommands()
59  {
60  $commands = array
61  (
62  /* array("permission" => "read", "cmd" => "view", "lang_var" => "show",
63  "default" => true), */
64  array("permission" => "read", "cmd" => "continue", "lang_var" => "continue_work", "default" => true),
65  array("permission" => "write", "cmd" => "edit", "lang_var" => "edit_content"),
66  array("permission" => "write", "cmd" => "properties", "lang_var" => "settings")
67  );
68 
69  return $commands;
70  }
71 
72 
78  public function canBeDelivered(ilWACPath $ilWACPath) {
79  global $ilAccess;
83  preg_match("/lm_data\\/lm_([0-9]*)\\//ui", $ilWACPath->getPath(), $results);
85  if ($ilAccess->checkAccess('read', '', $ref_id)) {
86  return true;
87  }
88  }
89 
90  return false;
91  }
92 }
93 
94 ?>
canBeDelivered(ilWACPath $ilWACPath)
Interface for condition handling.
static getConditionOperators()
Get possible conditions operators.
Class ilWACPath.
static _getAllReferences($a_id)
Class ilObjLearningModuleAccess.
Class ilObjContentObjectAccess.
$results
Class ilWACCheckingClass.
Create styles array
The data for the language used.
$ref_id
Definition: sahs_server.php:39
static checkCondition($a_trigger_obj_id, $a_operator, $a_value, $a_usr_id)
check condition