5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
29 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
36 $a_user_id = $ilUser->getId();
43 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
46 $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt(
"info_is_member"));
50 $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt(
"info_is_not_member"));
56 if(!self::_registrationEnabled($a_obj_id))
61 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
67 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
77 if($a_permission ==
'leave')
79 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
86 if($a_permission ==
'join')
88 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
98 switch ($a_permission)
120 $commands[] = array(
"permission" =>
"grp_linked",
"cmd" =>
"",
"lang_var" =>
"show",
"default" =>
true);
122 include_once
'./Services/WebServices/FileManager/classes/class.ilFMSettings.php';
126 'permission' =>
'read',
127 'cmd' =>
'fileManagerLaunch',
128 'lang_var' =>
'fm_start',
129 'enable_anonymous' =>
false
133 $commands[] = array(
"permission" =>
"join",
"cmd" =>
"join",
"lang_var" =>
"join");
136 $commands[] = array(
'permission' =>
"join",
"cmd" =>
"leave",
"lang_var" =>
"leave_waiting_list");
139 $commands[] = array(
'permission' =>
"leave",
"cmd" =>
"leave",
"lang_var" =>
"grp_btn_unsubscribe");
141 include_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
144 include_once
'./Services/WebDAV/classes/class.ilDAVUtils.php';
147 $commands[] = array(
'permission' =>
'read',
'cmd' =>
'showPasswordInstruction',
'lang_var' =>
'mount_webfolder',
'enable_anonymous' =>
'false');
151 $commands[] = array(
"permission" =>
"read",
"cmd" =>
"mount_webfolder",
"lang_var" =>
"mount_webfolder",
"enable_anonymous" =>
"false");
155 $commands[] = array(
"permission" =>
"write",
"cmd" =>
"enableAdministrationPanel",
"lang_var" =>
"edit_content");
156 $commands[] = array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"settings");
169 if(substr($t_arr[2],0,5) ==
'rcode' and $ilUser->getId() != ANONYMOUS_USER_ID)
175 $t_arr = explode(
"_", $a_target);
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');