24 include_once
'./Services/Object/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" =>
"settings"),
54 array(
"permission" =>
"write",
"cmd" =>
"materials",
"lang_var" =>
"crs_objective_add_mat"),
55 array(
'permission' =>
'write',
'cmd' =>
'members',
'lang_var' =>
'event_edit_members')
73 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
77 $a_user_id = $a_user_id ? $a_user_id : $ilUser->getId();
81 if(self::_lookupRegistration($a_obj_id)&& $a_user_id != ANONYMOUS_USER_ID)
88 if(self::_lookupRegistration($a_obj_id) && $a_user_id != ANONYMOUS_USER_ID)
105 $t_arr = explode(
"_", $a_target);
107 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0)
112 if($ilAccess->checkAccess(
"read",
"", $t_arr[1]))
129 if(!is_null(self::$registrations))
131 return self::$registrations[$a_obj_id];
136 $query =
"SELECT registration,obj_id FROM event ";
140 self::$registrations[
$row->obj_id] = (bool)
$row->registration;
142 return self::$registrations[$a_obj_id];
156 if(isset(self::$registered[$a_usr_id]))
158 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
163 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = ".$ilDB->quote($ilUser->getId(),
'integer');
165 self::$registered[$a_usr_id] = array();
168 self::$registered[$a_usr_id][
$row->event_id] = (bool)
$row->registered;
170 return (
bool) self::$registered[$a_usr_id][$a_obj_id];