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();
49 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
51 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
52 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"frameset"),
"grp");
57 case 'ilgroupregistrationgui':
58 $this->ctrl->setReturn($this,
'');
59 $this->tabs_gui->setTabActive(
'join');
60 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
62 $this->ctrl->forwardCommand($registration);
65 case 'ilpermissiongui':
66 $this->tabs_gui->setTabActive(
'perm_settings');
67 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
69 $ret =& $this->ctrl->forwardCommand($perm_gui);
72 case 'ilrepositorysearchgui':
73 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
75 $rep_search->setCallback($this,
83 $this->tabs_gui->setTabActive(
'members');
84 $this->ctrl->setReturn($this,
'members');
85 $ret =& $this->ctrl->forwardCommand($rep_search);
87 $this->tabs_gui->setSubTabActive(
'members');
90 case "ilinfoscreengui":
94 case "illearningprogressgui":
95 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
98 $this->object->getRefId(),
99 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
100 $this->ctrl->forwardCommand($new_gui);
101 $this->tabs_gui->setTabActive(
'learning_progress');
104 case 'ilobjcoursegroupinggui':
107 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
108 $this->ctrl->setReturn($this,
'edit');
110 $this->ctrl->forwardCommand($crs_grp_gui);
112 $this->tabs_gui->setTabActive(
'settings');
113 $this->tabs_gui->setSubTabActive(
'groupings');
116 case 'ilcoursecontentgui':
118 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
120 $this->ctrl->forwardCommand($course_content_obj);
123 case 'ilpublicuserprofilegui':
124 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
126 $this->tabs_gui->setTabActive(
'group_members');
127 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
129 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
130 $html = $this->ctrl->forwardCommand($profile_gui);
131 $this->tpl->setVariable(
"ADM_CONTENT", $html);
135 $this->tabs_gui->setTabActive(
'none');
137 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
138 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
144 case "ilpageobjectgui":
148 $this->tpl->setContent(
$ret);
152 case 'ilobjectcopygui':
153 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
156 $this->ctrl->forwardCommand($cp);
159 case "ilobjstylesheetgui":
163 case 'ilobjectcustomuserfieldsgui':
164 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
167 $this->tabs_gui->setTabActive(
'settings');
168 $this->ctrl->forwardCommand($cdf_gui);
171 case 'ilmemberagreementgui':
172 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
173 $this->ctrl->setReturn($this,
'');
174 $this->tabs_gui->setTabActive(
'view_content');
176 $this->ctrl->forwardCommand($agreement);
180 $this->tabs_gui->setTabActive(
'export');
181 include_once
'./Services/Export/classes/class.ilExportGUI.php';
183 $exp->addFormat(
'xml');
184 $this->ctrl->forwardCommand($exp);
187 case 'ilmemberexportgui':
188 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
191 $this->tabs_gui->setTabActive(
'members');
192 $this->tabs_gui->setSubTabActive(
'export_members');
194 $this->ctrl->forwardCommand($export);
197 case "ilcommonactiondispatchergui":
198 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
200 $this->ctrl->forwardCommand($gui);
203 case 'ilobjectservicesettingsgui':
204 $this->ctrl->setReturn($this,
'edit');
206 $this->tabs_gui->activateTab(
'settings');
207 $this->tabs_gui->activateSubTab(
'tool_settings');
209 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
212 $this->object->getId(),
216 $this->ctrl->forwardCommand($service);
219 case 'ilsessionoverviewgui':
221 $this->tabs_gui->setTabActive(
'members');
222 $this->tabs_gui->setSubTabActive(
'events');
224 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
227 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
229 $this->ctrl->forwardCommand($overview);
235 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
237 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
241 if(
$cmd ==
'infoScreenGoto')
243 if($this->object->isRegistrationEnabled())
255 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
259 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
261 $this->ctrl->redirect($this,
"infoScreen");
265 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
266 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
285 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
287 $this->
object->getRefId(),
'grp');
289 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
297 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
298 $this->tabs_gui->setTabActive(
'view_content');
299 $this->ctrl->setReturn($this,
'view');
301 $this->ctrl->setCmdClass(get_class($agreement));
302 $this->ctrl->forwardCommand($agreement);
306 $this->tabs_gui->setTabActive(
'view_content');
317 $ilTabs->activateTab(
"view_content");
331 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
333 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
334 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
338 $this->object->getRefId());
344 if(!is_object($this->
object))
385 $ilErr->setMessage(
'');
387 if(!$this->object->validate())
389 $err = $this->lng->txt(
'err_check_input');
391 $err = $ilErr->getMessage();
397 $this->
object->create();
399 $this->
object->initGroupStatus($this->object->getGroupType());
404 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'crs') ||
405 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'grp')
411 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
418 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
421 $members_obj->updateNotification($ilUser->getId(),1);
425 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
426 $this->ctrl->redirect($this,
"edit");
441 $this->tabs_gui->setTabActive(
'settings');
442 $this->tabs_gui->setSubTabActive(
'grp_settings');
444 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
445 if(
$_GET[
'group_type_changed'])
447 $this->ctrl->clearParameters($this);
448 $this->tpl->setVariable(
'GRP_FORMACTION',$this->ctrl->getFormAction($this));
449 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_S',$this->lng->txt(
'grp_change_type'));
450 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_C',$this->lng->txt(
'cancel'));
451 $this->
initForm(
'update_group_type');
457 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
469 $type = $this->
object->getGroupType() ?
470 $this->
object->getGroupType() :
471 $this->
object->readGroupStatus();
481 $this->
object->updateGroupType();
482 $this->
object->update();
484 $this->ctrl->redirect($this,
'edit');
501 $this->form->checkInput();
503 $old_type = $this->
object->getGroupType();
506 $ilErr->setMessage(
'');
508 if(!$this->object->validate())
510 $err = $this->lng->txt(
'err_check_input');
512 $err = $ilErr->getMessage();
519 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
522 $this->
object->setGroupType($old_type);
525 $this->
object->update();
528 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
530 $this->object->getId(),
540 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
546 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
553 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
555 $ecs->handleSettingsUpdate();
559 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
562 $confirm->setFormAction($this->ctrl->getFormAction($this));
565 $this->object->getGroupType(),
566 $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'))
568 $confirm->addButton($this->lng->txt(
'grp_change_type'),
'updateGroupType');
569 $confirm->setCancel($this->lng->txt(
'cancel'),
'edit');
571 $this->tpl->setContent($confirm->getHTML());
577 $this->ctrl->redirect($this,
'edit');
592 $this->tabs_gui->setTabActive(
'settings');
593 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
600 $tpl->setContent($a_form->getHTML());
605 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
607 $form->setFormAction($this->ctrl->getFormAction($this));
612 $form->addCommandButton(
'updateGroupIcons', $this->lng->txt(
'save'));
628 if($form->checkInput())
631 if ($this->ilias->getSetting(
"custom_icons"))
633 if(
$_POST[
"cont_big_icon_delete"])
635 $this->
object->removeBigIcon();
637 if(
$_POST[
"cont_small_icon_delete"])
639 $this->
object->removeSmallIcon();
641 if(
$_POST[
"cont_tiny_icon_delete"])
643 $this->
object->removeTinyIcon();
645 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
646 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
650 $this->ctrl->redirect($this,
"editGroupIcons");
653 $form->setValuesByPost();
665 $this->tabs_gui->setTabActive(
'settings');
666 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
668 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
670 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
675 $latitude = $this->
object->getLatitude();
676 $longitude = $this->
object->getLongitude();
677 $zoom = $this->
object->getLocationZoom();
680 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
683 $latitude = $def[
"latitude"];
684 $longitude = $def[
"longitude"];
685 $zoom = $def[
"zoom"];
692 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
694 $form->setFormAction($ilCtrl->getFormAction($this));
696 $form->setTitle($this->lng->txt(
"grp_map_settings"));
702 $public->setChecked($this->object->getEnableGroupMap());
703 $form->addItem($public);
709 $loc_prop->setLongitude($longitude);
710 $loc_prop->setZoom($zoom);
711 $form->addItem($loc_prop);
713 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
715 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
726 $this->
object->update();
728 $ilCtrl->redirect($this,
"editMapSettings");
739 $this->tabs_gui->setTabActive(
'members');
741 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
747 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
749 $map->setMapId(
"group_map");
750 $map->setWidth(
"700px");
751 $map->setHeight(
"500px");
752 $map->setLatitude($this->object->getLatitude());
753 $map->setLongitude($this->object->getLongitude());
754 $map->setZoom($this->object->getLocationZoom());
755 $map->setEnableTypeControl(
true);
756 $map->setEnableNavigationControl(
true);
757 $map->setEnableCentralMarker(
true);
760 $member_ids = $this->
object->getGroupMemberIds();
761 $admin_ids = $this->
object->getGroupAdminIds();
764 $members = $this->
object->getGroupMemberData($member_ids);
765 foreach($member_ids as $user_id)
767 $map->addUserMarker($user_id);
769 $tpl->setContent($map->getHTML());
770 $tpl->setLeftContent($map->getUserListHTML());
787 $this->tabs_gui->setTabActive(
'settings');
788 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
791 $this->tpl->setContent($this->form->getHTML());
802 if(is_object($this->form))
807 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
809 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
810 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
811 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
812 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
815 $area->
setInfo($this->lng->txt(
'grp_information_info'));
816 $area->setValue($this->object->getInformation());
819 $this->form->addItem($area);
833 $this->
object->update();
848 global $rbacsystem, $ilAccess,
$ilUser;
850 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
852 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
855 $this->tabs_gui->setTabActive(
'members');
857 $member_ids = $this->
object->getGroupMemberIds();
858 $admin_ids = $this->
object->getGroupAdminIds();
861 $members = $this->
object->getGroupMemberData($member_ids);
866 $ordered_members = array();
868 foreach($members as $member)
876 if(!$usr_obj->getActive())
884 array_push($ordered_members,array(
"id" => $member[
"id"],
885 "login" => $usr_obj->getLogin(),
886 "lastname" => $usr_obj->getLastName(),
887 "firstname" => $usr_obj->getFirstName(),
888 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
889 "usr_obj" => $usr_obj));
894 foreach($ordered_members as $member) {
896 $usr_obj = $member[
"usr_obj"];
898 $public_profile = $usr_obj->getPref(
"public_profile");
899 if ($public_profile ==
"g")
901 $public_profile =
"y";
905 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
906 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
909 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
911 switch(in_array($member[
"id"],$admin_ids))
915 if ($public_profile ==
"y")
917 $this->tpl->setCurrentBlock(
"member_linked");
918 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
919 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
920 $this->tpl->parseCurrentBlock();
924 $this->tpl->setCurrentBlock(
"member_not_linked");
925 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
926 $this->tpl->parseCurrentBlock();
928 $this->tpl->setCurrentBlock(
"member");
932 if ($public_profile ==
"y")
934 $this->tpl->setCurrentBlock(
"member_linked");
935 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
936 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
937 $this->tpl->parseCurrentBlock();
941 $this->tpl->setCurrentBlock(
"member_not_linked");
942 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
943 $this->tpl->parseCurrentBlock();
945 $this->tpl->setCurrentBlock(
"member");
949 if (in_array($member[
"id"],$admin_ids)) {
950 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Admin");
953 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Member");
958 if ($public_profile ==
"y")
960 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
961 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
963 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
964 $this->tpl->parseCurrentBlock();
966 $this->tpl->setCurrentBlock(
"members");
968 $this->tpl->parseCurrentBlock();
971 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
978 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
981 if($this->show_tracking)
983 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
989 if($privacy->enabledGroupAccessTimes())
991 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
998 $tmp_data[
'firstname'] = $name[
'firstname'];
999 $tmp_data[
'lastname'] = $name[
'lastname'];
1001 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
1002 $tmp_data[
'usr_id'] =
$usr_id;
1005 if($this->show_tracking)
1007 if(in_array($usr_id,$completed))
1011 elseif(in_array($usr_id,$in_progress))
1015 elseif(in_array($usr_id,
$failed))
1025 if($privacy->enabledGroupAccessTimes())
1027 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
1031 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
1035 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1036 $tmp_data[
'access_time_unix'] = 0;
1040 $members[
$usr_id] = $tmp_data;
1042 return $members ? $members : array();
1055 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1056 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
1060 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1061 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
1070 $this->tabs_gui->setTabActive(
'members');
1071 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1073 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1074 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1077 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
1082 'auto_complete_name' => $lng->txt(
'user'),
1083 'user_type' => array(
1087 'submit_name' => $lng->txt(
'add')
1092 $ilToolbar->addSeparator();
1095 $ilToolbar->addButton($this->lng->txt(
"grp_search_users"),
1096 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1098 $ilToolbar->addSeparator();
1101 $ilToolbar->addButton($this->lng->txt(
"grp_print_list"),
1102 $this->ctrl->getLinkTarget($this,
'printMembers'));
1108 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1110 if(count($wait = $waiting_list->getAllUsers()))
1112 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1113 if($ilUser->getPref(
'grp_wait_hide'))
1116 $this->ctrl->setParameter($this,
'wait_hide',0);
1117 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1118 $this->lng->txt(
'show'),
1121 $this->ctrl->clearParameters($this);
1126 $this->ctrl->setParameter($this,
'wait_hide',1);
1127 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1128 $this->lng->txt(
'hide'),
1131 $this->ctrl->clearParameters($this);
1133 $table_gui->setUsers($wait);
1134 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.png',$this->lng->txt(
'group_new_registrations'));
1135 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1140 if($part->getSubscribers())
1142 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1143 if($ilUser->getPref(
'grp_subscriber_hide'))
1146 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1147 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1148 $this->lng->txt(
'show'),
1151 $this->ctrl->clearParameters($this);
1156 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1157 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1158 $this->lng->txt(
'hide'),
1161 $this->ctrl->clearParameters($this);
1163 $table_gui->readSubscriberData();
1164 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.png',$this->lng->txt(
'group_new_registrations'));
1165 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1168 if(count($part->getAdmins()))
1170 if($ilUser->getPref(
'grp_admin_hide'))
1173 $this->ctrl->setParameter($this,
'admin_hide',0);
1174 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1175 $this->lng->txt(
'show'),
1178 $this->ctrl->clearParameters($this);
1183 $this->ctrl->setParameter($this,
'admin_hide',1);
1184 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1185 $this->lng->txt(
'hide'),
1188 $this->ctrl->clearParameters($this);
1190 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.png',$this->lng->txt(
'grp_admins'));
1192 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1195 if(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1197 if($ilUser->getPref(
'grp_member_hide'))
1200 $this->ctrl->setParameter($this,
'member_hide',0);
1202 $this->lng->txt(
'show'),
1205 $this->ctrl->clearParameters($this);
1210 $this->ctrl->setParameter($this,
'member_hide',1);
1212 $this->lng->txt(
'hide'),
1215 $this->ctrl->clearParameters($this);
1218 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.png',$this->lng->txt(
'grp_members'));
1219 $table_gui->parse($this->
readMemberData(
$GLOBALS[
'rbacreview']->assignedUsers($this->object->getDefaultMemberRole())));
1220 $this->tpl->setCurrentBlock(
'member_block');
1221 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1222 $this->tpl->parseCurrentBlock();
1228 if(!(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1232 if($ilUser->getPref(
'grp_role_hide'.$role_id))
1235 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,0);
1236 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1237 $this->lng->txt(
'show'),
1240 $this->ctrl->clearParameters($this);
1245 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,1);
1246 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1247 $this->lng->txt(
'hide'),
1250 $this->ctrl->clearParameters($this);
1255 $this->tpl->setCurrentBlock(
'member_block');
1256 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1257 $this->tpl->parseCurrentBlock();
1260 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1261 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1262 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1263 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1280 if(!count(
$_POST[
'subscribers']))
1287 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1290 $this->
object->members_obj->sendNotification(
1296 $this->
object->members_obj->deleteSubscriber($usr_id);
1298 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1302 $this->ctrl->redirect($this,
'members');
1318 if(!count(
$_POST[
'subscribers']))
1325 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1328 $this->
object->members_obj->sendNotification(
1332 $this->
object->members_obj->deleteSubscriber($usr_id);
1351 if(!count(
$_POST[
"waiting"]))
1358 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1361 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1364 foreach(
$_POST[
"waiting"] as $user_id)
1370 if($this->object->members_obj->isAssigned($user_id))
1375 $this->
object->members_obj->sendNotification(
1381 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1396 $this->searchObject();
1412 if(!count(
$_POST[
'waiting']))
1419 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1422 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1423 foreach(
$_POST[
"waiting"] as $user_id)
1426 $this->
object->members_obj->sendNotification(
1447 $this->tabs_gui->setTabActive(
'members');
1448 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1450 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1452 if(!count($participants_to_delete))
1462 $admins_after = (array) array_diff($admins, $participants_to_delete);
1463 if(!count($admins_after) and count($admins))
1470 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1472 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1473 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1474 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1475 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1477 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles'])) as $participants)
1479 $confirm->addItem(
'participants[]',
1480 $participants[
'usr_id'],
1481 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1485 $this->tpl->setContent($confirm->getHTML());
1499 if(!count(
$_POST[
'participants']))
1506 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1509 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1510 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1511 foreach(
$_POST[
'participants'] as $part)
1513 $this->
object->members_obj->sendNotification(
1535 if(isset(
$_GET[
'member_id']))
1537 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1541 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1542 (array) $_POST[
'members'],
1543 (array) $_POST[
'roles'],
1544 (array) $_POST[
'waiting'],
1545 (array) $_POST[
'subscribers']));
1547 if (!count(
$_POST[
'participants']))
1558 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1563 array(
'type' =>
'new',
'rcp_to' => implode(
',',$rcps),
'sig' => $this->
createMailSignature())));
1577 if(isset(
$_GET[
'admin_hide']))
1579 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1581 if(isset(
$_GET[
'member_hide']))
1583 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1585 if(isset(
$_GET[
'subscriber_hide']))
1587 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1589 if(isset(
$_GET[
'wait_hide']))
1591 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1602 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1616 $post_participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1618 $participants = array_intersect((array) $post_participants, (array) $real_participants);
1620 if(!count($participants))
1628 $this->tabs_gui->setTabActive(
'members');
1629 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1631 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1633 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.png',$this->lng->txt(
'grp_mem_change_status'));
1636 $this->tpl->setContent($table_gui->getHTML());
1651 if(!count(
$_POST[
'participants']))
1660 $admin_role = $this->
object->getDefaultAdminRole();
1663 if(!isset(
$_POST[
'roles'][$admin_id]))
1668 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1678 $_POST[
'members'] = $_POST[
'participants'];
1683 $admin_role = $this->
object->getDefaultAdminRole();
1685 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1689 $notification =
false;
1690 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1692 $notification =
true;
1694 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1696 $notification =
true;
1700 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1703 $this->
object->members_obj->updateNotification($usr_id,0);
1705 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1707 $this->
object->members_obj->updateNotification($usr_id,1);
1712 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1713 $this->
object->members_obj->sendNotification(
1735 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1736 foreach($this->object->members_obj->getAdmins() as $admin_id)
1738 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1776 if($part->isLastAdmin($ilUser->getId()))
1783 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1785 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1787 $cgui->setHeaderText($this->lng->txt(
'grp_dismiss_myself'));
1788 $cgui->setFormAction($this->ctrl->getFormAction($this));
1789 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1790 $cgui->setConfirm($this->lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
1791 $this->tpl->setContent($cgui->getHTML());
1806 $this->
object->members_obj->delete($ilUser->getId());
1808 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1809 $this->
object->members_obj->sendNotification(
1813 $this->
object->members_obj->sendNotification(
1818 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1822 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
1823 $tree->getParentId($this->object->getRefId()));
1824 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1834 $user_ids =
$_POST[
"id"];
1836 if (empty($user_ids[0]))
1839 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1842 foreach ($user_ids as $new_member)
1844 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1846 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1853 $this->ctrl->redirect($this,
'members');
1862 include_once
'Services/Mail/classes/class.ilMail.php';
1865 if (empty($user_ids[0]))
1867 $GLOBALS[
'lng']->loadLanguageModule(
'search');
1872 foreach ($user_ids as $new_member)
1877 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1879 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1884 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1886 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1893 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1894 $this->
object->members_obj->sendNotification(
1899 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1904 unset(
$_SESSION[
'grp_usr_search_result']);
1907 $this->ctrl->redirect($this,
'members');
1915 global $rbacreview, $ilObjDataCache,
$ilias;
1916 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1918 $this->lng->loadLanguageModule(
'mail');
1919 if(!isset(
$_GET[
'returned_from_mail']))
1924 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1928 $this->tabs_gui->setTabActive(
'members');
1930 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1933 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1934 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1937 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1938 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1939 $role_addrs = array();
1942 $sorted_role_ids = array();
1944 foreach($role_ids as $role_id)
1949 $sorted_role_ids[1] = $role_id;
1953 $sorted_role_ids[0] = $role_id;
1957 $sorted_role_ids[$counter++] = $role_id;
1961 ksort($sorted_role_ids,SORT_NUMERIC);
1962 foreach ((array) $sorted_role_ids as $role_id)
1964 $this->tpl->setCurrentBlock(
"mailbox_row");
1965 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1969 if(count($ids_for_role_title) >= 2)
1971 $ilias->setSetting(
'pear_mail_enable', 1);
1975 htmlspecialchars($role_addr)
1978 if (ilMail::_usePearMail())
1981 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1988 $this->tpl->parseCurrentBlock();
1998 $user_ids =
$_POST[
"user_id"];
2000 if (empty($user_ids[0]))
2002 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
2004 include_once
'Services/Mail/classes/class.ilMail.php';
2007 foreach ($user_ids as $new_member)
2009 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
2011 $this->
object->deleteApplicationListEntry($new_member);
2012 $mail->sendMail($user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
2016 $this->ctrl->redirect($this,
'members');
2022 global $rbacsystem,
$ilUser, $ilAccess,
$lng, $ilHelp;
2024 $ilHelp->setScreenIdComponent(
"grp");
2026 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2028 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2029 $this->ctrl->getLinkTarget($this,
""));
2031 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2033 $tabs_gui->addTarget(
"info_short",
2034 $this->ctrl->getLinkTargetByClass(
2035 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2041 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2043 $tabs_gui->addTarget(
"settings",
2044 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2052 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2053 if($mem_cmd !=
"membersGallery" || $is_participant)
2055 $tabs_gui->addTarget(
"members",
2056 $this->ctrl->getLinkTarget($this, $mem_cmd),
2062 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2065 $tabs_gui->addTarget(
'learning_progress',
2066 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2068 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2072 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2074 $tabs_gui->addTarget(
2076 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2096 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2097 !$this->object->members_obj->isAssigned($ilUser->getId()))
2099 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2104 $this->lng->txt(
'membership_leave'),
2105 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2112 $tabs_gui->addTarget(
"join",
2113 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2118 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2119 $this->object->members_obj->isMember($ilUser->getId()))
2121 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2122 $this->ctrl->getLinkTarget($this,
"leave"),
2132 if(!is_array($_FILES[
'xmldoc']))
2139 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2143 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2160 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html",
2162 $this->tpl->setCurrentBlock(
"adm_content");
2163 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2164 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2165 $this->tpl->parseCurrentBlock();
2176 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2177 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2179 $workbook = $adapter->getWorkbook();
2181 $format_bold =& $workbook->addFormat();
2182 $format_bold->setBold();
2183 $format_percent =& $workbook->addFormat();
2184 $format_percent->setNumFormat(
"0.00%");
2185 $format_datetime =& $workbook->addFormat();
2186 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2187 $format_title =& $workbook->addFormat();
2188 $format_title->setBold();
2189 $format_title->setColor(
'black');
2190 $format_title->setPattern(1);
2191 $format_title->setFgColor(
'silver');
2192 $worksheet =& $workbook->addWorksheet();
2194 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2195 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2196 "fax",
"matriculation");
2197 foreach ($profile_data as
$data)
2199 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2201 $member_ids = $this->
object->getGroupMemberIds();
2203 foreach ($member_ids as $member_id)
2206 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2207 if ($member->getPref(
"public_email")==
"y")
2209 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2215 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2216 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2217 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2218 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2219 if ($member->getPref(
"public_institution")==
"y")
2221 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2227 if ($member->getPref(
"public_department")==
"y")
2229 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2235 if ($member->getPref(
"public_street")==
"y")
2237 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2243 if ($member->getPref(
"public_zip")==
"y")
2245 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2251 if ($member->getPref(
"public_city")==
"y")
2253 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2259 if ($member->getPref(
"public_country")==
"y")
2261 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2267 if ($member->getPref(
"public_phone_office")==
"y")
2269 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2275 if ($member->getPref(
"public_phone_home")==
"y")
2277 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2283 if ($member->getPref(
"public_phone_mobile")==
"y")
2285 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2291 if ($member->getPref(
"public_fax")==
"y")
2293 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2299 if ($member->getPref(
"public_matriculation")==
"y")
2301 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2322 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2337 $this->ctrl->setCmd(
"showSummary");
2338 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2349 $this->tabs_gui->setTabActive(
'info_short');
2351 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2353 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2356 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2359 if(strlen($this->object->getInformation()))
2361 $info->addSection($this->lng->txt(
'grp_general_informations'));
2362 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2366 $info->enablePrivateNotes();
2367 $info->enableLearningProgress(
true);
2369 $info->addSection($this->lng->txt(
'group_registration'));
2370 $info->showLDAPRoleGroupMappingInfo();
2372 if(!$this->object->isRegistrationEnabled())
2374 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2375 $this->lng->txt(
'grp_reg_deac_info_screen'));
2380 switch($this->object->getRegistrationType())
2383 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2384 $this->lng->txt(
'grp_reg_direct_info_screen'));
2388 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2389 $this->lng->txt(
'grp_reg_req_info_screen'));
2393 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2394 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2404 if($this->object->isRegistrationUnlimited())
2406 $info->addProperty($this->lng->txt(
'group_registration_time'),
2407 $this->lng->txt(
'grp_registration_unlimited'));
2409 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2411 $info->addProperty($this->lng->txt(
"group_registration_time"),
2412 $this->lng->txt(
'cal_until').
' '.
2415 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2417 $info->addProperty($this->lng->txt(
"group_registration_time"),
2418 $this->lng->txt(
'cal_from').
' '.
2421 if ($this->object->isMembershipLimited())
2423 $info->addProperty($this->lng->txt(
"mem_free_places"),
2424 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2431 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2434 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2437 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2441 $this->lng->loadLanguageModule(
'ps');
2442 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2443 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2447 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2453 $this->ctrl->forwardCommand($info);
2463 $ilUser->setPref(
"grpcrs_ntf_".$this->ref_id, (
bool)
$_REQUEST[
"grp_ntf"]);
2464 $ilUser->writePrefs();
2467 $this->ctrl->redirect($this,
"infoScreen");
2477 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2478 if(substr($a_add,0,5) ==
'rcode')
2480 if($ilUser->getId() == ANONYMOUS_USER_ID)
2484 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2485 $ilUser->getCurrentLanguage()
2497 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2502 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2509 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2515 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2523 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2538 if(is_object($this->form))
2543 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2549 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2553 $this->form->setTableWidth(
'600px');
2554 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2560 $title->setSubmitFormOnEnter(
true);
2561 $title->setValue($this->object->getTitle());
2563 $title->setMaxLength(128);
2564 $title->setRequired(
true);
2565 $this->form->addItem(
$title);
2569 $desc->
setValue($this->object->getLongDescription());
2572 $this->form->addItem($desc);
2577 if($a_mode ==
'edit')
2579 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2583 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2587 $grp_type->setRequired(
true);
2592 $grp_type->addOption($opt_public);
2597 $grp_type->addOption($opt_closed);
2598 if($a_mode ==
'update_group_type')
2600 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2602 $this->form->addItem($grp_type);
2604 if($a_mode ==
'edit')
2608 $pres->setTitle($this->lng->txt(
'grp_setting_header_registration'));
2609 $this->form->addItem($pres);
2612 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'group_registration_mode'),
'registration_type');
2613 $reg_type->
setValue($this->object->getRegistrationType());
2616 $reg_type->addOption($opt_dir);
2620 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2621 $pass->
setValue($this->object->getPassword());
2623 $pass->setMaxLength(32);
2625 $reg_type->addOption($opt_pass);
2628 $reg_type->addOption($opt_req);
2631 $reg_type->addOption($opt_deact);
2634 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2635 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2636 $reg_code->setValue(1);
2637 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2638 $this->form->addItem($reg_type);
2641 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2642 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2643 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2645 $this->lng->loadLanguageModule(
'dateplaner');
2646 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2647 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2650 $dur->setEndText($this->lng->txt(
'cal_end'));
2651 $dur->setMinuteStepSize(5);
2652 $dur->setShowDate(
true);
2653 $dur->setShowTime(
true);
2654 $dur->setStart($this->object->getRegistrationStart());
2655 $dur->setEnd($this->object->getRegistrationEnd());
2657 $time_limit->addSubItem($dur);
2658 $this->form->addItem($time_limit);
2661 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2663 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2664 $lim->setChecked($this->object->isMembershipLimited());
2668 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2669 $max->setTitle($this->lng->txt(
'members').
':');
2671 $max->setMaxLength(4);
2672 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2673 $lim->addSubItem($max);
2677 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2678 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2679 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2680 $lim->addSubItem($wait);
2681 $this->form->addItem($lim);
2685 if(!$this->object->getRegistrationAccessCode())
2687 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2691 $reg_link->setValue($this->object->getRegistrationAccessCode());
2692 $this->form->addItem($reg_link);
2695 include_once
'./Services/Link/classes/class.ilLink.php';
2696 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2697 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2698 $reg_code->addSubItem($link);
2699 $this->form->addItem($reg_code);
2703 $hasParentCourse = $tree->checkForParentType($this->object->getRefId(),
'crs');
2705 $pres->setTitle($this->lng->txt(
'grp_setting_header_presentation'));
2706 $this->form->addItem($pres);
2710 if($hasParentCourse)
2712 switch($this->object->getViewMode())
2715 $course_view_mode =
' ('.$this->lng->txt(
'cntr_view_sessions').
')';
2719 $course_view_mode =
' ('.$this->lng->txt(
'cntr_view_simple').
')';
2723 $course_view_mode =
' ('.$this->lng->txt(
'cntr_view_by_type').
')';
2728 $opt->
setInfo($this->lng->txt(
'grp_view_inherit_info'));
2729 $view_type->addOption($opt);
2732 if($hasParentCourse &&
2739 $view_type->setValue($this->object->getViewMode(
true));
2743 $opt->
setInfo($this->lng->txt(
'grp_view_info_simple'));
2744 $view_type->addOption($opt);
2747 $opt->
setInfo($this->lng->txt(
'grp_view_info_by_type'));
2748 $view_type->addOption($opt);
2749 $this->form->addItem($view_type);
2754 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
2756 $sog->setValue($sort->getSortMode());
2757 $sog->setRequired(
true);
2759 if($hasParentCourse)
2764 $title = $this->lng->txt(
'sort_inherit_prefix');
2765 $title .=
' ('.ilContainerSortingSettings::sortModeToString(
2768 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
2769 $sog->addOption($sde);
2774 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
2775 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
2776 $sog->addOption($sma);
2780 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
2781 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
2782 $sog->addOption($sti);
2784 $this->form->addItem($sog);
2786 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2788 $this->object->getId(),
2800 $this->form->setTitle($this->lng->txt(
'grp_new'));
2803 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2804 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2808 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2812 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
2814 $ecs->addSettingsToForm($this->form,
'grp');
2816 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2817 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2820 case 'update_group_type':
2821 $grp_type->setValue(
2827 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2847 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2848 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2849 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2850 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2851 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2852 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2853 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2871 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2873 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2874 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2875 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2876 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2877 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2878 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2893 global $rbacsystem,
$ilUser,$ilAccess;
2899 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2901 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2902 $this->ctrl->getLinkTarget($this,
'members'),
2907 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2908 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2909 "membersGallery", get_class($this));
2912 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2914 $this->object->getEnableGroupMap())
2916 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2917 $this->ctrl->getLinkTarget($this,
'membersMap'),
2918 "membersMap", get_class($this));
2921 $this->tabs_gui->addSubTabTarget(
"mail_members",
2922 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2923 "mailMembers", get_class($this));
2925 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2927 $this->tabs_gui->addSubTabTarget(
"events",
2928 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
2929 "",
'ilsessionoverviewgui');
2932 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2935 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2936 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2937 "",
'ilmemberexportgui');
2943 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2944 $this->ctrl->getLinkTarget($this,
'edit'),
2945 "edit", get_class($this));
2947 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2948 $this->ctrl->getLinkTarget($this,
'editInfo'),
2949 "editInfo", get_class($this));
2952 if ($this->ilias->getSetting(
"custom_icons"))
2954 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2955 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2956 "editGroupIcons", get_class($this));
2959 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2962 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2963 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2964 "editMapSettings", get_class($this));
2967 $this->tabs_gui->addSubTabTarget(
'groupings',
2968 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
2972 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2973 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2977 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
2978 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
2980 'ilobjectcustomuserfieldsgui');
3001 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
3007 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
3012 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3018 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3019 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
3029 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3066 $link = chr(13).chr(10).chr(13).chr(10);
3067 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3068 $link .= chr(13).chr(10).chr(13).chr(10);
3069 include_once
'Services/Link/classes/class.ilLink.php';
3071 return rawurlencode(base64_encode($link));
3080 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3081 if($ilSetting->get(
"crsgrp_ntf") &&
3084 if(!$ilUser->getPref(
"grpcrs_ntf_".$this->ref_id))
3086 $lg->addHeaderIcon(
"not_icon",
3088 $this->lng->txt(
"grp_notification_deactivated"));
3090 $this->ctrl->setParameter($this,
"grp_ntf", 1);
3091 $caption =
"grp_activate_notification";
3095 $lg->addHeaderIcon(
"not_icon",
3097 $this->lng->txt(
"grp_notification_activated"));
3099 $this->ctrl->setParameter($this,
"grp_ntf", 0);
3100 $caption =
"grp_deactivate_notification";
3103 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
"saveNotification"),
3107 $this->ctrl->setParameter($this,
"grp_ntf",
"");
3119 $ilTabs->clearTargets();
3120 $ilTabs->setBackTarget($this->lng->txt(
'back'),
3121 $this->ctrl->getLinkTarget($this,
'members'));
3124 $form = $list->initForm(
'printMembersOutput');
3125 $this->tpl->setContent($form->getHTML());
3135 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3138 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
3140 $list->setId(
'grpmemlst');
3142 $list->setTitle($this->lng->txt(
'grp_members_print_title'),
3143 $this->lng->txt(
'obj_grp').
': '.$this->
object->getTitle());
3145 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3146 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
3150 if($this->show_tracking)
3152 $this->lng->loadLanguageModule(
'trac');
3153 $list->addPreset(
'progress', $this->lng->txt(
'learning_progress'),
true);
3156 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3158 if($privacy->enabledGroupAccessTimes())
3160 $list->addPreset(
'access', $this->lng->txt(
'last_access'),
true);
3168 $data = $this->members_data[$a_user_id];
3170 $data[
'progress'] = $this->lng->txt(
$data[
'progress']);
3178 $list->initFromForm();
3179 $list->setCallback(array($this,
'getAttendanceListUserData'));
3182 $this->members_data = $this->
readMemberData($part->getParticipants());
3184 echo $list->getFullscreenHTML();