5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
30 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
37 $a_user_id = $ilUser->getId();
44 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
47 $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt(
"info_is_member"));
51 $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt(
"info_is_not_member"));
57 if(!self::_registrationEnabled($a_obj_id))
62 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
68 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
78 if($a_permission ==
'leave')
80 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
87 if($a_permission ==
'join')
89 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
99 switch ($a_permission)
121 $commands[] = array(
"permission" =>
"grp_linked",
"cmd" =>
"",
"lang_var" =>
"show",
"default" =>
true);
123 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
127 'permission' =>
'read',
128 'cmd' =>
'fileManagerLaunch',
129 'lang_var' =>
'fm_start',
130 'enable_anonymous' =>
false
134 $commands[] = array(
"permission" =>
"join",
"cmd" =>
"join",
"lang_var" =>
"join");
137 $commands[] = array(
'permission' =>
"join",
"cmd" =>
"leave",
"lang_var" =>
"leave_waiting_list");
140 $commands[] = array(
'permission' =>
"leave",
"cmd" =>
"leave",
"lang_var" =>
"grp_btn_unsubscribe");
142 include_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
145 include_once
'./Services/WebDAV/classes/class.ilDAVUtils.php';
148 $commands[] = array(
'permission' =>
'read',
'cmd' =>
'showPasswordInstruction',
'lang_var' =>
'mount_webfolder',
'enable_anonymous' =>
'false');
152 $commands[] = array(
"permission" =>
"read",
"cmd" =>
"mount_webfolder",
"lang_var" =>
"mount_webfolder",
"enable_anonymous" =>
"false");
156 $commands[] = array(
"permission" =>
"write",
"cmd" =>
"enableAdministrationPanel",
"lang_var" =>
"edit_content");
157 $commands[] = array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings");
169 $t_arr = explode(
"_", $a_target);
171 if(substr($t_arr[2],0,5) ==
'rcode' and $ilUser->getId() != ANONYMOUS_USER_ID)
173 self::$using_code =
true;
177 if ($t_arr[0] !=
"grp" || ((
int) $t_arr[1]) <= 0)
182 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
183 $ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
199 $query =
"SELECT * FROM grp_settings ".
200 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";
204 $enabled = $unlimited =
false;
207 $enabled =
$row->registration_enabled;
208 $unlimited =
$row->registration_unlimited;
209 $start =
$row->registration_start;
210 $end =
$row->registration_end;
243 include_once(
"./Modules/Group/classes/class.ilGroupWaitingList.php");
259 $query =
'SELECT registration_type, registration_enabled, registration_unlimited, registration_start, '.
260 'registration_end, registration_mem_limit, registration_max_members FROM grp_settings '.
261 'WHERE obj_id = '.$ilDB->quote($a_obj_id);
269 $info[
'reg_info_type'] =
$row->registration_type;
270 $info[
'reg_info_max_members'] =
$row->registration_max_members;
271 $info[
'reg_info_mem_limit'] =
$row->registration_mem_limit;
272 $info[
'reg_info_unlimited'] =
$row->registration_unlimited;
274 $info[
'reg_info_max_members'] = 0;
275 if($info[
'reg_info_mem_limit'])
277 $info[
'reg_info_max_members'] =
$row->registration_max_members;
280 $info[
'reg_info_enabled'] =
$row->registration_enabled;
283 $registration_possible = $info[
'reg_info_enabled'];
286 if(!$info[
'reg_info_unlimited'] && $registration_possible)
291 $info[
'reg_info_list_prop'][
'property'] = $lng->txt(
'grp_list_reg_start');
296 $info[
'reg_info_list_prop'][
'property'] = $lng->txt(
'grp_list_reg_end');
301 $registration_possible =
false;
302 $info[
'reg_info_list_prop'][
'property'] = $lng->txt(
'grp_list_reg_period');
303 $info[
'reg_info_list_prop'][
'value'] = $lng->txt(
'grp_list_reg_noreg');
309 if (!$registration_possible)
311 $registration_possible =
false;
312 $info[
'reg_info_list_prop'][
'property'] = $lng->txt(
'grp_list_reg_period');
313 $info[
'reg_info_list_prop'][
'value'] = $lng->txt(
'grp_list_reg_noreg');
317 if($info[
'reg_info_mem_limit'] && $registration_possible)
324 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
326 if($part->getCountMembers() <= $info[
'reg_info_max_members'])
328 $info[
'reg_info_list_prop_limit'][
'property'] = $lng->txt(
'grp_list_reg_limit_places');
329 $info[
'reg_info_list_prop_limit'][
'value'] = max(
331 $info[
'reg_info_max_members'] - $part->getCountMembers()
336 $info[
'reg_info_list_prop_limit'][
'property'] =
'';
337 $info[
'reg_info_list_prop_limit'][
'value'] = $lng->txt(
'grp_list_reg_limit_full');