ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
5include_once("./Modules/LearningModule/classes/class.ilObjContentObjectAccess.php");
6include_once './Services/AccessControl/interfaces/interface.ilConditionHandling.php';
7require_once('./Services/WebAccessChecker/interfaces/interface.ilWACCheckingClass.php');
8require_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 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?>
Class ilObjContentObjectAccess.
Class ilObjLearningModuleAccess.
static checkCondition($a_trigger_obj_id, $a_operator, $a_value, $a_usr_id)
check condition
static getConditionOperators()
Get possible conditions operators.
static _getAllReferences($a_id)
get all reference ids of object
Class ilWACPath.
Interface for condition handling.
Class ilWACCheckingClass.
canBeDelivered(ilWACPath $ilWACPath)
$ref_id
Definition: sahs_server.php:39
$results