5 include_once
"./Services/Container/classes/class.ilContainerGUI.php";
6 include_once(
'./Modules/Group/classes/class.ilObjGroup.php');
31 public function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output =
false)
34 $this->
ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
36 $this->lng->loadLanguageModule(
'grp');
43 $next_class = $this->ctrl->getNextClass($this);
44 $cmd = $this->ctrl->getCmd();
52 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
54 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
55 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
"grp");
60 case 'ilgroupregistrationgui':
61 $this->ctrl->setReturn($this,
'');
62 $this->tabs_gui->setTabActive(
'join');
63 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
65 $this->ctrl->forwardCommand($registration);
68 case 'ilpermissiongui':
69 $this->tabs_gui->setTabActive(
'perm_settings');
70 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
72 $ret =& $this->ctrl->forwardCommand($perm_gui);
75 case 'ilrepositorysearchgui':
76 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
78 $rep_search->setCallback($this,
86 $this->tabs_gui->setTabActive(
'members');
87 $this->ctrl->setReturn($this,
'members');
88 $ret =& $this->ctrl->forwardCommand($rep_search);
90 $this->tabs_gui->setSubTabActive(
'members');
93 case "ilinfoscreengui":
97 case "illearningprogressgui":
98 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
101 $this->object->getRefId(),
102 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
103 $this->ctrl->forwardCommand($new_gui);
104 $this->tabs_gui->setTabActive(
'learning_progress');
107 case 'ilobjcoursegroupinggui':
110 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
111 $this->ctrl->setReturn($this,
'edit');
113 $this->ctrl->forwardCommand($crs_grp_gui);
115 $this->tabs_gui->setTabActive(
'settings');
116 $this->tabs_gui->setSubTabActive(
'groupings');
119 case 'ilcoursecontentgui':
121 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
123 $this->ctrl->forwardCommand($course_content_obj);
126 case 'ilpublicuserprofilegui':
127 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
129 $this->tabs_gui->setTabActive(
'group_members');
130 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
132 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
133 $html = $this->ctrl->forwardCommand($profile_gui);
134 $this->tpl->setVariable(
"ADM_CONTENT", $html);
138 $this->tabs_gui->setTabActive(
'none');
140 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
141 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
147 case "ilcontainerpagegui":
151 $this->tpl->setContent(
$ret);
155 case 'ilobjectcopygui':
156 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
159 $this->ctrl->forwardCommand($cp);
162 case "ilobjstylesheetgui":
166 case 'ilobjectcustomuserfieldsgui':
167 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
170 $this->tabs_gui->setTabActive(
'settings');
171 $this->ctrl->forwardCommand($cdf_gui);
174 case 'ilmemberagreementgui':
175 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
176 $this->ctrl->setReturn($this,
'');
177 $this->tabs_gui->setTabActive(
'view_content');
179 $this->ctrl->forwardCommand($agreement);
183 $this->tabs_gui->setTabActive(
'export');
184 include_once
'./Services/Export/classes/class.ilExportGUI.php';
186 $exp->addFormat(
'xml');
187 $this->ctrl->forwardCommand($exp);
190 case 'ilmemberexportgui':
191 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
194 $this->tabs_gui->setTabActive(
'members');
195 $this->tabs_gui->setSubTabActive(
'export_members');
197 $this->ctrl->forwardCommand($export);
200 case "ilcommonactiondispatchergui":
201 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
203 $this->ctrl->forwardCommand($gui);
206 case 'ilobjectservicesettingsgui':
207 $this->ctrl->setReturn($this,
'edit');
209 $this->tabs_gui->activateTab(
'settings');
210 $this->tabs_gui->activateSubTab(
'tool_settings');
212 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
215 $this->object->getId(),
219 $this->ctrl->forwardCommand($service);
222 case 'ilsessionoverviewgui':
224 $this->tabs_gui->setTabActive(
'members');
225 $this->tabs_gui->setSubTabActive(
'events');
227 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
230 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
232 $this->ctrl->forwardCommand($overview);
238 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
240 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
244 if(
$cmd ==
'infoScreenGoto')
246 if($this->object->isRegistrationEnabled())
258 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
262 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
264 $this->ctrl->redirect($this,
"infoScreen");
268 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
269 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
288 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
290 $this->
object->getRefId(),
'grp');
292 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
300 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
301 $this->tabs_gui->setTabActive(
'view_content');
302 $this->ctrl->setReturn($this,
'view');
304 $this->ctrl->setCmdClass(get_class($agreement));
305 $this->ctrl->forwardCommand($agreement);
309 $this->tabs_gui->setTabActive(
'view_content');
320 $ilTabs->activateTab(
"view_content");
334 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
336 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
337 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
341 $this->object->getRefId());
347 if(!is_object($this->
object))
388 $ilErr->setMessage(
'');
390 if(!$this->object->validate())
392 $err = $this->lng->txt(
'err_check_input');
394 $err = $ilErr->getMessage();
400 $this->
object->create();
402 $this->
object->initGroupStatus($this->object->getGroupType());
407 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'crs') ||
408 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'grp')
414 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
421 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
424 $members_obj->updateNotification($ilUser->getId(),1);
428 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
429 $this->ctrl->redirect($this,
"edit");
444 $this->tabs_gui->setTabActive(
'settings');
445 $this->tabs_gui->setSubTabActive(
'grp_settings');
447 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
448 if(
$_GET[
'group_type_changed'])
450 $this->ctrl->clearParameters($this);
451 $this->tpl->setVariable(
'GRP_FORMACTION',$this->ctrl->getFormAction($this));
452 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_S',$this->lng->txt(
'grp_change_type'));
453 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_C',$this->lng->txt(
'cancel'));
454 $this->
initForm(
'update_group_type');
460 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
472 $type = $this->
object->getGroupType() ?
473 $this->
object->getGroupType() :
474 $this->
object->readGroupStatus();
484 $this->
object->updateGroupType();
485 $this->
object->update();
487 $this->ctrl->redirect($this,
'edit');
504 $this->form->checkInput();
506 $old_type = $this->
object->getGroupType();
509 $ilErr->setMessage(
'');
511 if(!$this->object->validate())
513 $err = $this->lng->txt(
'err_check_input');
515 $err = $ilErr->getMessage();
522 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
525 $this->
object->setGroupType($old_type);
528 $this->
object->update();
531 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
533 $this->object->getId(),
544 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
550 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
557 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
559 $ecs->handleSettingsUpdate();
563 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
566 $confirm->setFormAction($this->ctrl->getFormAction($this));
569 $this->object->getGroupType(),
570 $this->lng->txt(
'grp_info_new_grp_type').
': '.($this->
object->getGroupType() ==
GRP_TYPE_CLOSED ? $this->lng->txt(
'il_grp_status_open') : $this->lng->txt(
'il_grp_status_closed'))
572 $confirm->addButton($this->lng->txt(
'grp_change_type'),
'updateGroupType');
573 $confirm->setCancel($this->lng->txt(
'cancel'),
'edit');
575 $this->tpl->setContent($confirm->getHTML());
581 $this->ctrl->redirect($this,
'edit');
596 $this->tabs_gui->setTabActive(
'settings');
597 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
604 $tpl->setContent($a_form->getHTML());
609 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
611 $form->setFormAction($this->ctrl->getFormAction($this));
616 $form->addCommandButton(
'updateGroupIcons', $this->lng->txt(
'save'));
632 if($form->checkInput())
635 if ($this->ilias->getSetting(
"custom_icons"))
637 if(
$_POST[
"cont_big_icon_delete"])
639 $this->
object->removeBigIcon();
641 if(
$_POST[
"cont_small_icon_delete"])
643 $this->
object->removeSmallIcon();
645 if(
$_POST[
"cont_tiny_icon_delete"])
647 $this->
object->removeTinyIcon();
649 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
650 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
654 $this->ctrl->redirect($this,
"editGroupIcons");
657 $form->setValuesByPost();
669 $this->tabs_gui->setTabActive(
'settings');
670 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
672 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
674 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
679 $latitude = $this->
object->getLatitude();
680 $longitude = $this->
object->getLongitude();
681 $zoom = $this->
object->getLocationZoom();
684 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
687 $latitude = $def[
"latitude"];
688 $longitude = $def[
"longitude"];
689 $zoom = $def[
"zoom"];
696 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
698 $form->setFormAction($ilCtrl->getFormAction($this));
700 $form->setTitle($this->lng->txt(
"grp_map_settings"));
706 $public->setChecked($this->object->getEnableGroupMap());
707 $form->addItem($public);
713 $loc_prop->setLongitude($longitude);
714 $loc_prop->setZoom($zoom);
715 $form->addItem($loc_prop);
717 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
719 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
730 $this->
object->update();
732 $ilCtrl->redirect($this,
"editMapSettings");
743 $this->tabs_gui->setTabActive(
'members');
745 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
751 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
753 $map->setMapId(
"group_map");
754 $map->setWidth(
"700px");
755 $map->setHeight(
"500px");
756 $map->setLatitude($this->object->getLatitude());
757 $map->setLongitude($this->object->getLongitude());
758 $map->setZoom($this->object->getLocationZoom());
759 $map->setEnableTypeControl(
true);
760 $map->setEnableNavigationControl(
true);
761 $map->setEnableCentralMarker(
true);
764 $member_ids = $this->
object->getGroupMemberIds();
765 $admin_ids = $this->
object->getGroupAdminIds();
768 $members = $this->
object->getGroupMemberData($member_ids);
769 foreach($member_ids as $user_id)
771 $map->addUserMarker($user_id);
773 $tpl->setContent($map->getHTML());
774 $tpl->setLeftContent($map->getUserListHTML());
791 $this->tabs_gui->setTabActive(
'settings');
792 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
795 $this->tpl->setContent($this->form->getHTML());
806 if(is_object($this->form))
811 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
813 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
814 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
815 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
816 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
819 $area->
setInfo($this->lng->txt(
'grp_information_info'));
820 $area->setValue($this->object->getInformation());
823 $this->form->addItem($area);
837 $this->
object->update();
852 global $rbacsystem, $ilAccess,
$ilUser;
854 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
856 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
859 $this->tabs_gui->setTabActive(
'members');
861 $member_ids = $this->
object->getGroupMemberIds();
862 $admin_ids = $this->
object->getGroupAdminIds();
865 $members = $this->
object->getGroupMemberData($member_ids);
870 $ordered_members = array();
872 foreach($members as $member)
880 if(!$usr_obj->getActive())
888 array_push($ordered_members,array(
"id" => $member[
"id"],
889 "login" => $usr_obj->getLogin(),
890 "lastname" => $usr_obj->getLastName(),
891 "firstname" => $usr_obj->getFirstName(),
892 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
893 "usr_obj" => $usr_obj));
898 foreach($ordered_members as $member) {
900 $usr_obj = $member[
"usr_obj"];
902 $public_profile = $usr_obj->getPref(
"public_profile");
903 if ($public_profile ==
"g")
905 $public_profile =
"y";
909 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
910 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
913 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
915 switch(in_array($member[
"id"],$admin_ids))
919 if ($public_profile ==
"y")
921 $this->tpl->setCurrentBlock(
"member_linked");
922 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
923 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
924 $this->tpl->parseCurrentBlock();
928 $this->tpl->setCurrentBlock(
"member_not_linked");
929 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
930 $this->tpl->parseCurrentBlock();
932 $this->tpl->setCurrentBlock(
"member");
936 if ($public_profile ==
"y")
938 $this->tpl->setCurrentBlock(
"member_linked");
939 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
940 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
941 $this->tpl->parseCurrentBlock();
945 $this->tpl->setCurrentBlock(
"member_not_linked");
946 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
947 $this->tpl->parseCurrentBlock();
949 $this->tpl->setCurrentBlock(
"member");
953 if (in_array($member[
"id"],$admin_ids)) {
954 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Admin");
957 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Member");
962 if ($public_profile ==
"y")
964 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
965 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
967 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
968 $this->tpl->parseCurrentBlock();
970 $this->tpl->setCurrentBlock(
"members");
972 $this->tpl->parseCurrentBlock();
975 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
982 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
985 if($this->show_tracking)
987 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
993 if($privacy->enabledGroupAccessTimes())
995 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
999 $do_prtf = (is_array($selected_columns) &&
1000 in_array(
'prtf', $selected_columns) &&
1004 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
1006 $this->ctrl->getLinkTarget($this,
"members"));
1012 $tmp_data[
'firstname'] = $name[
'firstname'];
1013 $tmp_data[
'lastname'] = $name[
'lastname'];
1015 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
1016 $tmp_data[
'usr_id'] =
$usr_id;
1019 if($this->show_tracking)
1021 if(in_array($usr_id,$completed))
1025 elseif(in_array($usr_id,$in_progress))
1029 elseif(in_array($usr_id,
$failed))
1039 if($privacy->enabledGroupAccessTimes())
1041 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
1045 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
1049 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1050 $tmp_data[
'access_time_unix'] = 0;
1056 $tmp_data[
'prtf'] = $all_prtf[
$usr_id];
1059 $members[
$usr_id] = $tmp_data;
1061 return $members ? $members : array();
1074 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1075 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
1079 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1082 if($this->show_tracking)
1084 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1086 $this->show_tracking = $olp->isActive();
1092 $this->tabs_gui->setTabActive(
'members');
1093 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1095 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1096 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1099 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
1104 'auto_complete_name' => $lng->txt(
'user'),
1105 'user_type' => array(
1109 'submit_name' => $lng->txt(
'add')
1114 $ilToolbar->addSeparator();
1117 $ilToolbar->addButton($this->lng->txt(
"grp_search_users"),
1118 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1120 $ilToolbar->addSeparator();
1123 $ilToolbar->addButton($this->lng->txt(
"grp_print_list"),
1124 $this->ctrl->getLinkTarget($this,
'printMembers'));
1130 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1132 if(count($wait = $waiting_list->getAllUsers()))
1134 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1135 if($ilUser->getPref(
'grp_wait_hide'))
1138 $this->ctrl->setParameter($this,
'wait_hide',0);
1139 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1140 $this->lng->txt(
'show'),
1143 $this->ctrl->clearParameters($this);
1148 $this->ctrl->setParameter($this,
'wait_hide',1);
1149 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1150 $this->lng->txt(
'hide'),
1153 $this->ctrl->clearParameters($this);
1155 $table_gui->setUsers($wait);
1156 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.png',$this->lng->txt(
'group_new_registrations'));
1157 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1162 if($part->getSubscribers())
1164 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1165 if($ilUser->getPref(
'grp_subscriber_hide'))
1168 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1169 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1170 $this->lng->txt(
'show'),
1173 $this->ctrl->clearParameters($this);
1178 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1179 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1180 $this->lng->txt(
'hide'),
1183 $this->ctrl->clearParameters($this);
1185 $table_gui->readSubscriberData();
1186 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.png',$this->lng->txt(
'group_new_registrations'));
1187 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1190 if(count($part->getAdmins()))
1192 if($ilUser->getPref(
'grp_admin_hide'))
1195 $this->ctrl->setParameter($this,
'admin_hide',0);
1196 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1197 $this->lng->txt(
'show'),
1200 $this->ctrl->clearParameters($this);
1205 $this->ctrl->setParameter($this,
'admin_hide',1);
1206 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1207 $this->lng->txt(
'hide'),
1210 $this->ctrl->clearParameters($this);
1212 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.png',$this->lng->txt(
'grp_admins'));
1214 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1217 if(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1219 if($ilUser->getPref(
'grp_member_hide'))
1222 $this->ctrl->setParameter($this,
'member_hide',0);
1224 $this->lng->txt(
'show'),
1227 $this->ctrl->clearParameters($this);
1232 $this->ctrl->setParameter($this,
'member_hide',1);
1234 $this->lng->txt(
'hide'),
1237 $this->ctrl->clearParameters($this);
1240 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.png',$this->lng->txt(
'grp_members'));
1241 $table_gui->parse($this->
readMemberData(
$GLOBALS[
'rbacreview']->assignedUsers($this->object->getDefaultMemberRole()),
1242 null, $table_gui->getSelectedColumns()));
1243 $this->tpl->setCurrentBlock(
'member_block');
1244 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1245 $this->tpl->parseCurrentBlock();
1251 if(!(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1255 if($ilUser->getPref(
'grp_role_hide'.$role_id))
1258 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,0);
1259 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1260 $this->lng->txt(
'show'),
1263 $this->ctrl->clearParameters($this);
1268 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,1);
1269 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1270 $this->lng->txt(
'hide'),
1273 $this->ctrl->clearParameters($this);
1278 $this->tpl->setCurrentBlock(
'member_block');
1279 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1280 $this->tpl->parseCurrentBlock();
1283 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1284 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1285 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1286 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1303 if(!count(
$_POST[
'subscribers']))
1310 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1313 $this->
object->members_obj->sendNotification(
1319 $this->
object->members_obj->deleteSubscriber($usr_id);
1321 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1325 $this->ctrl->redirect($this,
'members');
1341 if(!count(
$_POST[
'subscribers']))
1348 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1351 $this->
object->members_obj->sendNotification(
1355 $this->
object->members_obj->deleteSubscriber($usr_id);
1374 if(!count(
$_POST[
"waiting"]))
1381 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1384 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1387 foreach(
$_POST[
"waiting"] as $user_id)
1393 if($this->object->members_obj->isAssigned($user_id))
1398 $this->
object->members_obj->sendNotification(
1404 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1419 $this->searchObject();
1435 if(!count(
$_POST[
'waiting']))
1442 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1445 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1446 foreach(
$_POST[
"waiting"] as $user_id)
1449 $this->
object->members_obj->sendNotification(
1469 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1471 if(!count($participants_to_delete))
1481 $admins_after = (array) array_diff($admins, $participants_to_delete);
1482 if(!count($admins_after) and count($admins))
1490 $this->tabs_gui->setTabActive(
'members');
1491 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1493 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1495 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1496 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1497 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1498 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1500 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles'])) as $participants)
1502 $confirm->addItem(
'participants[]',
1503 $participants[
'usr_id'],
1504 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1508 $this->tpl->setContent($confirm->getHTML());
1522 if(!count(
$_POST[
'participants']))
1529 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1532 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1533 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1534 foreach(
$_POST[
'participants'] as $part)
1536 $this->
object->members_obj->sendNotification(
1558 if(isset(
$_GET[
'member_id']))
1560 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1564 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1565 (array) $_POST[
'members'],
1566 (array) $_POST[
'roles'],
1567 (array) $_POST[
'waiting'],
1568 (array) $_POST[
'subscribers']));
1570 if (!count(
$_POST[
'participants']))
1581 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1586 array(
'type' =>
'new',
'rcp_to' => implode(
',',$rcps),
'sig' => $this->
createMailSignature())));
1600 if(isset(
$_GET[
'admin_hide']))
1602 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1604 if(isset(
$_GET[
'member_hide']))
1606 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1608 if(isset(
$_GET[
'subscriber_hide']))
1610 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1612 if(isset(
$_GET[
'wait_hide']))
1614 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1625 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1639 $post_participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1641 $participants = array_intersect((array) $post_participants, (array) $real_participants);
1643 if(!count($participants))
1651 $this->tabs_gui->setTabActive(
'members');
1652 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1654 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1656 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.png',$this->lng->txt(
'grp_mem_change_status'));
1659 $this->tpl->setContent($table_gui->getHTML());
1674 if(!count(
$_POST[
'participants']))
1683 $admin_role = $this->
object->getDefaultAdminRole();
1686 if(!isset(
$_POST[
'roles'][$admin_id]))
1691 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1701 $_POST[
'members'] = $_POST[
'participants'];
1706 $admin_role = $this->
object->getDefaultAdminRole();
1708 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1712 $notification =
false;
1713 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1715 $notification =
true;
1717 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1719 $notification =
true;
1723 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1726 $this->
object->members_obj->updateNotification($usr_id,0);
1728 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1730 $this->
object->members_obj->updateNotification($usr_id,1);
1735 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1736 $this->
object->members_obj->sendNotification(
1758 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1759 foreach($this->object->members_obj->getAdmins() as $admin_id)
1761 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1799 if($part->isLastAdmin($ilUser->getId()))
1806 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1808 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1810 $cgui->setHeaderText($this->lng->txt(
'grp_dismiss_myself'));
1811 $cgui->setFormAction($this->ctrl->getFormAction($this));
1812 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1813 $cgui->setConfirm($this->lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
1814 $this->tpl->setContent($cgui->getHTML());
1829 $this->
object->members_obj->delete($ilUser->getId());
1831 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1832 $this->
object->members_obj->sendNotification(
1836 $this->
object->members_obj->sendNotification(
1841 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1845 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
1846 $tree->getParentId($this->object->getRefId()));
1847 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1857 $user_ids =
$_POST[
"id"];
1859 if (empty($user_ids[0]))
1862 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1865 foreach ($user_ids as $new_member)
1867 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1869 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1876 $this->ctrl->redirect($this,
'members');
1885 if (empty($user_ids[0]))
1887 $GLOBALS[
'lng']->loadLanguageModule(
'search');
1892 foreach ($user_ids as $new_member)
1897 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1899 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1904 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1906 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1913 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1914 $this->
object->members_obj->sendNotification(
1919 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1924 unset(
$_SESSION[
'grp_usr_search_result']);
1927 $this->ctrl->redirect($this,
'members');
1935 global $rbacreview, $ilObjDataCache,
$ilias;
1936 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1938 $this->lng->loadLanguageModule(
'mail');
1939 if(!isset(
$_GET[
'returned_from_mail']))
1944 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1948 $this->tabs_gui->setTabActive(
'members');
1950 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1953 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1954 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1957 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1958 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1959 $role_addrs = array();
1962 $sorted_role_ids = array();
1964 foreach($role_ids as $role_id)
1969 $sorted_role_ids[1] = $role_id;
1973 $sorted_role_ids[0] = $role_id;
1977 $sorted_role_ids[$counter++] = $role_id;
1981 ksort($sorted_role_ids,SORT_NUMERIC);
1982 foreach ((array) $sorted_role_ids as $role_id)
1984 $this->tpl->setCurrentBlock(
"mailbox_row");
1985 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1989 if(count($ids_for_role_title) >= 2)
1991 $ilias->setSetting(
'pear_mail_enable', 1);
1995 htmlspecialchars($role_addr)
1998 if (ilMail::_usePearMail() && substr($role_addr, 0, 4) !=
'#il_')
2001 $this->tpl->setVariable(
"MAILBOX",$role_addr);
2008 $this->tpl->parseCurrentBlock();
2018 $user_ids =
$_POST[
"user_id"];
2020 if (empty($user_ids[0]))
2022 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
2024 include_once
'Services/Mail/classes/class.ilMail.php';
2027 foreach ($user_ids as $new_member)
2029 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
2031 $this->
object->deleteApplicationListEntry($new_member);
2032 $mail->sendMail($user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
2036 $this->ctrl->redirect($this,
'members');
2042 global $rbacsystem,
$ilUser, $ilAccess,
$lng, $ilHelp;
2044 $ilHelp->setScreenIdComponent(
"grp");
2046 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2048 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2049 $this->ctrl->getLinkTarget($this,
""));
2051 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2053 $tabs_gui->addTarget(
"info_short",
2054 $this->ctrl->getLinkTargetByClass(
2055 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2061 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2063 $tabs_gui->addTarget(
"settings",
2064 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2072 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2073 if($mem_cmd !=
"membersGallery" || $is_participant)
2075 $tabs_gui->addTarget(
"members",
2076 $this->ctrl->getLinkTarget($this, $mem_cmd),
2082 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2085 $tabs_gui->addTarget(
'learning_progress',
2086 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2088 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2092 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2094 $tabs_gui->addTarget(
2096 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2116 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2117 !$this->object->members_obj->isAssigned($ilUser->getId()))
2119 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2124 $this->lng->txt(
'membership_leave'),
2125 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2132 $tabs_gui->addTarget(
"join",
2133 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2138 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2139 $this->object->members_obj->isMember($ilUser->getId()))
2141 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2142 $this->ctrl->getLinkTarget($this,
"leave"),
2152 if(!is_array($_FILES[
'xmldoc']))
2159 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2163 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2180 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html",
2182 $this->tpl->setCurrentBlock(
"adm_content");
2183 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2184 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2185 $this->tpl->parseCurrentBlock();
2196 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2197 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2199 $workbook = $adapter->getWorkbook();
2201 $format_bold =& $workbook->addFormat();
2202 $format_bold->setBold();
2203 $format_percent =& $workbook->addFormat();
2204 $format_percent->setNumFormat(
"0.00%");
2205 $format_datetime =& $workbook->addFormat();
2206 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2207 $format_title =& $workbook->addFormat();
2208 $format_title->setBold();
2209 $format_title->setColor(
'black');
2210 $format_title->setPattern(1);
2211 $format_title->setFgColor(
'silver');
2212 $worksheet =& $workbook->addWorksheet();
2214 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2215 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2216 "fax",
"matriculation");
2217 foreach ($profile_data as
$data)
2219 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2221 $member_ids = $this->
object->getGroupMemberIds();
2223 foreach ($member_ids as $member_id)
2226 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2227 if ($member->getPref(
"public_email")==
"y")
2229 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2235 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2236 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2237 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2238 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2239 if ($member->getPref(
"public_institution")==
"y")
2241 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2247 if ($member->getPref(
"public_department")==
"y")
2249 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2255 if ($member->getPref(
"public_street")==
"y")
2257 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2263 if ($member->getPref(
"public_zip")==
"y")
2265 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2271 if ($member->getPref(
"public_city")==
"y")
2273 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2279 if ($member->getPref(
"public_country")==
"y")
2281 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2287 if ($member->getPref(
"public_phone_office")==
"y")
2289 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2295 if ($member->getPref(
"public_phone_home")==
"y")
2297 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2303 if ($member->getPref(
"public_phone_mobile")==
"y")
2305 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2311 if ($member->getPref(
"public_fax")==
"y")
2313 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2319 if ($member->getPref(
"public_matriculation")==
"y")
2321 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2342 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2357 $this->ctrl->setCmd(
"showSummary");
2358 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2369 $this->tabs_gui->setTabActive(
'info_short');
2371 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2373 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2376 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2379 if(strlen($this->object->getInformation()))
2381 $info->addSection($this->lng->txt(
'grp_general_informations'));
2382 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2386 $info->enablePrivateNotes();
2387 $info->enableLearningProgress(
true);
2389 $info->addSection($this->lng->txt(
'group_registration'));
2390 $info->showLDAPRoleGroupMappingInfo();
2392 if(!$this->object->isRegistrationEnabled())
2394 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2395 $this->lng->txt(
'grp_reg_deac_info_screen'));
2400 switch($this->object->getRegistrationType())
2403 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2404 $this->lng->txt(
'grp_reg_direct_info_screen'));
2408 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2409 $this->lng->txt(
'grp_reg_req_info_screen'));
2413 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2414 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2424 if($this->object->isRegistrationUnlimited())
2426 $info->addProperty($this->lng->txt(
'group_registration_time'),
2427 $this->lng->txt(
'grp_registration_unlimited'));
2429 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2431 $info->addProperty($this->lng->txt(
"group_registration_time"),
2432 $this->lng->txt(
'cal_until').
' '.
2435 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2437 $info->addProperty($this->lng->txt(
"group_registration_time"),
2438 $this->lng->txt(
'cal_from').
' '.
2441 if ($this->object->isMembershipLimited())
2443 $info->addProperty($this->lng->txt(
"mem_free_places"),
2444 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2451 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2454 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2457 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2461 $this->lng->loadLanguageModule(
'ps');
2462 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2463 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2467 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2473 $this->ctrl->forwardCommand($info);
2483 $ilUser->setPref(
"grpcrs_ntf_".$this->ref_id, (
bool)
$_REQUEST[
"grp_ntf"]);
2484 $ilUser->writePrefs();
2487 $this->ctrl->redirect($this,
"infoScreen");
2497 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2498 if(substr($a_add,0,5) ==
'rcode')
2500 if($ilUser->getId() == ANONYMOUS_USER_ID)
2504 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2505 $ilUser->getCurrentLanguage()
2517 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2522 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2529 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2535 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2543 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2558 if(is_object($this->form))
2563 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2569 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2573 $this->form->setTableWidth(
'600px');
2574 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2581 $title->setValue($this->object->getTitle());
2584 $title->setRequired(
true);
2585 $this->form->addItem($title);
2589 $desc->
setValue($this->object->getLongDescription());
2592 $this->form->addItem($desc);
2597 if($a_mode ==
'edit')
2599 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2603 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2607 $grp_type->setRequired(
true);
2612 $grp_type->addOption($opt_public);
2617 $grp_type->addOption($opt_closed);
2618 if($a_mode ==
'update_group_type')
2620 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2622 $this->form->addItem($grp_type);
2624 if($a_mode ==
'edit')
2628 $pres->setTitle($this->lng->txt(
'grp_setting_header_registration'));
2629 $this->form->addItem($pres);
2632 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'group_registration_mode'),
'registration_type');
2633 $reg_type->
setValue($this->object->getRegistrationType());
2636 $reg_type->addOption($opt_dir);
2640 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2641 $pass->
setValue($this->object->getPassword());
2643 $pass->setMaxLength(32);
2645 $reg_type->addOption($opt_pass);
2648 $reg_type->addOption($opt_req);
2651 $reg_type->addOption($opt_deact);
2654 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2655 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2656 $reg_code->setValue(1);
2657 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2658 $this->form->addItem($reg_type);
2661 if(!$this->object->getRegistrationAccessCode())
2663 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2667 $reg_link->setValue($this->object->getRegistrationAccessCode());
2668 $this->form->addItem($reg_link);
2671 include_once
'./Services/Link/classes/class.ilLink.php';
2672 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2673 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2674 $reg_code->addSubItem($link);
2675 $this->form->addItem($reg_code);
2679 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2681 $time_limit->
setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2683 $this->lng->loadLanguageModule(
'dateplaner');
2684 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2685 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2688 $dur->setEndText($this->lng->txt(
'cal_end'));
2689 $dur->setMinuteStepSize(5);
2690 $dur->setShowDate(
true);
2691 $dur->setShowTime(
true);
2692 $dur->setStart($this->object->getRegistrationStart());
2693 $dur->setEnd($this->object->getRegistrationEnd());
2695 $time_limit->addSubItem($dur);
2696 $this->form->addItem($time_limit);
2699 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2702 $lim->setChecked($this->object->isMembershipLimited());
2705 $max =
new ilTextInputGUI($this->lng->txt(
'reg_grp_max_members'),
'registration_max_members');
2706 $max->
setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2709 $max->setMaxLength(4);
2710 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2711 $lim->addSubItem($max);
2716 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2717 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2718 $lim->addSubItem($wait);
2719 $this->form->addItem($lim);
2724 $hasParentCourse = $tree->checkForParentType($this->object->getRefId(),
'crs');
2726 $pres->setTitle($this->lng->txt(
'grp_setting_header_presentation'));
2727 $this->form->addItem($pres);
2731 if($hasParentCourse)
2733 switch($this->object->getViewMode())
2736 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_sessions');
2740 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_simple');
2744 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_by_type');
2749 $opt->
setInfo($this->lng->txt(
'grp_view_inherit_info'));
2750 $view_type->addOption($opt);
2753 if($hasParentCourse &&
2760 $view_type->setValue($this->object->getViewMode(
true));
2764 $opt->
setInfo($this->lng->txt(
'grp_view_info_simple'));
2765 $view_type->addOption($opt);
2768 $opt->
setInfo($this->lng->txt(
'grp_view_info_by_type'));
2769 $view_type->addOption($opt);
2770 $this->form->addItem($view_type);
2775 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
2777 $sog->setValue($sort->getSortMode());
2778 $sog->setRequired(
true);
2780 if($hasParentCourse)
2785 $title = $this->lng->txt(
'sort_inherit_prefix');
2786 $title .=
' ('.ilContainerSortingSettings::sortModeToString(
2788 $sde->setTitle($title);
2789 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
2790 $sog->addOption($sde);
2795 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
2796 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
2797 $sog->addOption($sma);
2801 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
2802 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
2803 $sog->addOption($sti);
2805 $this->form->addItem($sog);
2809 $feat->setTitle($this->lng->txt(
'obj_features'));
2810 $this->form->addItem($feat);
2812 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2814 $this->object->getId(),
2830 $mail_type->
setValue($this->object->getMailToMembersType());
2833 $this->lng->txt(
'grp_mail_tutors_only_info'));
2834 $mail_type->addOption($mail_tutors);
2837 $this->lng->txt(
'grp_mail_all_info'));
2838 $mail_type->addOption($mail_all);
2839 $this->form->addItem($mail_type);
2845 $this->form->
setTitle($this->lng->txt(
'grp_new'));
2848 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2849 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2853 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2857 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
2859 $ecs->addSettingsToForm($this->form,
'grp');
2861 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2862 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2865 case 'update_group_type':
2866 $grp_type->setValue(
2872 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2892 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2893 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2894 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2895 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2896 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2897 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2898 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2901 $this->
object->setMailToMembersType((
int) $_POST[
'mail_type']);
2917 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2919 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2920 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2921 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2922 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2923 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2924 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2939 global $rbacsystem,
$ilUser,$ilAccess;
2945 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2947 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2948 $this->ctrl->getLinkTarget($this,
'members'),
2953 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2954 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2955 "membersGallery", get_class($this));
2958 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2960 $this->object->getEnableGroupMap())
2962 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2963 $this->ctrl->getLinkTarget($this,
'membersMap'),
2964 "membersMap", get_class($this));
2968 $ilAccess->checkAccess(
'write',
'',$this->object->getRefId()) or
2972 $this->tabs_gui->addSubTabTarget(
"mail_members",
2973 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2974 "mailMembers", get_class($this));
2977 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2979 $this->tabs_gui->addSubTabTarget(
"events",
2980 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
2981 "",
'ilsessionoverviewgui');
2984 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2987 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2988 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2989 "",
'ilmemberexportgui');
2995 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2996 $this->ctrl->getLinkTarget($this,
'edit'),
2997 "edit", get_class($this));
2999 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
3000 $this->ctrl->getLinkTarget($this,
'editInfo'),
3001 "editInfo", get_class($this));
3004 if ($this->ilias->getSetting(
"custom_icons"))
3006 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
3007 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
3008 "editGroupIcons", get_class($this));
3011 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
3014 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
3015 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
3016 "editMapSettings", get_class($this));
3019 $this->tabs_gui->addSubTabTarget(
'groupings',
3020 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
3024 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3025 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
3029 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
3030 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
3032 'ilobjectcustomuserfieldsgui');
3053 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
3059 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
3064 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3070 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3071 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
3081 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3118 $link = chr(13).chr(10).chr(13).chr(10);
3119 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3120 $link .= chr(13).chr(10).chr(13).chr(10);
3121 include_once
'Services/Link/classes/class.ilLink.php';
3123 return rawurlencode(base64_encode($link));
3132 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3133 if($ilSetting->get(
"crsgrp_ntf") &&
3136 if(!$ilUser->getPref(
"grpcrs_ntf_".$this->ref_id))
3138 $lg->addHeaderIcon(
"not_icon",
3140 $this->lng->txt(
"grp_notification_deactivated"));
3142 $this->ctrl->setParameter($this,
"grp_ntf", 1);
3143 $caption =
"grp_activate_notification";
3147 $lg->addHeaderIcon(
"not_icon",
3149 $this->lng->txt(
"grp_notification_activated"));
3151 $this->ctrl->setParameter($this,
"grp_ntf", 0);
3152 $caption =
"grp_deactivate_notification";
3155 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
"saveNotification"),
3159 $this->ctrl->setParameter($this,
"grp_ntf",
"");
3171 $ilTabs->clearTargets();
3172 $ilTabs->setBackTarget($this->lng->txt(
'back'),
3173 $this->ctrl->getLinkTarget($this,
'members'));
3176 $form = $list->initForm(
'printMembersOutput');
3177 $this->tpl->setContent($form->getHTML());
3187 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3190 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
3193 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
3195 $list->setId(
'grpmemlst');
3197 $list->setTitle($this->lng->txt(
'grp_members_print_title'),
3198 $this->lng->txt(
'obj_grp').
': '.$this->
object->getTitle());
3200 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3203 if($this->show_tracking)
3205 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
3207 $this->show_tracking = $olp->isActive();
3209 if($this->show_tracking)
3211 $this->lng->loadLanguageModule(
'trac');
3212 $list->addPreset(
'progress', $this->lng->txt(
'learning_progress'),
true);
3215 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3217 if($privacy->enabledGroupAccessTimes())
3219 $list->addPreset(
'access', $this->lng->txt(
'last_access'),
true);
3227 $data = $this->members_data[$a_user_id];
3229 $data[
'progress'] = $this->lng->txt(
$data[
'progress']);
3237 $list->initFromForm();
3238 $list->setCallback(array($this,
'getAttendanceListUserData'));
3241 $this->members_data = $this->
readMemberData($part->getParticipants());
3242 $list->getNonMemberUserData($this->members_data);
3244 echo $list->getFullscreenHTML();