24 include_once
'./Services/Object/classes/class.ilObjectAccess.php';
49 array(
"permission" =>
"read",
"cmd" =>
"infoScreen",
"lang_var" =>
"info_short",
"default" =>
true),
50 array(
"permission" =>
"read",
"cmd" =>
"register",
"lang_var" =>
"join_session"),
51 array(
"permission" =>
"read",
"cmd" =>
"unregister",
"lang_var" =>
"event_unregister"),
52 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings"),
53 array(
"permission" =>
"write",
"cmd" =>
"materials",
"lang_var" =>
"crs_objective_add_mat"),
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 =
"")
77 $a_user_id = $ilUser->getId();
79 include_once
'./Modules/Session/classes/class.ilSessionParticipants.php';
85 if (!self::_lookupRegistration($a_obj_id)) {
89 if ($ilUser->isAnonymous()) {
93 if ($part->isAssigned($a_user_id)) {
97 if ($part->isSubscriber($a_user_id)) {
101 include_once
'./Modules/Session/classes/class.ilSessionWaitingList.php';
109 if (self::_lookupRegistration($a_obj_id) && $a_user_id != ANONYMOUS_USER_ID) {
110 return self::_lookupRegistered($a_user_id, $a_obj_id);
125 $t_arr = explode(
"_", $a_target);
127 if ($t_arr[0] !=
"sess" || ((
int) $t_arr[1]) <= 0) {
131 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
147 if (!is_null(self::$registrations)) {
148 return self::$registrations[$a_obj_id];
153 $query =
"SELECT registration,obj_id FROM event ";
156 self::$registrations[
$row->obj_id] = (bool)
$row->registration;
158 return self::$registrations[$a_obj_id];
172 if (isset(self::$registered[$a_usr_id])) {
173 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
178 $query =
"SELECT event_id, registered FROM event_participants WHERE usr_id = " . $ilDB->quote($ilUser->getId(),
'integer');
180 self::$registered[$a_usr_id] =
array();
182 self::$registered[$a_usr_id][
$row->event_id] = (bool)
$row->registered;
184 return (
bool) self::$registered[$a_usr_id][$a_obj_id];
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
foreach($_POST as $key=> $value) $res
static _getCommands()
get list of command/permission combinations
static _lookupRegistration($a_obj_id)
lookup registrations
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
static _checkGoto($a_target)
check whether goto script will succeed
Create styles array
The data for the language used.
static getInstance($a_ref_id)
Get instance.
static _lookupRegistered($a_usr_id, $a_obj_id)
lookup if user has registered