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');
41 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,
$ilErr,
$ilCtrl;
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 "repository.php?cmd=frameset&ref_id=".
$_GET[
"ref_id"],
"grp");
57 case "ilconditionhandlerinterface":
58 include_once
'./Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
62 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
64 $this->tabs_gui->setTabActive(
'view_content');
67 $this->ctrl->forwardCommand($new_gui);
72 $this->ctrl->forwardCommand($new_gui);
76 case 'ilgroupregistrationgui':
77 $this->ctrl->setReturn($this,
'');
78 $this->tabs_gui->setTabActive(
'join');
79 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
81 $this->ctrl->forwardCommand($registration);
84 case 'ilpermissiongui':
85 $this->tabs_gui->setTabActive(
'perm_settings');
86 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
88 $ret =& $this->ctrl->forwardCommand($perm_gui);
91 case 'ilrepositorysearchgui':
92 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
94 $rep_search->setCallback($this,
102 $this->tabs_gui->setTabActive(
'members');
103 $this->ctrl->setReturn($this,
'members');
104 $ret =& $this->ctrl->forwardCommand($rep_search);
106 $this->tabs_gui->setSubTabActive(
'members');
109 case 'ilcourseitemadministrationgui':
110 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
111 $this->tabs_gui->clearSubTabs();
112 $this->ctrl->setReturn($this,
'view');
114 $this->ctrl->forwardCommand($item_adm_gui);
117 case "ilinfoscreengui":
121 case "illearningprogressgui":
122 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
125 $this->object->getRefId(),
126 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
127 $this->ctrl->forwardCommand($new_gui);
128 $this->tabs_gui->setTabActive(
'learning_progress');
131 case 'ilobjcoursegroupinggui':
134 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
135 $this->ctrl->setReturn($this,
'edit');
137 $this->ctrl->forwardCommand($crs_grp_gui);
139 $this->tabs_gui->setTabActive(
'settings');
140 $this->tabs_gui->setSubTabActive(
'groupings');
143 case 'ilcoursecontentgui':
145 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
147 $this->ctrl->forwardCommand($course_content_obj);
150 case 'ilcourseitemadministrationgui':
152 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
154 $this->ctrl->setReturn($this,
'');
156 $this->ctrl->forwardCommand($item_adm_gui);
160 $this->tabs_gui->setTabActive(
'view_content');
161 $this->tabs_gui->setSubTabActive(
'activation');
164 case 'ilpublicuserprofilegui':
165 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
167 $this->tabs_gui->setTabActive(
'group_members');
168 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
170 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
171 $html = $this->ctrl->forwardCommand($profile_gui);
172 $this->tpl->setVariable(
"ADM_CONTENT", $html);
176 $this->tabs_gui->setTabActive(
'none');
178 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
179 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
185 case "ilpageobjectgui":
189 $this->tpl->setContent(
$ret);
193 case 'ilobjectcopygui':
194 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
197 $this->ctrl->forwardCommand($cp);
200 case "ilobjstylesheetgui":
204 case 'ilobjectcustomuserfieldsgui':
205 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
208 $this->tabs_gui->setTabActive(
'settings');
209 $this->ctrl->forwardCommand($cdf_gui);
212 case 'ilmemberagreementgui':
213 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
214 $this->ctrl->setReturn($this,
'');
215 $this->tabs_gui->setTabActive(
'view_content');
217 $this->ctrl->forwardCommand($agreement);
221 $this->tabs_gui->setTabActive(
'export');
222 include_once
'./Services/Export/classes/class.ilExportGUI.php';
224 $exp->addFormat(
'xml');
225 $this->ctrl->forwardCommand($exp);
228 case 'ilmemberexportgui':
229 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
232 $this->tabs_gui->setTabActive(
'members');
233 $this->tabs_gui->setSubTabActive(
'export_members');
235 $this->ctrl->forwardCommand($export);
238 case "ilcommonactiondispatchergui":
239 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
241 $this->ctrl->forwardCommand($gui);
247 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
249 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
254 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
258 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
260 $this->ctrl->redirect($this,
"infoScreen");
264 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
265 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
282 global
$tree,$rbacsystem,$ilUser;
284 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
286 $this->
object->getRefId(),
'grp');
288 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
296 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
297 $this->tabs_gui->setTabActive(
'view_content');
298 $this->ctrl->setReturn($this,
'view');
300 $this->ctrl->setCmdClass(get_class($agreement));
301 $this->ctrl->forwardCommand($agreement);
305 $this->tabs_gui->setTabActive(
'view_content');
316 $ilTabs->activateTab(
"view_content");
330 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
332 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
333 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
337 $this->object->getRefId());
343 if(!is_object($this->
object))
373 $ilErr->setMessage(
'');
375 if(!$this->object->validate())
377 $err = $this->lng->txt(
'err_check_input');
379 $err = $ilErr->getMessage();
385 $this->
object->create();
387 $this->
object->initGroupStatus($this->object->getGroupType());
390 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
393 $members_obj->updateNotification($ilUser->getId(),1);
396 if($crs_refid = $tree->checkForParentType($this->object->getRefId(),
'crs'))
398 include_once
'./Modules/Course/classes/class.ilCourseItems.php';
399 $tmp =
new ilCourseItems($crs_refid,$this->object->getRefId());
409 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
415 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
416 $this->ctrl->redirect($this,
"edit");
431 $this->tabs_gui->setTabActive(
'settings');
432 $this->tabs_gui->setSubTabActive(
'grp_settings');
434 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
435 if(
$_GET[
'group_type_changed'])
437 $this->ctrl->clearParameters($this);
438 $this->tpl->setVariable(
'GRP_FORMACTION',$this->ctrl->getFormAction($this));
439 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_S',$this->lng->txt(
'grp_change_type'));
440 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_C',$this->lng->txt(
'cancel'));
441 $this->
initForm(
'update_group_type');
447 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
459 $type = $this->
object->getGroupType() ?
460 $this->
object->getGroupType() :
461 $this->
object->readGroupStatus();
471 $this->
object->updateGroupType();
472 $this->
object->update();
474 $this->ctrl->redirect($this,
'edit');
489 $old_type = $this->
object->getGroupType();
492 $ilErr->setMessage(
'');
494 if(!$this->object->validate())
496 $err = $this->lng->txt(
'err_check_input');
498 $err = $ilErr->getMessage();
505 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
508 $this->
object->setGroupType($old_type);
511 $this->
object->update();
514 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
520 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
528 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
531 $confirm->setFormAction($this->ctrl->getFormAction($this));
534 $this->object->getGroupType(),
535 $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'))
537 $confirm->addButton($this->lng->txt(
'grp_change_type'),
'updateGroupType');
538 $confirm->setCancel($this->lng->txt(
'cancel'),
'edit');
540 $this->tpl->setContent($confirm->getHTML());
546 $this->ctrl->redirect($this,
'edit');
561 $this->tabs_gui->setTabActive(
'settings');
562 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
569 $tpl->setContent($a_form->getHTML());
574 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
576 $form->setFormAction($this->ctrl->getFormAction($this));
581 $form->addCommandButton(
'updateGroupIcons', $this->lng->txt(
'save'));
597 if($form->checkInput())
600 if ($this->ilias->getSetting(
"custom_icons"))
602 if(
$_POST[
"cont_big_icon_delete"])
604 $this->
object->removeBigIcon();
606 if(
$_POST[
"cont_small_icon_delete"])
608 $this->
object->removeSmallIcon();
610 if(
$_POST[
"cont_tiny_icon_delete"])
612 $this->
object->removeTinyIcon();
614 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
615 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
619 $this->ctrl->redirect($this,
"editGroupIcons");
622 $form->setValuesByPost();
631 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
634 $this->tabs_gui->setTabActive(
'settings');
635 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
637 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
639 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
644 $latitude = $this->
object->getLatitude();
645 $longitude = $this->
object->getLongitude();
646 $zoom = $this->
object->getLocationZoom();
649 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
652 $latitude = $def[
"latitude"];
653 $longitude = $def[
"longitude"];
654 $zoom = $def[
"zoom"];
661 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
663 $form->setFormAction($ilCtrl->getFormAction($this));
665 $form->setTitle($this->lng->txt(
"grp_map_settings"));
671 $public->setChecked($this->object->getEnableGroupMap());
672 $form->addItem($public);
678 $loc_prop->setLongitude($longitude);
679 $loc_prop->setZoom($zoom);
680 $form->addItem($loc_prop);
682 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
684 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
695 $this->
object->update();
697 $ilCtrl->redirect($this,
"editMapSettings");
708 $this->tabs_gui->setTabActive(
'members');
710 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
716 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
718 $map->setMapId(
"group_map");
719 $map->setWidth(
"700px");
720 $map->setHeight(
"500px");
721 $map->setLatitude($this->object->getLatitude());
722 $map->setLongitude($this->object->getLongitude());
723 $map->setZoom($this->object->getLocationZoom());
724 $map->setEnableTypeControl(
true);
725 $map->setEnableNavigationControl(
true);
726 $map->setEnableCentralMarker(
true);
729 $member_ids = $this->
object->getGroupMemberIds();
730 $admin_ids = $this->
object->getGroupAdminIds();
733 $members = $this->
object->getGroupMemberData($member_ids);
734 foreach($member_ids as $user_id)
736 $map->addUserMarker($user_id);
738 $tpl->setContent($map->getHTML());
739 $tpl->setLeftContent($map->getUserListHTML());
756 $this->tabs_gui->setTabActive(
'settings');
757 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
760 $this->tpl->setContent($this->form->getHTML());
771 if(is_object($this->form))
776 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
778 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
779 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
780 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
781 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
784 $area->
setInfo($this->lng->txt(
'grp_information_info'));
785 $area->setValue($this->object->getInformation());
788 $this->form->addItem($area);
802 $this->
object->update();
817 global $rbacsystem, $ilAccess, $ilUser;
819 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
821 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
824 $this->tabs_gui->setTabActive(
'members');
826 $member_ids = $this->
object->getGroupMemberIds();
827 $admin_ids = $this->
object->getGroupAdminIds();
830 $members = $this->
object->getGroupMemberData($member_ids);
835 $ordered_members = array();
837 foreach($members as $member)
845 if(!$usr_obj->getActive())
853 array_push($ordered_members,array(
"id" => $member[
"id"],
854 "login" => $usr_obj->getLogin(),
855 "lastname" => $usr_obj->getLastName(),
856 "firstname" => $usr_obj->getFirstName(),
857 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
858 "usr_obj" => $usr_obj));
863 foreach($ordered_members as $member) {
865 $usr_obj = $member[
"usr_obj"];
867 $public_profile = $usr_obj->getPref(
"public_profile");
868 if ($public_profile ==
"g")
870 $public_profile =
"y";
874 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
875 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
878 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
880 switch(in_array($member[
"id"],$admin_ids))
884 if ($public_profile ==
"y")
886 $this->tpl->setCurrentBlock(
"tutor_linked");
887 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
888 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
889 $this->tpl->parseCurrentBlock();
893 $this->tpl->setCurrentBlock(
"tutor_not_linked");
894 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
895 $this->tpl->parseCurrentBlock();
897 $this->tpl->setCurrentBlock(
"tutor");
901 if ($public_profile ==
"y")
903 $this->tpl->setCurrentBlock(
"member_linked");
904 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
905 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
906 $this->tpl->parseCurrentBlock();
910 $this->tpl->setCurrentBlock(
"member_not_linked");
911 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
912 $this->tpl->parseCurrentBlock();
914 $this->tpl->setCurrentBlock(
"member");
919 if ($public_profile ==
"y")
921 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
922 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
924 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
925 $this->tpl->parseCurrentBlock();
927 $this->tpl->setCurrentBlock(
"members");
929 $this->tpl->parseCurrentBlock();
932 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
939 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
942 if($this->show_tracking)
944 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
951 if($privacy->enabledGroupAccessTimes())
953 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
960 $tmp_data[
'firstname'] = $name[
'firstname'];
961 $tmp_data[
'lastname'] = $name[
'lastname'];
963 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
967 if($this->show_tracking)
969 if(in_array($usr_id,$completed))
973 elseif(in_array($usr_id,$in_progress))
977 elseif(in_array($usr_id,
$failed))
987 if($privacy->enabledGroupAccessTimes())
989 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
993 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
997 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
998 $tmp_data[
'access_time_unix'] = 0;
1002 $members[
$usr_id] = $tmp_data;
1004 return $members ? $members : array();
1017 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1018 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
1022 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1023 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
1032 $this->tabs_gui->setTabActive(
'members');
1033 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1035 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1036 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1039 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
1044 'auto_complete_name' => $lng->txt(
'user'),
1045 'user_type' => array(
1049 'submit_name' => $lng->txt(
'add')
1054 $ilToolbar->addSeparator();
1057 $ilToolbar->addButton($this->lng->txt(
"grp_search_users"),
1058 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1064 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1066 if(count($wait = $waiting_list->getAllUsers()))
1068 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1069 if($ilUser->getPref(
'grp_wait_hide'))
1072 $this->ctrl->setParameter($this,
'wait_hide',0);
1073 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1074 $this->lng->txt(
'show'),
1077 $this->ctrl->clearParameters($this);
1082 $this->ctrl->setParameter($this,
'wait_hide',1);
1083 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1084 $this->lng->txt(
'hide'),
1087 $this->ctrl->clearParameters($this);
1089 $table_gui->setUsers($wait);
1090 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1091 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1096 if($part->getSubscribers())
1098 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1099 if($ilUser->getPref(
'grp_subscriber_hide'))
1102 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1103 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1104 $this->lng->txt(
'show'),
1107 $this->ctrl->clearParameters($this);
1112 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1113 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1114 $this->lng->txt(
'hide'),
1117 $this->ctrl->clearParameters($this);
1119 $table_gui->readSubscriberData();
1120 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1121 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1124 if(count($part->getAdmins()))
1126 if($ilUser->getPref(
'grp_admin_hide'))
1129 $this->ctrl->setParameter($this,
'admin_hide',0);
1130 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1131 $this->lng->txt(
'show'),
1134 $this->ctrl->clearParameters($this);
1139 $this->ctrl->setParameter($this,
'admin_hide',1);
1140 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1141 $this->lng->txt(
'hide'),
1144 $this->ctrl->clearParameters($this);
1146 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.gif',$this->lng->txt(
'grp_admins'));
1148 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1151 if(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1153 if($ilUser->getPref(
'grp_member_hide'))
1156 $this->ctrl->setParameter($this,
'member_hide',0);
1158 $this->lng->txt(
'show'),
1161 $this->ctrl->clearParameters($this);
1166 $this->ctrl->setParameter($this,
'member_hide',1);
1168 $this->lng->txt(
'hide'),
1171 $this->ctrl->clearParameters($this);
1174 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.gif',$this->lng->txt(
'grp_members'));
1175 $table_gui->parse($this->
readMemberData(
$GLOBALS[
'rbacreview']->assignedUsers($this->object->getDefaultMemberRole())));
1176 $this->tpl->setCurrentBlock(
'member_block');
1177 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1178 $this->tpl->parseCurrentBlock();
1184 if(!(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1188 if($ilUser->getPref(
'grp_role_hide'.$role_id))
1191 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,0);
1192 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1193 $this->lng->txt(
'show'),
1196 $this->ctrl->clearParameters($this);
1201 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,1);
1202 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1203 $this->lng->txt(
'hide'),
1206 $this->ctrl->clearParameters($this);
1211 $this->tpl->setCurrentBlock(
'member_block');
1212 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1213 $this->tpl->parseCurrentBlock();
1216 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1217 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1218 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1219 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1236 if(!count(
$_POST[
'subscribers']))
1243 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1246 $this->
object->members_obj->sendNotification(
1252 $this->
object->members_obj->deleteSubscriber($usr_id);
1254 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1258 $this->ctrl->redirect($this,
'members');
1274 if(!count(
$_POST[
'subscribers']))
1281 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1284 $this->
object->members_obj->sendNotification(
1288 $this->
object->members_obj->deleteSubscriber($usr_id);
1307 if(!count(
$_POST[
"waiting"]))
1314 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1317 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1320 foreach(
$_POST[
"waiting"] as $user_id)
1326 if($this->object->members_obj->isAssigned($user_id))
1331 $this->
object->members_obj->sendNotification(
1337 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1352 $this->searchObject();
1368 if(!count(
$_POST[
'waiting']))
1375 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1378 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1379 foreach(
$_POST[
"waiting"] as $user_id)
1382 $this->
object->members_obj->sendNotification(
1403 $this->tabs_gui->setTabActive(
'members');
1404 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1406 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1408 if(!count($participants_to_delete))
1418 $admins_after = (array) array_diff($admins, $participants_to_delete);
1419 if(!count($admins_after) and count($admins))
1426 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1428 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1429 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1430 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1431 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1433 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles'])) as $participants)
1435 $confirm->addItem(
'participants[]',
1436 $participants[
'usr_id'],
1437 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1441 $this->tpl->setContent($confirm->getHTML());
1455 if(!count(
$_POST[
'participants']))
1462 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1465 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1466 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1467 foreach(
$_POST[
'participants'] as $part)
1469 $this->
object->members_obj->sendNotification(
1491 if(isset(
$_GET[
'member_id']))
1493 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1497 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1498 (array) $_POST[
'members'],
1499 (array) $_POST[
'roles'],
1500 (array) $_POST[
'waiting'],
1501 (array) $_POST[
'subscribers']));
1503 if (!count(
$_POST[
'participants']))
1514 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1519 array(
'type' =>
'new',
'rcp_to' => implode(
',',$rcps),
'sig' => $this->
createMailSignature())));
1533 if(isset(
$_GET[
'admin_hide']))
1535 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1537 if(isset(
$_GET[
'member_hide']))
1539 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1541 if(isset(
$_GET[
'subscriber_hide']))
1543 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1545 if(isset(
$_GET[
'wait_hide']))
1547 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1558 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1572 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1574 if(!count($participants))
1582 $this->tabs_gui->setTabActive(
'members');
1583 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1585 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1587 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.gif',$this->lng->txt(
'grp_mem_change_status'));
1590 $this->tpl->setContent($table_gui->getHTML());
1605 if(!count(
$_POST[
'participants']))
1614 $admin_role = $this->
object->getDefaultAdminRole();
1617 if(!isset(
$_POST[
'roles'][$admin_id]))
1622 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1632 $_POST[
'members'] = $_POST[
'participants'];
1637 $admin_role = $this->
object->getDefaultAdminRole();
1639 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1643 $notification =
false;
1644 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1646 $notification =
true;
1648 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1650 $notification =
true;
1654 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1657 $this->
object->members_obj->updateNotification($usr_id,0);
1659 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1661 $this->
object->members_obj->updateNotification($usr_id,1);
1666 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1667 $this->
object->members_obj->sendNotification(
1689 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1690 foreach($this->object->members_obj->getAdmins() as $admin_id)
1692 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1727 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1729 $tpl =
new ilTemplate(
'tpl.unsubscribe.html',
true,
true,
'Modules/Group');
1730 $tpl->setVariable(
'UNSUB_FORMACTION',$this->ctrl->getFormAction($this));
1731 $tpl->setVariable(
'TXT_SUBMIT',$this->lng->txt(
'grp_btn_unsubscribe'));
1732 $tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
1735 $this->tpl->setContent(
$tpl->get());
1746 global $ilUser,
$tree;
1753 $admins_after = (array) array_diff($admins, array($ilUser->getId()));
1754 if(!count($admins_after) and count($admins))
1761 $this->
object->members_obj->delete($ilUser->getId());
1763 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1764 $this->
object->members_obj->sendNotification(
1768 $this->
object->members_obj->sendNotification(
1773 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1777 ilUtil::redirect(
'repository.php?ref_id='.$tree->getParentId($this->object->getRefId()));
1787 $user_ids =
$_POST[
"id"];
1789 if (empty($user_ids[0]))
1792 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1795 foreach ($user_ids as $new_member)
1797 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1799 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1806 $this->ctrl->redirect($this,
'members');
1815 include_once
'Services/Mail/classes/class.ilMail.php';
1818 if (empty($user_ids[0]))
1820 $GLOBALS[
'lng']->loadLanguageModule(
'search');
1825 foreach ($user_ids as $new_member)
1830 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1832 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1837 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1839 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1846 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1847 $this->
object->members_obj->sendNotification(
1852 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1857 unset(
$_SESSION[
'grp_usr_search_result']);
1860 $this->ctrl->redirect($this,
'members');
1868 global $rbacreview, $ilObjDataCache,
$ilias;
1869 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1871 $this->lng->loadLanguageModule(
'mail');
1872 if(!isset(
$_GET[
'returned_from_mail']))
1878 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1882 $this->tabs_gui->setTabActive(
'members');
1884 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1887 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1888 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1891 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1892 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1893 $role_addrs = array();
1896 $sorted_role_ids = array();
1898 foreach($role_ids as $role_id)
1903 $sorted_role_ids[1] = $role_id;
1907 $sorted_role_ids[0] = $role_id;
1911 $sorted_role_ids[$counter++] = $role_id;
1915 ksort($sorted_role_ids,SORT_NUMERIC);
1916 foreach ((array) $sorted_role_ids as $role_id)
1918 $this->tpl->setCurrentBlock(
"mailbox_row");
1919 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1923 if(count($ids_for_role_title) >= 2)
1925 $ilias->setSetting(
'pear_mail_enable', 1);
1929 htmlspecialchars($role_addr)
1935 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1942 $this->tpl->parseCurrentBlock();
1952 $user_ids =
$_POST[
"user_id"];
1954 if (empty($user_ids[0]))
1956 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1958 include_once
'Services/Mail/classes/class.ilMail.php';
1961 foreach ($user_ids as $new_member)
1963 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1965 $this->
object->deleteApplicationListEntry($new_member);
1966 $mail->sendMail($user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
1970 $this->ctrl->redirect($this,
'members');
1976 global $rbacsystem, $ilUser, $ilAccess,
$lng;
1978 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
1980 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
1981 $this->ctrl->getLinkTarget($this,
""));
1983 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
1985 $tabs_gui->addTarget(
"info_short",
1986 $this->ctrl->getLinkTargetByClass(
1987 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
1993 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1995 $tabs_gui->addTarget(
"settings",
1996 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2004 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2005 if($mem_cmd !=
"membersGallery" || $is_participant)
2007 $tabs_gui->addTarget(
"members",
2008 $this->ctrl->getLinkTarget($this, $mem_cmd),
2014 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2017 $tabs_gui->addTarget(
'learning_progress',
2018 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2020 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2024 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2026 $tabs_gui->addTarget(
2028 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2048 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2049 !$this->object->members_obj->isAssigned($ilUser->getId()))
2051 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2056 $this->lng->txt(
'membership_leave'),
2057 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2064 $tabs_gui->addTarget(
"join",
2065 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2070 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2071 $this->object->members_obj->isMember($ilUser->getId()))
2073 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2074 $this->ctrl->getLinkTarget($this,
"leave"),
2084 if(!is_array($_FILES[
'xmldoc']))
2091 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2095 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2107 include_once
'./Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
2109 if(!is_object($this->chi_obj))
2111 if(
$_GET[
'item_id'])
2114 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
2133 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html");
2134 $this->tpl->setCurrentBlock(
"adm_content");
2135 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2136 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2137 $this->tpl->parseCurrentBlock();
2148 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2149 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2151 $workbook = $adapter->getWorkbook();
2153 $format_bold =& $workbook->addFormat();
2154 $format_bold->setBold();
2155 $format_percent =& $workbook->addFormat();
2156 $format_percent->setNumFormat(
"0.00%");
2157 $format_datetime =& $workbook->addFormat();
2158 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2159 $format_title =& $workbook->addFormat();
2160 $format_title->setBold();
2161 $format_title->setColor(
'black');
2162 $format_title->setPattern(1);
2163 $format_title->setFgColor(
'silver');
2164 $worksheet =& $workbook->addWorksheet();
2166 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2167 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2168 "fax",
"matriculation");
2169 foreach ($profile_data as
$data)
2171 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2173 $member_ids = $this->
object->getGroupMemberIds();
2175 foreach ($member_ids as $member_id)
2178 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2179 if ($member->getPref(
"public_email")==
"y")
2181 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2187 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2188 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2189 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2190 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2191 if ($member->getPref(
"public_institution")==
"y")
2193 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2199 if ($member->getPref(
"public_department")==
"y")
2201 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2207 if ($member->getPref(
"public_street")==
"y")
2209 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2215 if ($member->getPref(
"public_zip")==
"y")
2217 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2223 if ($member->getPref(
"public_city")==
"y")
2225 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2231 if ($member->getPref(
"public_country")==
"y")
2233 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2239 if ($member->getPref(
"public_phone_office")==
"y")
2241 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2247 if ($member->getPref(
"public_phone_home")==
"y")
2249 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2255 if ($member->getPref(
"public_phone_mobile")==
"y")
2257 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2263 if ($member->getPref(
"public_fax")==
"y")
2265 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2271 if ($member->getPref(
"public_matriculation")==
"y")
2273 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2294 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2309 $this->ctrl->setCmd(
"showSummary");
2310 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2321 $this->tabs_gui->setTabActive(
'info_short');
2323 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2325 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2328 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2331 if(strlen($this->object->getInformation()))
2333 $info->addSection($this->lng->txt(
'grp_general_informations'));
2334 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2338 $info->enablePrivateNotes();
2339 $info->enableLearningProgress(
true);
2341 $info->addSection($this->lng->txt(
'group_registration'));
2342 $info->showLDAPRoleGroupMappingInfo();
2344 if(!$this->object->isRegistrationEnabled())
2346 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2347 $this->lng->txt(
'grp_reg_deac_info_screen'));
2352 switch($this->object->getRegistrationType())
2355 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2356 $this->lng->txt(
'grp_reg_direct_info_screen'));
2360 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2361 $this->lng->txt(
'grp_reg_req_info_screen'));
2365 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2366 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2376 if($this->object->isRegistrationUnlimited())
2378 $info->addProperty($this->lng->txt(
'group_registration_time'),
2379 $this->lng->txt(
'grp_registration_unlimited'));
2381 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2383 $info->addProperty($this->lng->txt(
"group_registration_time"),
2384 $this->lng->txt(
'cal_until').
' '.
2387 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2389 $info->addProperty($this->lng->txt(
"group_registration_time"),
2390 $this->lng->txt(
'cal_from').
' '.
2393 if ($this->object->isMembershipLimited())
2395 $info->addProperty($this->lng->txt(
"mem_free_places"),
2396 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2403 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2406 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2409 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2413 $this->lng->loadLanguageModule(
'ps');
2414 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2415 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2419 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2425 $this->ctrl->forwardCommand($info);
2435 $ilUser->setPref(
"grpcrs_ntf_".$this->ref_id, (
bool)
$_REQUEST[
"grp_ntf"]);
2436 $ilUser->writePrefs();
2439 $this->ctrl->redirect($this,
"infoScreen");
2449 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2450 if(substr($a_add,0,5) ==
'rcode')
2452 if($ilUser->getId() == ANONYMOUS_USER_ID)
2456 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2457 $ilUser->getCurrentLanguage()
2469 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2471 $_GET[
"cmd"] =
"members";
2472 $_GET[
"ref_id"] = $a_target;
2473 include(
"repository.php");
2477 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2479 $_GET[
"cmd"] =
"frameset";
2480 $_GET[
"ref_id"] = $a_target;
2481 include(
"repository.php");
2487 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2489 $_GET[
"cmd"] =
"infoScreen";
2490 $_GET[
"ref_id"] = $a_target;
2491 include(
"repository.php");
2496 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2498 $_GET[
"cmd"] =
"frameset";
2499 $_GET[
"target"] =
"";
2500 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2503 include(
"repository.php");
2508 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2523 if(is_object($this->form))
2528 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2534 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2538 $this->form->setTableWidth(
'600px');
2539 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2545 $title->setSubmitFormOnEnter(
true);
2546 $title->setValue($this->object->getTitle());
2548 $title->setMaxLength(128);
2549 $title->setRequired(
true);
2550 $this->form->addItem(
$title);
2554 $desc->
setValue($this->object->getLongDescription());
2557 $this->form->addItem($desc);
2562 if($a_mode ==
'edit')
2564 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2568 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2572 $grp_type->setRequired(
true);
2577 $grp_type->addOption($opt_public);
2582 $grp_type->addOption($opt_closed);
2583 if($a_mode ==
'update_group_type')
2585 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2587 $this->form->addItem($grp_type);
2589 if($a_mode ==
'edit')
2593 $pres->setTitle($this->lng->txt(
'grp_setting_header_registration'));
2594 $this->form->addItem($pres);
2597 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'group_registration_mode'),
'registration_type');
2598 $reg_type->
setValue($this->object->getRegistrationType());
2601 $reg_type->addOption($opt_dir);
2605 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2606 $pass->
setValue($this->object->getPassword());
2608 $pass->setMaxLength(32);
2610 $reg_type->addOption($opt_pass);
2613 $reg_type->addOption($opt_req);
2616 $reg_type->addOption($opt_deact);
2619 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2620 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2621 $reg_code->setValue(1);
2622 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2623 $this->form->addItem($reg_type);
2626 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2627 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2628 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2630 $this->lng->loadLanguageModule(
'dateplaner');
2631 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2632 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2635 $dur->setEndText($this->lng->txt(
'cal_end'));
2636 $dur->setMinuteStepSize(5);
2637 $dur->setShowDate(
true);
2638 $dur->setShowTime(
true);
2639 $dur->setStart($this->object->getRegistrationStart());
2640 $dur->setEnd($this->object->getRegistrationEnd());
2642 $time_limit->addSubItem($dur);
2643 $this->form->addItem($time_limit);
2646 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2648 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2649 $lim->setChecked($this->object->isMembershipLimited());
2653 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2654 $max->setTitle($this->lng->txt(
'members').
':');
2656 $max->setMaxLength(4);
2657 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2658 $lim->addSubItem($max);
2662 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2663 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2664 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2665 $lim->addSubItem($wait);
2666 $this->form->addItem($lim);
2670 if(!$this->object->getRegistrationAccessCode())
2672 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2676 $reg_link->setValue($this->object->getRegistrationAccessCode());
2677 $this->form->addItem($reg_link);
2680 include_once
'./classes/class.ilLink.php';
2681 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2682 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2683 $reg_code->addSubItem($link);
2684 $this->form->addItem($reg_code);
2688 $hasParentCourse = $tree->checkForParentType($this->object->getRefId(),
'crs');
2690 $pres->setTitle($this->lng->txt(
'grp_setting_header_presentation'));
2691 $this->form->addItem($pres);
2695 $view_type->
setValue($this->object->getViewMode());
2697 if($hasParentCourse)
2700 $opt->
setInfo($this->lng->txt(
'grp_view_inherit_info'));
2701 $view_type->addOption($opt);
2705 $opt->
setInfo($this->lng->txt(
'grp_view_info_by_type'));
2706 $view_type->addOption($opt);
2707 $this->form->addItem($view_type);
2710 $opt->
setInfo($this->lng->txt(
'grp_view_info_simple'));
2711 $view_type->addOption($opt);
2716 if($a_mode ==
'edit')
2720 elseif($hasParentCourse)
2729 if($hasParentCourse)
2734 $title = $this->lng->txt(
'sort_inherit_prefix');
2737 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
2738 $sog->addOption($sde);
2743 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
2744 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
2745 $sog->addOption($sma);
2749 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
2750 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
2751 $sog->addOption($sti);
2753 $this->form->addItem($sog);
2760 $this->form->setTitle($this->lng->txt(
'grp_new'));
2763 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2764 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2768 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2771 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2772 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2775 case 'update_group_type':
2776 $grp_type->setValue(
2782 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2802 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2803 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2804 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2805 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2806 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2807 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2808 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2826 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2828 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2829 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2830 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2831 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2832 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2833 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2848 global $rbacsystem,$ilUser,$ilAccess;
2854 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2856 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2857 $this->ctrl->getLinkTarget($this,
'members'),
2862 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2863 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2864 "membersGallery", get_class($this));
2867 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2869 $this->object->getEnableGroupMap())
2871 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2872 $this->ctrl->getLinkTarget($this,
'membersMap'),
2873 "membersMap", get_class($this));
2876 $this->tabs_gui->addSubTabTarget(
"mail_members",
2877 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2878 "mailMembers", get_class($this));
2880 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2883 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2884 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2885 "",
'ilmemberexportgui');
2891 $this->tabs_gui->addSubTabTarget(
"activation",
2892 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
2893 "edit", get_class($this));
2894 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
2895 $this->tabs_gui->addSubTabTarget(
"preconditions",
2896 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
2897 "",
"ilConditionHandlerInterface");
2901 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2902 $this->ctrl->getLinkTarget($this,
'edit'),
2903 "edit", get_class($this));
2905 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2906 $this->ctrl->getLinkTarget($this,
'editInfo'),
2907 "editInfo", get_class($this));
2910 if ($this->ilias->getSetting(
"custom_icons"))
2912 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2913 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2914 "editGroupIcons", get_class($this));
2917 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2920 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2921 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2922 "editMapSettings", get_class($this));
2925 $this->tabs_gui->addSubTabTarget(
'groupings',
2926 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
2930 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2931 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2935 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
2936 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
2938 'ilobjectcustomuserfieldsgui');
2957 global $ilUser,$ilAccess;
2959 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2965 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2970 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2976 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2977 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2987 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3024 $link = chr(13).chr(10).chr(13).chr(10);
3025 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3026 $link .= chr(13).chr(10).chr(13).chr(10);
3027 include_once
'./classes/class.ilLink.php';
3029 return rawurlencode(base64_encode($link));
3038 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3039 if($ilSetting->get(
"crsgrp_ntf") &&
3042 if(!$ilUser->getPref(
"grpcrs_ntf_".$this->ref_id))
3044 $lg->addHeaderIcon(
"not_icon",
3046 $this->lng->txt(
"grp_notification_deactivated"));
3048 $this->ctrl->setParameter($this,
"grp_ntf", 1);
3049 $caption =
"grp_activate_notification";
3053 $lg->addHeaderIcon(
"not_icon",
3055 $this->lng->txt(
"grp_notification_activated"));
3057 $this->ctrl->setParameter($this,
"grp_ntf", 0);
3058 $caption =
"grp_deactivate_notification";
3061 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
"saveNotification"),
3065 $this->ctrl->setParameter($this,
"grp_ntf",
"");