48 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
49 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join"),
50 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
51 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit")
69 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
71 global $ilUser,
$lng, $rbacsystem, $ilAccess;
73 $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
77 if(self::_lookupRegistration($a_obj_id))
84 if(self::_lookupRegistration($a_obj_id))
101 $t_arr = explode(
"_", $a_target);
103 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0)
108 if($ilAccess->checkAccess(
"read",
"", $t_arr[1]))
125 if(!is_null(self::$registrations))
127 return self::$registrations[$a_obj_id];
132 $query =
"SELECT registration,obj_id FROM event ";
133 $res = $ilDB->query($query);
136 self::$registrations[$row->obj_id] = (bool) $row->registration;
138 return self::$registrations[$a_obj_id];
152 if(isset(self::$registered[$a_usr_id]))
154 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
157 global $ilDB,$ilUser;
159 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = ".$ilDB->quote($ilUser->getId());
160 $res = $ilDB->query($query);
161 self::$registered[$a_usr_id] = array();
164 self::$registered[$a_usr_id][$row->event_id] = (bool) $row->registered;
166 return (
bool) self::$registered[$a_usr_id][$a_obj_id];