5 include_once
"./Services/Container/classes/class.ilContainerGUI.php";
6 include_once(
'./Modules/Group/classes/class.ilObjGroup.php');
31 public function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output =
false)
34 $this->
ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
36 $this->lng->loadLanguageModule(
'grp');
43 $next_class = $this->ctrl->getNextClass($this);
44 $cmd = $this->ctrl->getCmd();
52 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
54 include_once(
"./Services/Link/classes/class.ilLink.php");
55 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
61 case 'ilgroupregistrationgui':
62 $this->ctrl->setReturn($this,
'');
63 $this->tabs_gui->setTabActive(
'join');
64 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
66 $this->ctrl->forwardCommand($registration);
69 case 'ilpermissiongui':
70 $this->tabs_gui->setTabActive(
'perm_settings');
71 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
73 $ret =& $this->ctrl->forwardCommand($perm_gui);
76 case 'ilrepositorysearchgui':
77 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
79 $rep_search->setCallback($this,
85 $this->tabs_gui->setTabActive(
'members');
86 $this->ctrl->setReturn($this,
'members');
87 $ret =& $this->ctrl->forwardCommand($rep_search);
89 $this->tabs_gui->setSubTabActive(
'members');
92 case "ilinfoscreengui":
96 case "illearningprogressgui":
97 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
100 $this->object->getRefId(),
101 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
102 $this->ctrl->forwardCommand($new_gui);
103 $this->tabs_gui->setTabActive(
'learning_progress');
106 case 'ilobjcoursegroupinggui':
109 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
110 $this->ctrl->setReturn($this,
'edit');
112 $this->ctrl->forwardCommand($crs_grp_gui);
114 $this->tabs_gui->setTabActive(
'settings');
115 $this->tabs_gui->setSubTabActive(
'groupings');
118 case 'ilcoursecontentgui':
120 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
122 $this->ctrl->forwardCommand($course_content_obj);
125 case 'ilpublicuserprofilegui':
126 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
128 $this->tabs_gui->setTabActive(
'group_members');
129 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
131 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
132 $html = $this->ctrl->forwardCommand($profile_gui);
133 $this->tpl->setVariable(
"ADM_CONTENT", $html);
137 $this->tabs_gui->setTabActive(
'none');
139 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
140 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
146 case "ilcontainerpagegui":
150 $this->tpl->setContent(
$ret);
154 case 'ilobjectcopygui':
155 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
158 $this->ctrl->forwardCommand($cp);
161 case "ilobjstylesheetgui":
165 case 'ilobjectcustomuserfieldsgui':
168 $this->ctrl->setReturn($this,
'members');
170 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
173 $this->tabs_gui->setTabActive(
'settings');
174 $this->ctrl->forwardCommand($cdf_gui);
177 case 'ilmemberagreementgui':
178 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
179 $this->ctrl->setReturn($this,
'');
180 $this->tabs_gui->setTabActive(
'view_content');
182 $this->ctrl->forwardCommand($agreement);
186 $this->tabs_gui->setTabActive(
'export');
187 include_once
'./Services/Export/classes/class.ilExportGUI.php';
189 $exp->addFormat(
'xml');
190 $this->ctrl->forwardCommand($exp);
193 case 'ilmemberexportgui':
194 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
197 $this->tabs_gui->setTabActive(
'members');
198 $this->tabs_gui->setSubTabActive(
'export_members');
200 $this->ctrl->forwardCommand($export);
203 case "ilcommonactiondispatchergui":
204 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
206 $this->ctrl->forwardCommand($gui);
209 case 'ilobjectservicesettingsgui':
210 $this->ctrl->setReturn($this,
'edit');
212 $this->tabs_gui->activateTab(
'settings');
213 $this->tabs_gui->activateSubTab(
'tool_settings');
215 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
218 $this->object->getId(),
222 $this->ctrl->forwardCommand($service);
225 case 'ilsessionoverviewgui':
227 $this->tabs_gui->setTabActive(
'members');
228 $this->tabs_gui->setSubTabActive(
'events');
230 include_once
'./Modules/Group/classes/class.ilGroupParticipants.php';
233 include_once(
'./Modules/Session/classes/class.ilSessionOverviewGUI.php');
235 $this->ctrl->forwardCommand($overview);
242 !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp') and
243 !$ilAccess->checkAccess(
'read',
'',$this->object->getRefId(),
'grp') )
245 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
249 if(
$cmd ==
'infoScreenGoto')
251 if($this->object->isRegistrationEnabled())
263 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
267 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
269 $this->ctrl->redirect($this,
"infoScreen");
273 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
274 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
293 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
295 $this->
object->getRefId(),
'grp');
297 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
305 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
306 $this->tabs_gui->setTabActive(
'view_content');
307 $this->ctrl->setReturn($this,
'view');
309 $this->ctrl->setCmdClass(get_class($agreement));
310 $this->ctrl->forwardCommand($agreement);
314 $this->tabs_gui->setTabActive(
'view_content');
325 $ilTabs->activateTab(
"view_content");
339 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
341 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
342 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
346 $this->object->getRefId());
352 if(!is_object($this->
object))
393 $ilErr->setMessage(
'');
395 if(!$this->object->validate())
397 $err = $this->lng->txt(
'err_check_input');
399 $err = $ilErr->getMessage();
405 $this->
object->create();
407 $this->
object->initGroupStatus($this->object->getGroupType());
412 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'crs') ||
413 $GLOBALS[
'tree']->checkForParentType($this->object->getRefId(),
'grp')
419 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
426 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
429 $members_obj->updateNotification($ilUser->getId(),1);
433 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
434 $this->ctrl->redirect($this,
"edit");
449 $this->tabs_gui->setTabActive(
'settings');
450 $this->tabs_gui->setSubTabActive(
'grp_settings');
454 $this->tpl->setVariable(
'ADM_CONTENT',$this->form->getHTML());
466 $type = $this->
object->getGroupType() ?
467 $this->
object->getGroupType() :
468 $this->
object->readGroupStatus();
478 $this->
object->updateGroupType();
479 $this->
object->update();
481 $this->ctrl->redirect($this,
'edit');
498 $this->form->checkInput();
500 $old_type = $this->
object->getGroupType();
503 $ilErr->setMessage(
'');
505 if(!$this->object->validate())
507 $err = $this->lng->txt(
'err_check_input');
509 $err = $ilErr->getMessage();
516 if($this->object->isGroupTypeModified($old_type))
519 $this->
object->setGroupType($old_type);
522 $this->
object->update();
525 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
527 $this->object->getId(),
541 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
548 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
550 $ecs->handleSettingsUpdate();
554 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
557 $confirm->setFormAction($this->ctrl->getFormAction($this));
560 $this->object->getGroupType(),
561 $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'))
563 $confirm->addButton($this->lng->txt(
'grp_change_type'),
'updateGroupType');
564 $confirm->setCancel($this->lng->txt(
'cancel'),
'edit');
566 $this->tpl->setContent($confirm->getHTML());
572 $this->ctrl->redirect($this,
'edit');
587 $this->tabs_gui->setTabActive(
'settings');
588 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
595 $tpl->setContent($a_form->getHTML());
600 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
602 $form->setFormAction($this->ctrl->getFormAction($this));
607 $form->addCommandButton(
'updateGroupIcons', $this->lng->txt(
'save'));
625 if($form->checkInput())
628 if ($ilSetting->get(
"custom_icons"))
630 if(
$_POST[
"cont_icon_delete"])
632 $this->
object->removeCustomIcon();
634 $this->
object->saveIcons($_FILES[
"cont_icon"][
'tmp_name']);
637 $this->ctrl->redirect($this,
"editGroupIcons");
640 $form->setValuesByPost();
652 $this->tabs_gui->setTabActive(
'settings');
653 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
655 include_once(
'./Services/Maps/classes/class.ilMapUtil.php');
657 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
662 $latitude = $this->
object->getLatitude();
663 $longitude = $this->
object->getLongitude();
664 $zoom = $this->
object->getLocationZoom();
667 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
670 $latitude = $def[
"latitude"];
671 $longitude = $def[
"longitude"];
672 $zoom = $def[
"zoom"];
676 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
678 $form->setFormAction($ilCtrl->getFormAction($this));
680 $form->setTitle($this->lng->txt(
"grp_map_settings"));
686 $public->setChecked($this->object->getEnableGroupMap());
687 $form->addItem($public);
693 $loc_prop->setLongitude($longitude);
694 $loc_prop->setZoom($zoom);
695 $form->addItem($loc_prop);
697 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
699 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
710 $this->
object->update();
712 $ilCtrl->redirect($this,
"editMapSettings");
723 $this->tabs_gui->setTabActive(
'members');
725 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
732 $map->setMapId(
"group_map")
735 ->setLatitude($this->object->getLatitude())
736 ->setLongitude($this->object->getLongitude())
737 ->setZoom($this->object->getLocationZoom())
738 ->setEnableTypeControl(
true)
739 ->setEnableNavigationControl(
true)
740 ->setEnableCentralMarker(
true);
743 $member_ids = $this->
object->getGroupMemberIds();
744 $admin_ids = $this->
object->getGroupAdminIds();
747 $members = $this->
object->getGroupMemberData($member_ids);
748 foreach($member_ids as $user_id)
750 $map->addUserMarker($user_id);
752 $tpl->setContent($map->getHTML());
753 $tpl->setLeftContent($map->getUserListHTML());
770 $this->tabs_gui->setTabActive(
'settings');
771 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
774 $this->tpl->setContent($this->form->getHTML());
785 if(is_object($this->form))
790 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
792 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
793 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
794 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
795 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
798 $area->
setInfo($this->lng->txt(
'grp_information_info'));
799 $area->setValue($this->object->getInformation());
802 $this->form->addItem($area);
816 $this->
object->update();
831 global $rbacsystem, $ilAccess,
$ilUser, $ilToolbar;
833 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
835 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
838 $this->tabs_gui->setTabActive(
'members');
840 $member_ids = $this->
object->getGroupMemberIds();
841 $admin_ids = $this->
object->getGroupAdminIds();
844 $members = $this->
object->getGroupMemberData($member_ids);
851 $ordered_members = array();
853 foreach($members as $member)
861 if(!$usr_obj->getActive())
869 array_push($ordered_members,array(
"id" => $member[
"id"],
870 "login" => $usr_obj->getLogin(),
871 "lastname" => $usr_obj->getLastName(),
872 "firstname" => $usr_obj->getFirstName(),
873 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
874 "usr_obj" => $usr_obj));
879 foreach($ordered_members as $member) {
881 $usr_obj = $member[
"usr_obj"];
883 $public_profile = $usr_obj->getPref(
"public_profile");
884 if ($public_profile ==
"g")
886 $public_profile =
"y";
890 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
891 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
894 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
896 switch(in_array($member[
"id"],$admin_ids))
900 if ($public_profile ==
"y")
902 $this->tpl->setCurrentBlock(
"member_linked");
903 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
904 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
905 $this->tpl->parseCurrentBlock();
909 $this->tpl->setCurrentBlock(
"member_not_linked");
910 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
911 $this->tpl->parseCurrentBlock();
913 $this->tpl->setCurrentBlock(
"member");
917 if ($public_profile ==
"y")
919 $this->tpl->setCurrentBlock(
"member_linked");
920 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
921 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
922 $this->tpl->parseCurrentBlock();
926 $this->tpl->setCurrentBlock(
"member_not_linked");
927 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
928 $this->tpl->parseCurrentBlock();
930 $this->tpl->setCurrentBlock(
"member");
934 if (in_array($member[
"id"],$admin_ids)) {
935 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Admin");
938 $this->tpl->setVariable(
"MEMBER_CLASS",
"il_Member");
943 if ($public_profile ==
"y")
945 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
946 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
948 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
949 $this->tpl->parseCurrentBlock();
951 $this->tpl->setCurrentBlock(
"members");
953 $this->tpl->parseCurrentBlock();
956 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
963 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
966 if($this->show_tracking)
968 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
974 if($privacy->enabledGroupAccessTimes())
976 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
980 $do_prtf = (is_array($selected_columns) &&
981 in_array(
'prtf', $selected_columns) &&
985 include_once
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
987 $this->ctrl->getLinkTarget($this,
"members"));
990 foreach($ids as $usr_id)
993 $tmp_data[
'firstname'] = $name[
'firstname'];
994 $tmp_data[
'lastname'] = $name[
'lastname'];
996 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
997 $tmp_data[
'usr_id'] = $usr_id;
1000 if($this->show_tracking)
1002 if(in_array($usr_id,$completed))
1006 elseif(in_array($usr_id,$in_progress))
1010 elseif(in_array($usr_id,
$failed))
1020 if($privacy->enabledGroupAccessTimes())
1022 if(isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts'])
1026 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
1030 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1031 $tmp_data[
'access_time_unix'] = 0;
1037 $tmp_data[
'prtf'] = $all_prtf[$usr_id];
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';
1063 if($this->show_tracking)
1065 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
1067 $this->show_tracking = $olp->isActive();
1073 $this->tabs_gui->setTabActive(
'members');
1074 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1076 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1077 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1080 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
1085 'auto_complete_name' => $lng->txt(
'user'),
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'));
1110 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1112 if(count($wait = $waiting_list->getAllUsers()))
1114 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1115 if($ilUser->getPref(
'grp_wait_hide'))
1118 $this->ctrl->setParameter($this,
'wait_hide',0);
1119 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1120 $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'));
1129 $this->ctrl->clearParameters($this);
1131 $table_gui->setUsers($wait);
1132 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.svg',$this->lng->txt(
'group_new_registrations'));
1133 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1138 if($part->getSubscribers())
1140 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1141 if($ilUser->getPref(
'grp_subscriber_hide'))
1144 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1145 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1146 $this->lng->txt(
'show'));
1147 $this->ctrl->clearParameters($this);
1152 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1153 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1154 $this->lng->txt(
'hide'));
1155 $this->ctrl->clearParameters($this);
1157 $table_gui->readSubscriberData();
1158 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.svg',$this->lng->txt(
'group_new_registrations'));
1159 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1162 if(count($part->getAdmins()))
1164 if($ilUser->getPref(
'grp_admin_hide'))
1167 $this->ctrl->setParameter($this,
'admin_hide',0);
1168 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1169 $this->lng->txt(
'show'));
1170 $this->ctrl->clearParameters($this);
1175 $this->ctrl->setParameter($this,
'admin_hide',1);
1176 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1177 $this->lng->txt(
'hide'));
1178 $this->ctrl->clearParameters($this);
1180 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.svg',$this->lng->txt(
'grp_admins'));
1182 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1185 if(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1187 if($ilUser->getPref(
'grp_member_hide'))
1190 $this->ctrl->setParameter($this,
'member_hide',0);
1192 $this->lng->txt(
'show'));
1193 $this->ctrl->clearParameters($this);
1198 $this->ctrl->setParameter($this,
'member_hide',1);
1200 $this->lng->txt(
'hide'));
1201 $this->ctrl->clearParameters($this);
1204 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.svg',$this->lng->txt(
'grp_members'));
1205 $table_gui->parse($this->
readMemberData(
$GLOBALS[
'rbacreview']->assignedUsers($this->object->getDefaultMemberRole()),
1206 null, $table_gui->getSelectedColumns()));
1207 $this->tpl->setCurrentBlock(
'member_block');
1208 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1209 $this->tpl->parseCurrentBlock();
1215 if(!(
$GLOBALS[
'rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1219 if($ilUser->getPref(
'grp_role_hide'.$role_id))
1222 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,0);
1223 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1224 $this->lng->txt(
'show'));
1225 $this->ctrl->clearParameters($this);
1230 $this->ctrl->setParameter($this,
'role_hide_'.$role_id,1);
1231 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1232 $this->lng->txt(
'hide'));
1233 $this->ctrl->clearParameters($this);
1238 $this->tpl->setCurrentBlock(
'member_block');
1239 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1240 $this->tpl->parseCurrentBlock();
1243 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1244 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1245 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1246 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1263 if(!count(
$_POST[
'subscribers']))
1270 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1271 foreach(
$_POST[
'subscribers'] as $usr_id)
1273 $this->
object->members_obj->sendNotification(
1279 $this->
object->members_obj->deleteSubscriber($usr_id);
1283 $this->ctrl->redirect($this,
'members');
1299 if(!count(
$_POST[
'subscribers']))
1306 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1307 foreach(
$_POST[
'subscribers'] as $usr_id)
1309 $this->
object->members_obj->sendNotification(
1313 $this->
object->members_obj->deleteSubscriber($usr_id);
1332 if(!count(
$_POST[
"waiting"]))
1339 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1342 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1345 foreach(
$_POST[
"waiting"] as $user_id)
1351 if($this->object->members_obj->isAssigned($user_id))
1356 $this->
object->members_obj->sendNotification(
1367 $this->ctrl->redirect($this,
"members");
1374 $this->searchObject();
1390 if(!count(
$_POST[
'waiting']))
1397 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1400 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1401 foreach(
$_POST[
"waiting"] as $user_id)
1404 $this->
object->members_obj->sendNotification(
1411 $this->ctrl->redirect($this,
"members");
1424 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1426 if(!count($participants_to_delete))
1436 $admins_after = (array) array_diff($admins, $participants_to_delete);
1437 if(!count($admins_after) and count($admins))
1445 $this->tabs_gui->setTabActive(
'members');
1446 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1448 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1450 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1451 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1452 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1453 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1455 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles'])) as $participants)
1457 $confirm->addItem(
'participants[]',
1458 $participants[
'usr_id'],
1459 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1463 $this->tpl->setContent($confirm->getHTML());
1477 if(!count(
$_POST[
'participants']))
1484 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1487 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1488 foreach(
$_POST[
'participants'] as $part)
1490 $this->
object->members_obj->sendNotification(
1498 $this->ctrl->redirect($this,
"members");
1511 if(isset(
$_GET[
'member_id']))
1513 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1517 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1518 (array) $_POST[
'members'],
1519 (array) $_POST[
'roles'],
1520 (array) $_POST[
'waiting'],
1521 (array) $_POST[
'subscribers']));
1523 if (!count(
$_POST[
'participants']))
1529 foreach(
$_POST[
'participants'] as $usr_id)
1534 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1539 array(
'type' =>
'new',
'rcp_to' => implode(
',',$rcps),
'sig' => $this->
createMailSignature())));
1553 if(isset(
$_GET[
'admin_hide']))
1555 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1557 if(isset(
$_GET[
'member_hide']))
1559 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1561 if(isset(
$_GET[
'subscriber_hide']))
1563 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1565 if(isset(
$_GET[
'wait_hide']))
1567 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1578 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1592 $post_participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'], (array) $_POST[
'roles']));
1594 $participants = array_intersect((array) $post_participants, (array) $real_participants);
1596 if(!count($participants))
1604 $this->tabs_gui->setTabActive(
'members');
1605 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1607 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1609 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.svg',$this->lng->txt(
'grp_mem_change_status'));
1612 $this->tpl->setContent($table_gui->getHTML());
1627 if(!count(
$_POST[
'participants']))
1636 $admin_role = $this->
object->getDefaultAdminRole();
1639 if(!isset(
$_POST[
'roles'][$admin_id]))
1644 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1654 $_POST[
'members'] = $_POST[
'participants'];
1659 $admin_role = $this->
object->getDefaultAdminRole();
1661 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1662 foreach(
$_POST[
'participants'] as $usr_id)
1665 $notification =
false;
1666 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1668 $notification =
true;
1670 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1672 $notification =
true;
1676 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1679 $this->
object->members_obj->updateNotification($usr_id,0);
1681 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1683 $this->
object->members_obj->updateNotification($usr_id,1);
1688 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1689 $this->
object->members_obj->sendNotification(
1696 $this->ctrl->redirect($this,
"members");
1711 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1712 foreach($this->object->members_obj->getAdmins() as $admin_id)
1714 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1752 if($part->isLastAdmin($ilUser->getId()))
1759 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1761 include_once
"Services/Utilities/classes/class.ilConfirmationGUI.php";
1763 $cgui->setHeaderText($this->lng->txt(
'grp_dismiss_myself'));
1764 $cgui->setFormAction($this->ctrl->getFormAction($this));
1765 $cgui->setCancel($this->lng->txt(
"cancel"),
"cancel");
1766 $cgui->setConfirm($this->lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
1767 $this->tpl->setContent($cgui->getHTML());
1782 $this->
object->members_obj->delete($ilUser->getId());
1784 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1785 $this->
object->members_obj->sendNotification(
1789 $this->
object->members_obj->sendNotification(
1795 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
1796 $tree->getParentId($this->object->getRefId()));
1797 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1807 $user_ids =
$_POST[
"id"];
1809 if (empty($user_ids[0]))
1812 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1815 foreach ($user_ids as $new_member)
1817 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1819 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1826 $this->ctrl->redirect($this,
'members');
1835 if (empty($user_ids[0]))
1837 $GLOBALS[
'lng']->loadLanguageModule(
'search');
1844 foreach((array) $user_ids as $new_member)
1846 if($part->isAssigned($new_member))
1852 case $this->
object->getDefaultAdminRole():
1854 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1855 $part->sendNotification(
1864 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1865 $part->sendNotification(
1882 $this->ctrl->redirect($this,
'members');
1890 global $rbacreview, $ilObjDataCache,
$ilias;
1891 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1893 $this->lng->loadLanguageModule(
'mail');
1894 if(!isset(
$_GET[
'returned_from_mail']))
1899 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1902 $this->tabs_gui->setTabActive(
'members');
1903 $b_cmd =
$_GET[
"back_cmd"] ?
$_GET[
"back_cmd"] :
"members";
1904 $this->tabs_gui->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this,$b_cmd));
1907 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1910 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1911 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1914 $role_ids = $rbacreview->getRolesOfRoleFolder($this->object->getRefId(),
false);
1915 $role_addrs = array();
1918 $sorted_role_ids = array();
1920 foreach($role_ids as $role_id)
1925 $sorted_role_ids[1] = $role_id;
1929 $sorted_role_ids[0] = $role_id;
1933 $sorted_role_ids[$counter++] = $role_id;
1937 ksort($sorted_role_ids,SORT_NUMERIC);
1938 foreach ((array) $sorted_role_ids as $role_id)
1940 $this->tpl->setCurrentBlock(
"mailbox_row");
1941 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1945 if(count($ids_for_role_title) >= 2)
1947 $ilias->setSetting(
'pear_mail_enable', 1);
1951 htmlspecialchars($role_addr)
1954 if (ilMail::_usePearMail() && substr($role_addr, 0, 4) !=
'#il_')
1957 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1964 $this->tpl->parseCurrentBlock();
1974 $user_ids =
$_POST[
"user_id"];
1976 if (empty($user_ids[0]))
1978 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1980 include_once
'Services/Mail/classes/class.ilMail.php';
1983 foreach ($user_ids as $new_member)
1985 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1987 $this->
object->deleteApplicationListEntry($new_member);
1988 $mail->sendMail($user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
1992 $this->ctrl->redirect($this,
'members');
1998 global $rbacsystem,
$ilUser, $ilAccess,
$lng, $ilHelp;
2000 $ilHelp->setScreenIdComponent(
"grp");
2002 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2004 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2005 $this->ctrl->getLinkTarget($this,
""));
2007 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2009 $tabs_gui->addTarget(
"info_short",
2010 $this->ctrl->getLinkTargetByClass(
2011 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2017 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2019 $tabs_gui->addTarget(
"settings",
2020 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2028 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2029 if($mem_cmd !=
"membersGallery" || $is_participant)
2031 $tabs_gui->addTarget(
"members",
2032 $this->ctrl->getLinkTarget($this, $mem_cmd),
2038 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2041 $tabs_gui->addTarget(
'learning_progress',
2042 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2044 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2048 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2050 $tabs_gui->addTarget(
2052 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2072 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2073 !$this->object->members_obj->isAssigned($ilUser->getId()))
2075 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2080 $this->lng->txt(
'membership_leave'),
2081 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2088 $tabs_gui->addTarget(
"join",
2089 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2094 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2095 $this->object->members_obj->isMember($ilUser->getId()))
2097 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2098 $this->ctrl->getLinkTarget($this,
"leave"),
2108 if(!is_array($_FILES[
'xmldoc']))
2115 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2119 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2136 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html",
2138 $this->tpl->setCurrentBlock(
"adm_content");
2139 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2140 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2141 $this->tpl->parseCurrentBlock();
2152 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2153 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2155 $workbook = $adapter->getWorkbook();
2157 $format_bold =& $workbook->addFormat();
2158 $format_bold->setBold();
2159 $format_percent =& $workbook->addFormat();
2160 $format_percent->setNumFormat(
"0.00%");
2161 $format_datetime =& $workbook->addFormat();
2162 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2163 $format_title =& $workbook->addFormat();
2164 $format_title->setBold();
2165 $format_title->setColor(
'black');
2166 $format_title->setPattern(1);
2167 $format_title->setFgColor(
'silver');
2168 $worksheet =& $workbook->addWorksheet();
2170 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2171 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2172 "fax",
"matriculation");
2173 foreach ($profile_data as
$data)
2175 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2177 $member_ids = $this->
object->getGroupMemberIds();
2179 foreach ($member_ids as $member_id)
2182 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2183 if ($member->getPref(
"public_email")==
"y")
2185 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2191 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2192 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2193 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2194 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2195 if ($member->getPref(
"public_institution")==
"y")
2197 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2203 if ($member->getPref(
"public_department")==
"y")
2205 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2211 if ($member->getPref(
"public_street")==
"y")
2213 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2219 if ($member->getPref(
"public_zip")==
"y")
2221 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2227 if ($member->getPref(
"public_city")==
"y")
2229 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2235 if ($member->getPref(
"public_country")==
"y")
2237 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2243 if ($member->getPref(
"public_phone_office")==
"y")
2245 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2251 if ($member->getPref(
"public_phone_home")==
"y")
2253 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2259 if ($member->getPref(
"public_phone_mobile")==
"y")
2261 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2267 if ($member->getPref(
"public_fax")==
"y")
2269 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2275 if ($member->getPref(
"public_matriculation")==
"y")
2277 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2298 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2313 $this->ctrl->setCmd(
"showSummary");
2314 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2325 $this->tabs_gui->setTabActive(
'info_short');
2327 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2329 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2332 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2335 if(strlen($this->object->getInformation()))
2337 $info->addSection($this->lng->txt(
'grp_general_informations'));
2338 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2342 $info->enablePrivateNotes();
2343 $info->enableLearningProgress(
true);
2345 $info->addSection($this->lng->txt(
'group_registration'));
2346 $info->showLDAPRoleGroupMappingInfo();
2348 if(!$this->object->isRegistrationEnabled())
2350 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2351 $this->lng->txt(
'grp_reg_deac_info_screen'));
2356 switch($this->object->getRegistrationType())
2359 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2360 $this->lng->txt(
'grp_reg_direct_info_screen'));
2364 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2365 $this->lng->txt(
'grp_reg_req_info_screen'));
2369 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2370 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2380 if($this->object->isRegistrationUnlimited())
2382 $info->addProperty($this->lng->txt(
'group_registration_time'),
2383 $this->lng->txt(
'grp_registration_unlimited'));
2385 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2387 $info->addProperty($this->lng->txt(
"group_registration_time"),
2388 $this->lng->txt(
'cal_until').
' '.
2391 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2393 $info->addProperty($this->lng->txt(
"group_registration_time"),
2394 $this->lng->txt(
'cal_from').
' '.
2397 if ($this->object->isMembershipLimited())
2399 $info->addProperty($this->lng->txt(
"mem_free_places"),
2400 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2407 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2410 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2413 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2417 $this->lng->loadLanguageModule(
'ps');
2418 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2419 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2423 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2429 $this->ctrl->forwardCommand($info);
2439 $ilUser->setPref(
"grpcrs_ntf_".$this->ref_id, (
bool)
$_REQUEST[
"grp_ntf"]);
2440 $ilUser->writePrefs();
2443 $this->ctrl->redirect($this,
"infoScreen");
2449 public static function _goto($a_target, $a_add =
"")
2453 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2454 if(substr($a_add,0,5) ==
'rcode')
2456 if($ilUser->getId() == ANONYMOUS_USER_ID)
2460 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2461 $ilUser->getCurrentLanguage()
2473 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2478 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2485 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2491 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2499 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2514 if(is_object($this->form))
2519 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2525 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2529 $this->form->setTableWidth(
'600px');
2530 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2537 $title->setValue($this->object->getTitle());
2540 $title->setRequired(
true);
2541 $this->form->addItem($title);
2545 $desc->
setValue($this->object->getLongDescription());
2548 $this->form->addItem($desc);
2553 if($a_mode ==
'edit')
2555 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2559 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2563 $grp_type->setRequired(
true);
2568 $grp_type->addOption($opt_public);
2573 $grp_type->addOption($opt_closed);
2575 $this->form->addItem($grp_type);
2577 if($a_mode ==
'edit')
2581 $pres->setTitle($this->lng->txt(
'grp_setting_header_registration'));
2582 $this->form->addItem($pres);
2585 $reg_type =
new ilRadioGroupInputGUI($this->lng->txt(
'group_registration_mode'),
'registration_type');
2586 $reg_type->
setValue($this->object->getRegistrationType());
2589 $reg_type->addOption($opt_dir);
2593 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2594 $pass->
setValue($this->object->getPassword());
2596 $pass->setMaxLength(32);
2598 $reg_type->addOption($opt_pass);
2601 $reg_type->addOption($opt_req);
2604 $reg_type->addOption($opt_deact);
2607 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2608 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2609 $reg_code->setValue(1);
2610 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2611 $this->form->addItem($reg_type);
2614 if(!$this->object->getRegistrationAccessCode())
2616 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2620 $reg_link->setValue($this->object->getRegistrationAccessCode());
2621 $this->form->addItem($reg_link);
2624 include_once
'./Services/Link/classes/class.ilLink.php';
2625 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2626 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2627 $reg_code->addSubItem($link);
2628 $this->form->addItem($reg_code);
2632 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2634 $time_limit->
setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2636 $this->lng->loadLanguageModule(
'dateplaner');
2637 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2638 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2641 $dur->setEndText($this->lng->txt(
'cal_end'));
2642 $dur->setShowTime(
true);
2643 $dur->setStart($this->object->getRegistrationStart());
2644 $dur->setEnd($this->object->getRegistrationEnd());
2646 $time_limit->addSubItem($dur);
2647 $this->form->addItem($time_limit);
2650 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2653 $lim->setChecked($this->object->isMembershipLimited());
2656 $max =
new ilTextInputGUI($this->lng->txt(
'reg_grp_max_members'),
'registration_max_members');
2657 $max->
setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2660 $max->setMaxLength(4);
2661 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2662 $lim->addSubItem($max);
2667 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2668 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2669 $lim->addSubItem($wait);
2670 $this->form->addItem($lim);
2673 $hasParentMembership =
2675 $tree->checkForParentType($this->object->getRefId(),
'crs') ||
2676 $tree->checkForParentType($this->object->getRefId(),
'grp')
2680 $pres->setTitle($this->lng->txt(
'grp_setting_header_presentation'));
2681 $this->form->addItem($pres);
2685 if($hasParentMembership)
2687 switch($this->object->getViewMode())
2690 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_sessions');
2694 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_simple');
2698 $course_view_mode =
': '.$this->lng->txt(
'cntr_view_by_type');
2703 $opt->
setInfo($this->lng->txt(
'grp_view_inherit_info'));
2704 $view_type->addOption($opt);
2707 if($hasParentMembership &&
2714 $view_type->setValue($this->object->getViewMode(
true));
2718 $opt->
setInfo($this->lng->txt(
'grp_view_info_simple'));
2719 $view_type->addOption($opt);
2722 $opt->
setInfo($this->lng->txt(
'grp_view_info_by_type'));
2723 $view_type->addOption($opt);
2724 $this->form->addItem($view_type);
2728 $sorting_settings = array();
2729 if($hasParentMembership)
2740 $feat->setTitle($this->lng->txt(
'obj_features'));
2741 $this->form->addItem($feat);
2743 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2745 $this->object->getId(),
2762 $mail_type->
setValue($this->object->getMailToMembersType());
2765 $this->lng->txt(
'grp_mail_tutors_only_info'));
2766 $mail_type->addOption($mail_tutors);
2769 $this->lng->txt(
'grp_mail_all_info'));
2770 $mail_type->addOption($mail_all);
2771 $this->form->addItem($mail_type);
2777 $this->form->
setTitle($this->lng->txt(
'grp_new'));
2780 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2781 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2785 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2789 include_once
'Modules/Group/classes/class.ilECSGroupSettings.php';
2791 $ecs->addSettingsToForm($this->form,
'grp');
2793 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2794 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2814 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2815 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2816 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2817 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2818 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2819 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2820 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2823 $this->
object->setMailToMembersType((
int) $_POST[
'mail_type']);
2839 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2841 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2842 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2843 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2844 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2845 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2846 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2861 global $rbacsystem,
$ilUser,$ilAccess;
2867 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2869 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2870 $this->ctrl->getLinkTarget($this,
'members'),
2875 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2876 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2877 "membersGallery", get_class($this));
2880 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
2882 $this->object->getEnableGroupMap())
2884 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2885 $this->ctrl->getLinkTarget($this,
'membersMap'),
2886 "membersMap", get_class($this));
2889 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2891 $this->tabs_gui->addSubTabTarget(
"events",
2892 $this->ctrl->getLinkTargetByClass(
'ilsessionoverviewgui',
'listSessions'),
2893 "",
'ilsessionoverviewgui');
2896 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2899 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2900 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2901 "",
'ilmemberexportgui');
2907 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2908 $this->ctrl->getLinkTarget($this,
'edit'),
2909 "edit", get_class($this));
2911 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2912 $this->ctrl->getLinkTarget($this,
'editInfo'),
2913 "editInfo", get_class($this));
2916 if ($this->ilias->getSetting(
"custom_icons"))
2918 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2919 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2920 "editGroupIcons", get_class($this));
2923 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
2926 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2927 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2928 "editMapSettings", get_class($this));
2931 $this->tabs_gui->addSubTabTarget(
'groupings',
2932 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
2936 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2937 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2941 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
2942 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
2944 'ilobjectcustomuserfieldsgui');
2965 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2971 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2976 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2982 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2983 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
2993 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3030 $link = chr(13).chr(10).chr(13).chr(10);
3031 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3032 $link .= chr(13).chr(10).chr(13).chr(10);
3033 include_once
'Services/Link/classes/class.ilLink.php';
3035 return rawurlencode(base64_encode($link));
3044 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3045 if($ilSetting->get(
"crsgrp_ntf") &&
3048 if(!$ilUser->getPref(
"grpcrs_ntf_".$this->ref_id))
3050 $lg->addHeaderIcon(
"not_icon",
3052 $this->lng->txt(
"grp_notification_deactivated"));
3054 $this->ctrl->setParameter($this,
"grp_ntf", 1);
3055 $caption =
"grp_activate_notification";
3059 $lg->addHeaderIcon(
"not_icon",
3061 $this->lng->txt(
"grp_notification_activated"));
3063 $this->ctrl->setParameter($this,
"grp_ntf", 0);
3064 $caption =
"grp_deactivate_notification";
3067 $lg->addCustomCommand($this->ctrl->getLinkTarget($this,
"saveNotification"),
3071 $this->ctrl->setParameter($this,
"grp_ntf",
"");
3083 $ilTabs->clearTargets();
3084 $ilTabs->setBackTarget($this->lng->txt(
'back'),
3085 $this->ctrl->getLinkTarget($this,
'members'));
3088 $form = $list->initForm(
'printMembersOutput');
3089 $this->tpl->setContent($form->getHTML());
3099 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
3102 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
3105 include_once
'Services/Membership/classes/class.ilAttendanceList.php';
3107 $list->setId(
'grpmemlst');
3109 $list->setTitle($this->lng->txt(
'grp_members_print_title'),
3110 $this->lng->txt(
'obj_grp').
': '.$this->
object->getTitle());
3112 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
3115 if($this->show_tracking)
3117 include_once(
'./Services/Object/classes/class.ilObjectLP.php');
3119 $this->show_tracking = $olp->isActive();
3121 if($this->show_tracking)
3123 $this->lng->loadLanguageModule(
'trac');
3124 $list->addPreset(
'progress', $this->lng->txt(
'learning_progress'),
true);
3127 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3129 if($privacy->enabledGroupAccessTimes())
3131 $list->addPreset(
'access', $this->lng->txt(
'last_access'),
true);
3139 $data = $this->members_data[$a_user_id];
3141 $data[
'progress'] = $this->lng->txt(
$data[
'progress']);
3149 $list->initFromForm();
3150 $list->setCallback(array($this,
'getAttendanceListUserData'));
3153 $this->members_data = $this->
readMemberData($part->getParticipants());
3154 $list->getNonMemberUserData($this->members_data);
3156 echo $list->getFullscreenHTML();
3166 $local_roles = $this->
object->getLocalGroupRoles(
false);
3167 $grp_member = $this->
object->getDefaultMemberRole();
3168 $grp_roles = array();
3171 if(in_array($grp_member, $local_roles))
3174 unset($local_roles[$grp_roles[$grp_member]]);
3177 foreach($local_roles as $title => $role_id)
3194 global $ilAccess,
$ilUser, $rbacsystem;
3195 include_once
'Services/Mail/classes/class.ilMail.php';
3196 $mail =
new ilMail($ilUser->getId());
3199 ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()) or
3201 $rbacsystem->checkAccess(
'internal_mail',$mail->getMailObjectReferenceId()))
3206 $ilToolbar->addSeparator();
3211 $this->ctrl->setParameter($this,
"back_cmd", $back_cmd);
3214 $ilToolbar->addButton($this->lng->txt(
"mail_members"),
3215 $this->ctrl->getLinkTarget($this,
'mailMembers'));
3221 if(!is_array(
$_POST[
"subscribers"]))
3229 $this->lng->loadLanguageModule(
'mmbr');
3233 $this->tabs_gui->setTabActive(
'members');
3234 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
3236 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3240 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"refuseSubscribers"));
3241 $c_gui->setHeaderText($this->lng->txt(
"info_refuse_sure"));
3242 $c_gui->setCancel($this->lng->txt(
"cancel"),
"members");
3243 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"refuseSubscribers");
3245 foreach(
$_POST[
"subscribers"] as $subscribers)
3249 $c_gui->addItem(
'subscribers[]',
3251 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']',
3255 $this->tpl->setContent($c_gui->getHTML());
3260 if(!is_array(
$_POST[
"subscribers"]))
3269 $this->tabs_gui->setTabActive(
'members');
3270 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
3272 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3276 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"assignSubscribers"));
3277 $c_gui->setHeaderText($this->lng->txt(
"info_assign_sure"));
3278 $c_gui->setCancel($this->lng->txt(
"cancel"),
"members");
3279 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"assignSubscribers");
3281 foreach(
$_POST[
"subscribers"] as $subscribers)
3285 $c_gui->addItem(
'subscribers[]',
3287 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']',
3291 $this->tpl->setContent($c_gui->getHTML());
3297 if(!is_array(
$_POST[
"waiting"]))
3305 $this->lng->loadLanguageModule(
'mmbr');
3309 $this->tabs_gui->setTabActive(
'members');
3310 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
3312 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3316 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"refuseFromList"));
3317 $c_gui->setHeaderText($this->lng->txt(
"info_refuse_sure"));
3318 $c_gui->setCancel($this->lng->txt(
"cancel"),
"members");
3319 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"refuseFromList");
3321 foreach(
$_POST[
"waiting"] as $waiting)
3325 $c_gui->addItem(
'waiting[]',
3327 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']',
3331 $this->tpl->setContent($c_gui->getHTML());
3337 if(!is_array(
$_POST[
"waiting"]))
3346 $this->tabs_gui->setTabActive(
'members');
3347 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
3349 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3353 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"assignFromWaitingList"));
3354 $c_gui->setHeaderText($this->lng->txt(
"info_assign_sure"));
3355 $c_gui->setCancel($this->lng->txt(
"cancel"),
"members");
3356 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"assignFromWaitingList");
3358 foreach(
$_POST[
"waiting"] as $waiting)
3362 $c_gui->addItem(
'waiting[]',
3364 $name[
'lastname'].
', '.$name[
'firstname'].
' ['.$name[
'login'].
']',
3368 $this->tpl->setContent($c_gui->getHTML());