24 include_once
'./classes/class.ilObjectAccess.php';
50 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
51 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join_session"),
52 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
53 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit"),
54 array(
'permission' =>
'write',
'cmd' =>
'members',
'lang_var' =>
'event_edit_members')
72 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
74 global $ilUser,
$lng, $rbacsystem, $ilAccess;
76 $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
80 if(self::_lookupRegistration($a_obj_id))
87 if(self::_lookupRegistration($a_obj_id))
104 $t_arr = explode(
"_", $a_target);
106 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0)
111 if($ilAccess->checkAccess(
"read",
"", $t_arr[1]))
128 if(!is_null(self::$registrations))
130 return self::$registrations[$a_obj_id];
135 $query =
"SELECT registration,obj_id FROM event ";
139 self::$registrations[
$row->obj_id] = (bool)
$row->registration;
141 return self::$registrations[$a_obj_id];
155 if(isset(self::$registered[$a_usr_id]))
157 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
160 global
$ilDB,$ilUser;
162 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = ".$ilDB->quote($ilUser->getId(),
'integer');
164 self::$registered[$a_usr_id] = array();
167 self::$registered[$a_usr_id][
$row->event_id] = (bool)
$row->registered;
169 return (
bool) self::$registered[$a_usr_id][$a_obj_id];