5 include_once
"./Services/Container/classes/class.ilContainerGUI.php";
6 include_once(
'./Modules/Group/classes/class.ilObjGroup.php');
30 public function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output =
false)
33 $this->
ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
35 $this->lng->loadLanguageModule(
'grp');
40 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,
$ilErr,
$ilCtrl;
42 $next_class = $this->ctrl->getNextClass($this);
43 $cmd = $this->ctrl->getCmd();
48 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
50 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
51 "repository.php?cmd=frameset&ref_id=".
$_GET[
"ref_id"],
"grp");
56 case "ilconditionhandlerinterface":
57 include_once
'./classes/class.ilConditionHandlerInterface.php';
61 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
63 $this->tabs_gui->setTabActive(
'view_content');
66 $this->ctrl->forwardCommand($new_gui);
71 $this->ctrl->forwardCommand($new_gui);
75 case 'ilgroupregistrationgui':
76 $this->ctrl->setReturn($this,
'');
77 $this->tabs_gui->setTabActive(
'join');
78 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
80 $this->ctrl->forwardCommand($registration);
83 case 'ilpermissiongui':
84 $this->tabs_gui->setTabActive(
'perm_settings');
85 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
87 $ret =& $this->ctrl->forwardCommand($perm_gui);
90 case 'ilrepositorysearchgui':
91 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
93 $rep_search->setCallback($this,
101 $this->tabs_gui->setTabActive(
'members');
102 $this->ctrl->setReturn($this,
'members');
103 $ret =& $this->ctrl->forwardCommand($rep_search);
105 $this->tabs_gui->setSubTabActive(
'members');
108 case 'ilcourseitemadministrationgui':
109 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
110 $this->tabs_gui->clearSubTabs();
111 $this->ctrl->setReturn($this,
'view');
113 $this->ctrl->forwardCommand($item_adm_gui);
116 case "ilinfoscreengui":
120 case "illearningprogressgui":
121 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
124 $this->object->getRefId(),
125 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
126 $this->ctrl->forwardCommand($new_gui);
127 $this->tabs_gui->setTabActive(
'learning_progress');
130 case 'ilobjcoursegroupinggui':
131 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
133 $this->ctrl->setReturn($this,
'edit');
135 $this->ctrl->forwardCommand($crs_grp_gui);
137 $this->tabs_gui->setTabActive(
'settings');
138 $this->tabs_gui->setSubTabActive(
'groupings');
141 case 'ilcoursecontentgui':
143 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
145 $this->ctrl->forwardCommand($course_content_obj);
148 case 'ilcourseitemadministrationgui':
150 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
152 $this->ctrl->setReturn($this,
'');
154 $this->ctrl->forwardCommand($item_adm_gui);
158 $this->tabs_gui->setTabActive(
'view_content');
159 $this->tabs_gui->setSubTabActive(
'activation');
162 case 'ilpublicuserprofilegui':
163 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
165 $this->tabs_gui->setTabActive(
'group_members');
166 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
168 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this,
"membersGallery"));
169 $html = $this->ctrl->forwardCommand($profile_gui);
170 $this->tpl->setVariable(
"ADM_CONTENT", $html);
174 $this->tabs_gui->setTabActive(
'none');
176 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
177 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
183 case "ilpageobjectgui":
187 $this->tpl->setContent(
$ret);
191 case 'ilobjectcopygui':
192 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
195 $this->ctrl->forwardCommand($cp);
198 case "ilobjstylesheetgui":
202 case 'ilobjectcustomuserfieldsgui':
203 include_once
'./Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
206 $this->tabs_gui->setTabActive(
'settings');
207 $this->ctrl->forwardCommand($cdf_gui);
210 case 'ilmemberagreementgui':
211 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
212 $this->ctrl->setReturn($this,
'');
213 $this->tabs_gui->setTabActive(
'view_content');
215 $this->ctrl->forwardCommand($agreement);
219 $this->tabs_gui->setTabActive(
'export');
220 include_once
'./Services/Export/classes/class.ilExportGUI.php';
222 $exp->addFormat(
'xml');
223 $this->ctrl->forwardCommand($exp);
226 case 'ilmemberexportgui':
227 include_once(
'./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
230 $this->tabs_gui->setTabActive(
'members');
231 $this->tabs_gui->setSubTabActive(
'export_members');
233 $this->ctrl->forwardCommand($export);
241 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
243 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
248 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
252 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
254 $this->ctrl->redirect($this,
"infoScreen");
258 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
259 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
274 global
$tree,$rbacsystem,$ilUser;
276 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
278 $this->
object->getRefId(),
'grp');
280 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
288 include_once(
'Services/Membership/classes/class.ilMemberAgreementGUI.php');
289 $this->tabs_gui->setTabActive(
'view_content');
290 $this->ctrl->setReturn($this,
'view');
292 $this->ctrl->setCmdClass(get_class($agreement));
293 $this->ctrl->forwardCommand($agreement);
297 $this->tabs_gui->setTabActive(
'view_content');
308 $ilTabs->activateTab(
"view_content");
323 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
325 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
326 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
330 $this->object->getRefId());
346 if(!is_object($this->
object))
351 $this->ctrl->setParameter($this,
'new_type',
'grp');
353 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_create.html',
'Modules/Group');
354 $this->tpl->setVariable(
'CREATE_FORM',$this->form->getHTML());
357 $this->tpl->setVariable(
"IMPORT_FORM", $this->form->getHTML());
371 $lng->loadLanguageModule(
"crs");
373 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
375 $this->form->setTableWidth(
'600px');
376 $this->form->setTarget(
"_top");
379 include_once(
"./Services/Form/classes/class.ilFileInputGUI.php");
382 $fi->setRequired(
true);
383 $this->form->addItem($fi);
385 $this->form->addCommandButton(
"importFile", $lng->txt(
"import"));
386 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
387 $this->form->setTitle($lng->txt($a_new_type.
"_import"));
389 $this->form->setFormAction($ilCtrl->getFormAction($this));
407 $ilErr->setMessage(
'');
409 if(!$this->object->validate())
411 $err = $this->lng->txt(
'err_check_input');
413 $err = $ilErr->getMessage();
419 $this->
object->create();
420 $this->
object->createReference();
421 $this->
object->putInTree(
$_GET[
"ref_id"]);
422 $this->
object->setPermissions(
$_GET[
"ref_id"]);
423 $this->
object->initGroupStatus($this->object->getGroupType());
426 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
432 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
435 $members_obj->updateNotification($ilUser->getId(),1);
439 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
446 if($crs_refid = $tree->checkForParentType($this->object->getRefId(),
'crs'))
448 include_once
'./Modules/Course/classes/class.ilCourseItems.php';
449 $tmp =
new ilCourseItems($crs_refid,$this->object->getRefId());
453 $this->ctrl->setParameter($this,
'ref_id',$this->object->getRefId());
454 $this->ctrl->redirect($this);
469 $this->tabs_gui->setTabActive(
'settings');
470 $this->tabs_gui->setSubTabActive(
'grp_settings');
472 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
473 if(
$_GET[
'group_type_changed'])
475 $this->ctrl->clearParameters($this);
476 $this->tpl->setVariable(
'GRP_FORMACTION',$this->ctrl->getFormAction($this));
477 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_S',$this->lng->txt(
'grp_change_type'));
478 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_C',$this->lng->txt(
'cancel'));
479 $this->
initForm(
'update_group_type');
485 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
497 $type = $this->
object->getGroupType() ?
498 $this->
object->getGroupType() :
499 $this->
object->readGroupStatus();
509 $this->
object->updateGroupType();
510 $this->
object->update();
512 $this->ctrl->redirect($this,
'edit');
527 $old_type = $this->
object->getGroupType();
530 $ilErr->setMessage(
'');
532 if(!$this->object->validate())
534 $err = $this->lng->txt(
'err_check_input');
536 $err = $ilErr->getMessage();
543 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
546 $this->
object->setGroupType($old_type);
549 $this->
object->update();
552 include_once
'./Services/Container/classes/class.ilContainerSortingSettings.php';
558 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
569 include_once
'./Services/Utilities/classes/class.ilConfirmationGUI.php';
572 $confirm->setFormAction($this->ctrl->getFormAction($this));
575 $this->object->getGroupType(),
576 $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'))
578 $confirm->addButton($this->lng->txt(
'grp_change_type'),
'updateGroupType');
579 $confirm->setCancel($this->lng->txt(
'cancel'),
'edit');
581 $this->tpl->setContent($confirm->getHTML());
587 $this->ctrl->redirect($this,
'edit');
602 $this->tabs_gui->setTabActive(
'settings');
603 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
605 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_edit_icons.html",
'Modules/Group');
607 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateGroupIcons'));
608 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
609 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
610 $this->tpl->setVariable(
"CMD_CANCEL",
"cancel");
611 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateGroupIcons");
612 $this->tpl->parseCurrentBlock();
626 if ($this->ilias->getSetting(
"custom_icons"))
628 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
629 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
633 $this->ctrl->redirect($this,
"editGroupIcons");
643 $this->
object->removeSmallIcon();
644 $this->ctrl->redirect($this,
"editGroupIcons");
654 $this->
object->removeBigIcon();
655 $this->ctrl->redirect($this,
"editGroupIcons");
665 $this->
object->removeTinyIcon();
666 $this->ctrl->redirect($this,
"editGroupIcons");
674 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
677 $this->tabs_gui->setTabActive(
'settings');
678 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
680 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
682 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
687 $latitude = $this->
object->getLatitude();
688 $longitude = $this->
object->getLongitude();
689 $zoom = $this->
object->getLocationZoom();
692 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
695 $latitude = $def[
"latitude"];
696 $longitude = $def[
"longitude"];
697 $zoom = $def[
"zoom"];
704 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
706 $form->setFormAction($ilCtrl->getFormAction($this));
708 $form->setTitle($this->lng->txt(
"grp_map_settings"));
714 $public->setChecked($this->object->getEnableGroupMap());
715 $form->addItem($public);
721 $loc_prop->setLongitude($longitude);
722 $loc_prop->setZoom($zoom);
723 $form->addItem($loc_prop);
725 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
727 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
738 $this->
object->update();
740 $ilCtrl->redirect($this,
"editMapSettings");
751 $this->tabs_gui->setTabActive(
'members');
753 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
759 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
761 $map->setMapId(
"group_map");
762 $map->setWidth(
"700px");
763 $map->setHeight(
"500px");
764 $map->setLatitude($this->object->getLatitude());
765 $map->setLongitude($this->object->getLongitude());
766 $map->setZoom($this->object->getLocationZoom());
767 $map->setEnableTypeControl(
true);
768 $map->setEnableNavigationControl(
true);
769 $map->setEnableCentralMarker(
true);
772 $member_ids = $this->
object->getGroupMemberIds();
773 $admin_ids = $this->
object->getGroupAdminIds();
776 $members = $this->
object->getGroupMemberData($member_ids);
777 foreach($member_ids as $user_id)
779 $map->addUserMarker($user_id);
781 $tpl->setContent($map->getHTML());
782 $tpl->setLeftContent($map->getUserListHTML());
799 $this->tabs_gui->setTabActive(
'settings');
800 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
803 $this->tpl->setContent($this->form->getHTML());
814 if(is_object($this->form))
819 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
821 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
822 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
823 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
824 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
827 $area->
setInfo($this->lng->txt(
'grp_information_info'));
828 $area->setValue($this->object->getInformation());
831 $this->form->addItem($area);
845 $this->
object->update();
860 global $rbacsystem, $ilAccess, $ilUser;
862 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
864 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
867 $this->tabs_gui->setTabActive(
'members');
869 $member_ids = $this->
object->getGroupMemberIds();
870 $admin_ids = $this->
object->getGroupAdminIds();
873 $members = $this->
object->getGroupMemberData($member_ids);
878 $ordered_members = array();
880 foreach($members as $member)
888 if(!$usr_obj->getActive())
896 array_push($ordered_members,array(
"id" => $member[
"id"],
897 "login" => $usr_obj->getLogin(),
898 "lastname" => $usr_obj->getLastName(),
899 "firstname" => $usr_obj->getFirstName(),
900 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
901 "usr_obj" => $usr_obj));
906 foreach($ordered_members as $member) {
908 $usr_obj = $member[
"usr_obj"];
910 $public_profile = $usr_obj->getPref(
"public_profile");
911 if ($public_profile ==
"g")
913 $public_profile =
"y";
917 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
918 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
921 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
923 switch(in_array($member[
"id"],$admin_ids))
927 if ($public_profile ==
"y")
929 $this->tpl->setCurrentBlock(
"tutor_linked");
930 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
931 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
932 $this->tpl->parseCurrentBlock();
936 $this->tpl->setCurrentBlock(
"tutor_not_linked");
937 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
938 $this->tpl->parseCurrentBlock();
940 $this->tpl->setCurrentBlock(
"tutor");
944 if ($public_profile ==
"y")
946 $this->tpl->setCurrentBlock(
"member_linked");
947 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
948 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
949 $this->tpl->parseCurrentBlock();
953 $this->tpl->setCurrentBlock(
"member_not_linked");
954 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
955 $this->tpl->parseCurrentBlock();
957 $this->tpl->setCurrentBlock(
"member");
962 if ($public_profile ==
"y")
964 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
965 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
967 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
968 $this->tpl->parseCurrentBlock();
970 $this->tpl->setCurrentBlock(
"members");
972 $this->tpl->parseCurrentBlock();
975 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
982 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
985 if($this->show_tracking)
987 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
994 if($privacy->enabledGroupAccessTimes())
996 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
1003 $tmp_data[
'firstname'] = $name[
'firstname'];
1004 $tmp_data[
'lastname'] = $name[
'lastname'];
1006 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
1007 $tmp_data[
'usr_id'] =
$usr_id;
1010 if($this->show_tracking)
1012 if(in_array($usr_id,$completed))
1016 elseif(in_array($usr_id,$in_progress))
1020 elseif(in_array($usr_id,
$failed))
1030 if($privacy->enabledGroupAccessTimes())
1032 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
1036 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
1040 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
1041 $tmp_data[
'access_time_unix'] = 0;
1045 $members[
$usr_id] = $tmp_data;
1047 return $members ? $members : array();
1060 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
1061 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
1065 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
1066 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
1075 $this->tabs_gui->setTabActive(
'members');
1076 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1078 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1079 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1084 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
1087 $ilToolbar->addInputItem($ul,
true);
1090 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1096 $si->setOptions($options);
1097 $ilToolbar->addInputItem($si);
1100 $ilToolbar->addFormButton($lng->txt(
"add"),
"addAsMember");
1101 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1104 $ilToolbar->addSeparator();
1107 $ilToolbar->addButton($this->lng->txt(
"grp_search_users"),
1108 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1114 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1116 if(count($wait = $waiting_list->getAllUsers()))
1118 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1119 if($ilUser->getPref(
'grp_wait_hide'))
1122 $this->ctrl->setParameter($this,
'wait_hide',0);
1123 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1124 $this->lng->txt(
'show'),
1127 $this->ctrl->clearParameters($this);
1132 $this->ctrl->setParameter($this,
'wait_hide',1);
1133 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1134 $this->lng->txt(
'hide'),
1137 $this->ctrl->clearParameters($this);
1139 $table_gui->setUsers($wait);
1140 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1141 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1146 if(count($subscribers = $part->getSubscribers()))
1148 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1149 if($ilUser->getPref(
'grp_subscriber_hide'))
1152 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1153 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1154 $this->lng->txt(
'show'),
1157 $this->ctrl->clearParameters($this);
1162 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1163 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1164 $this->lng->txt(
'hide'),
1167 $this->ctrl->clearParameters($this);
1169 $table_gui->setSubscribers($subscribers);
1170 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1171 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1174 if(count($part->getAdmins()))
1176 if($ilUser->getPref(
'grp_admin_hide'))
1179 $this->ctrl->setParameter($this,
'admin_hide',0);
1180 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1181 $this->lng->txt(
'show'),
1184 $this->ctrl->clearParameters($this);
1189 $this->ctrl->setParameter($this,
'admin_hide',1);
1190 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1191 $this->lng->txt(
'hide'),
1194 $this->ctrl->clearParameters($this);
1196 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.gif',$this->lng->txt(
'grp_admins'));
1198 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1201 if(count($part->getMembers()))
1203 if($ilUser->getPref(
'grp_member_hide'))
1206 $this->ctrl->setParameter($this,
'member_hide',0);
1207 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1208 $this->lng->txt(
'show'),
1211 $this->ctrl->clearParameters($this);
1216 $this->ctrl->setParameter($this,
'member_hide',1);
1217 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1218 $this->lng->txt(
'hide'),
1221 $this->ctrl->clearParameters($this);
1224 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.gif',$this->lng->txt(
'grp_members'));
1226 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1230 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1231 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1232 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1233 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1243 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
1259 if(!count(
$_POST[
'subscribers']))
1266 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1269 $this->
object->members_obj->sendNotification(
1275 $this->
object->members_obj->deleteSubscriber($usr_id);
1277 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1281 $this->ctrl->redirect($this,
'members');
1297 if(!count(
$_POST[
'subscribers']))
1304 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1307 $this->
object->members_obj->sendNotification(
1311 $this->
object->members_obj->deleteSubscriber($usr_id);
1330 if(!count(
$_POST[
"waiting"]))
1337 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1340 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1343 foreach(
$_POST[
"waiting"] as $user_id)
1349 if($this->object->members_obj->isAssigned($user_id))
1354 $this->
object->members_obj->sendNotification(
1360 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1375 $this->searchObject();
1391 if(!count(
$_POST[
'waiting']))
1398 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1401 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1402 foreach(
$_POST[
"waiting"] as $user_id)
1405 $this->
object->members_obj->sendNotification(
1426 $this->tabs_gui->setTabActive(
'members');
1427 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1429 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members']));
1431 if(!count($participants_to_delete))
1441 $admins_after = (array) array_diff($admins, $participants_to_delete);
1442 if(!count($admins_after) and count($admins))
1449 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1451 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1452 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1453 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1454 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1456 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'])) as $participants)
1458 $confirm->addItem(
'participants[]',
1459 $participants[
'usr_id'],
1460 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1464 $this->tpl->setContent($confirm->getHTML());
1478 if(!count(
$_POST[
'participants']))
1485 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1488 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1489 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1490 foreach(
$_POST[
'participants'] as $part)
1492 $this->
object->members_obj->sendNotification(
1514 if(isset(
$_GET[
'member_id']))
1516 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1520 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1521 (array) $_POST[
'members'],
1522 (array) $_POST[
'waiting'],
1523 (array) $_POST[
'subscribers']));
1525 if (!count(
$_POST[
'participants']))
1536 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1541 array(
'type' =>
'new',
'rcp_to' => implode(
',',$rcps),
'sig' => $this->
createMailSignature())));
1555 if(isset(
$_GET[
'admin_hide']))
1557 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1559 if(isset(
$_GET[
'member_hide']))
1561 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1563 if(isset(
$_GET[
'subscriber_hide']))
1565 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1567 if(isset(
$_GET[
'wait_hide']))
1569 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1580 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1594 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members']));
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.gif',$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();
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(
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));
1749 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1751 $tpl =
new ilTemplate(
'tpl.unsubscribe.html',
true,
true,
'Modules/Group');
1752 $tpl->setVariable(
'UNSUB_FORMACTION',$this->ctrl->getFormAction($this));
1753 $tpl->setVariable(
'TXT_SUBMIT',$this->lng->txt(
'grp_btn_unsubscribe'));
1754 $tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
1757 $this->tpl->setContent(
$tpl->get());
1768 global $ilUser,
$tree;
1772 $this->
object->members_obj->delete($ilUser->getId());
1774 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1775 $this->
object->members_obj->sendNotification(
1779 $this->
object->members_obj->sendNotification(
1784 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1788 ilUtil::redirect(
'repository.php?ref_id='.$tree->getParentId($this->object->getRefId()));
1798 $user_ids =
$_POST[
"id"];
1800 if (empty($user_ids[0]))
1803 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1806 foreach ($user_ids as $new_member)
1808 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1810 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1817 $this->ctrl->redirect($this,
'members');
1825 $users = explode(
',',
$_POST[
'user_login']);
1826 foreach($users as
$user)
1843 $user_ids =
$_POST[
"user"];
1847 if (empty($user_ids[0]))
1850 #$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1855 foreach ($user_ids as $new_member)
1857 switch(
$_POST[
'member_type'])
1860 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1862 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1867 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1869 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1876 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1877 $this->
object->members_obj->sendNotification(
1882 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1887 unset(
$_SESSION[
'grp_usr_search_result']);
1890 $this->ctrl->redirect($this,
'members');
1898 global $rbacreview, $ilObjDataCache,
$ilias;
1899 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1901 $this->lng->loadLanguageModule(
'mail');
1905 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1909 $this->tabs_gui->setTabActive(
'members');
1911 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1914 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1915 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1918 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1919 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1920 $role_addrs = array();
1923 $sorted_role_ids = array();
1925 foreach($role_ids as $role_id)
1930 $sorted_role_ids[1] = $role_id;
1934 $sorted_role_ids[0] = $role_id;
1938 $sorted_role_ids[$counter++] = $role_id;
1942 ksort($sorted_role_ids,SORT_NUMERIC);
1943 foreach ((array) $sorted_role_ids as $role_id)
1945 $this->tpl->setCurrentBlock(
"mailbox_row");
1946 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1950 if(count($ids_for_role_title) >= 2)
1952 $ilias->setSetting(
'pear_mail_enable',
true);
1956 htmlspecialchars($role_addr)
1962 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1969 $this->tpl->parseCurrentBlock();
1979 $user_ids =
$_POST[
"user_id"];
1981 if (empty($user_ids[0]))
1983 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1988 foreach ($user_ids as $new_member)
1990 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1992 $this->
object->deleteApplicationListEntry($new_member);
1993 $mail->sendMail(
$user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
1997 $this->ctrl->redirect($this,
'members');
2003 global $rbacsystem, $ilUser, $ilAccess,
$lng;
2005 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2007 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2008 $this->ctrl->getLinkTarget($this,
""));
2010 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2012 $tabs_gui->addTarget(
"info_short",
2013 $this->ctrl->getLinkTargetByClass(
2014 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2020 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2022 $tabs_gui->addTarget(
"settings",
2023 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2028 if($ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
2030 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2031 $tabs_gui->addTarget(
"members",$this->ctrl->getLinkTarget($this, $mem_cmd), array(),get_class($this));
2036 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2039 $tabs_gui->addTarget(
'learning_progress',
2040 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2042 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"),
2112 if($new_id = parent::importFileObject())
2115 $this->ctrl->returnToParent($this);
2125 if(!is_array($_FILES[
'xmldoc']))
2132 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2136 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2148 include_once
'./classes/class.ilConditionHandlerInterface.php';
2150 if(!is_object($this->chi_obj))
2152 if(
$_GET[
'item_id'])
2155 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
2174 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html");
2175 $this->tpl->setCurrentBlock(
"adm_content");
2176 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2177 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2178 $this->tpl->parseCurrentBlock();
2189 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2190 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2192 $workbook = $adapter->getWorkbook();
2194 $format_bold =& $workbook->addFormat();
2195 $format_bold->setBold();
2196 $format_percent =& $workbook->addFormat();
2197 $format_percent->setNumFormat(
"0.00%");
2198 $format_datetime =& $workbook->addFormat();
2199 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2200 $format_title =& $workbook->addFormat();
2201 $format_title->setBold();
2202 $format_title->setColor(
'black');
2203 $format_title->setPattern(1);
2204 $format_title->setFgColor(
'silver');
2205 $worksheet =& $workbook->addWorksheet();
2207 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2208 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2209 "fax",
"matriculation");
2210 foreach ($profile_data as
$data)
2212 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2214 $member_ids = $this->
object->getGroupMemberIds();
2216 foreach ($member_ids as $member_id)
2219 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2220 if ($member->getPref(
"public_email")==
"y")
2222 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2228 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2229 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2230 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2231 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2232 if ($member->getPref(
"public_institution")==
"y")
2234 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2240 if ($member->getPref(
"public_department")==
"y")
2242 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2248 if ($member->getPref(
"public_street")==
"y")
2250 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2256 if ($member->getPref(
"public_zip")==
"y")
2258 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2264 if ($member->getPref(
"public_city")==
"y")
2266 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2272 if ($member->getPref(
"public_country")==
"y")
2274 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2280 if ($member->getPref(
"public_phone_office")==
"y")
2282 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2288 if ($member->getPref(
"public_phone_home")==
"y")
2290 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2296 if ($member->getPref(
"public_phone_mobile")==
"y")
2298 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2304 if ($member->getPref(
"public_fax")==
"y")
2306 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2312 if ($member->getPref(
"public_matriculation")==
"y")
2314 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2335 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2350 $this->ctrl->setCmd(
"showSummary");
2351 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2362 $this->tabs_gui->setTabActive(
'info_short');
2364 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2366 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2369 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2372 if(strlen($this->object->getInformation()))
2374 $info->addSection($this->lng->txt(
'grp_general_informations'));
2375 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2379 $info->enablePrivateNotes();
2380 $info->enableLearningProgress(
true);
2382 $info->addSection($this->lng->txt(
'group_registration'));
2383 $info->showLDAPRoleGroupMappingInfo();
2385 if(!$this->object->isRegistrationEnabled())
2387 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2388 $this->lng->txt(
'grp_reg_deac_info_screen'));
2393 switch($this->object->getRegistrationType())
2396 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2397 $this->lng->txt(
'grp_reg_direct_info_screen'));
2401 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2402 $this->lng->txt(
'grp_reg_req_info_screen'));
2406 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2407 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2417 if($this->object->isRegistrationUnlimited())
2419 $info->addProperty($this->lng->txt(
'group_registration_time'),
2420 $this->lng->txt(
'grp_registration_unlimited'));
2422 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2424 $info->addProperty($this->lng->txt(
"group_registration_time"),
2425 $this->lng->txt(
'cal_until').
' '.
2428 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2430 $info->addProperty($this->lng->txt(
"group_registration_time"),
2431 $this->lng->txt(
'cal_from').
' '.
2434 if ($this->object->isMembershipLimited())
2436 $info->addProperty($this->lng->txt(
"mem_free_places"),
2437 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2444 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2447 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2450 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2454 $this->lng->loadLanguageModule(
'ps');
2455 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2456 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2460 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2466 $this->ctrl->forwardCommand($info);
2476 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2477 if(substr($a_add,0,5) ==
'rcode')
2479 if($ilUser->getId() == ANONYMOUS_USER_ID)
2483 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2484 $ilUser->getCurrentLanguage()
2496 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2498 $_GET[
"cmd"] =
"members";
2499 $_GET[
"ref_id"] = $a_target;
2500 include(
"repository.php");
2504 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2506 $_GET[
"cmd"] =
"frameset";
2507 $_GET[
"ref_id"] = $a_target;
2508 include(
"repository.php");
2514 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2516 $_GET[
"cmd"] =
"infoScreen";
2517 $_GET[
"ref_id"] = $a_target;
2518 include(
"repository.php");
2523 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2525 $_GET[
"cmd"] =
"frameset";
2526 $_GET[
"target"] =
"";
2527 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2530 include(
"repository.php");
2535 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2550 if(is_object($this->form))
2555 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2561 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2565 $this->form->setTableWidth(
'600px');
2566 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2572 $title->setSubmitFormOnEnter(
true);
2573 $title->setValue($this->object->getTitle());
2575 $title->setMaxLength(128);
2576 $title->setRequired(
true);
2577 $this->form->addItem(
$title);
2581 $desc->
setValue($this->object->getLongDescription());
2584 $this->form->addItem($desc);
2589 if($a_mode ==
'edit')
2591 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2595 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2599 $grp_type->setRequired(
true);
2602 #$opt_open = new ilRadioOption($this->lng->txt('grp_open'),GRP_TYPE_OPEN,$this->lng->txt('grp_open_info'));
2603 #$grp_type->addOption($opt_open);
2608 $grp_type->addOption($opt_public);
2612 $reg_type->setValue($this->object->getRegistrationType());
2615 $reg_type->addOption($opt_dir);
2619 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2620 $pass->
setValue($this->object->getPassword());
2622 $pass->setMaxLength(32);
2624 $reg_type->addOption($opt_pass);
2625 $opt_public->addSubItem($reg_type);
2628 $reg_type->addOption($opt_req);
2631 $reg_type->addOption($opt_deact);
2634 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2635 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2636 $reg_code->setValue(1);
2637 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2646 if(!$this->object->getRegistrationAccessCode())
2648 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2652 $reg_link->setValue($this->object->getRegistrationAccessCode());
2653 $this->form->addItem($reg_link);
2656 include_once
'./classes/class.ilLink.php';
2657 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2658 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2659 $reg_code->addSubItem($link);
2660 $opt_public->addSubItem($reg_code);
2665 $grp_type->addOption($opt_closed);
2666 if($a_mode ==
'update_group_type')
2668 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2670 $this->form->addItem($grp_type);
2673 if($a_mode ==
'create')
2679 $ref_id = $this->
object->getRefId();
2682 $hasParentCourse = $tree->checkForParentType(
$ref_id,
'crs');
2686 if($a_mode ==
'edit')
2690 elseif($hasParentCourse)
2699 if($hasParentCourse)
2704 $title = $this->lng->txt(
'sort_inherit_prefix');
2707 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
2708 $sog->addOption($sde);
2713 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
2714 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
2715 $sog->addOption($sma);
2719 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
2720 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
2721 $sog->addOption($sti);
2723 $this->form->addItem($sog);
2726 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2727 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2728 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2730 $this->lng->loadLanguageModule(
'dateplaner');
2731 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2732 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2735 $dur->setEndText($this->lng->txt(
'cal_end'));
2736 $dur->setMinuteStepSize(5);
2737 $dur->setShowDate(
true);
2738 $dur->setShowTime(
true);
2739 $dur->setStart($this->object->getRegistrationStart());
2740 $dur->setEnd($this->object->getRegistrationEnd());
2742 $time_limit->addSubItem($dur);
2757 $this->form->addItem($time_limit);
2760 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2762 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2763 $lim->setChecked($this->object->isMembershipLimited());
2767 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2768 $max->setTitle($this->lng->txt(
'members').
':');
2770 $max->setMaxLength(4);
2771 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2772 $lim->addSubItem($max);
2776 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2777 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2778 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2779 $lim->addSubItem($wait);
2780 $this->form->addItem($lim);
2785 $this->form->setTitle($this->lng->txt(
'grp_new'));
2788 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2789 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2793 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2796 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2797 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2800 case 'update_group_type':
2801 $grp_type->setValue(
2807 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2827 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2828 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2829 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2830 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2831 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2832 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2833 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2850 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2852 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2853 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2854 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2855 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2856 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2857 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2872 global $rbacsystem,$ilUser,$ilAccess;
2878 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2880 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2881 $this->ctrl->getLinkTarget($this,
'members'),
2886 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2887 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2888 "membersGallery", get_class($this));
2891 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2893 $this->object->getEnableGroupMap())
2895 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2896 $this->ctrl->getLinkTarget($this,
'membersMap'),
2897 "membersMap", get_class($this));
2900 $this->tabs_gui->addSubTabTarget(
"mail_members",
2901 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2902 "mailMembers", get_class($this));
2904 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2907 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2908 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2909 "",
'ilmemberexportgui');
2915 $this->tabs_gui->addSubTabTarget(
"activation",
2916 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
2917 "edit", get_class($this));
2918 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
2919 $this->tabs_gui->addSubTabTarget(
"preconditions",
2920 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
2921 "",
"ilConditionHandlerInterface");
2925 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2926 $this->ctrl->getLinkTarget($this,
'edit'),
2927 "edit", get_class($this));
2929 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2930 $this->ctrl->getLinkTarget($this,
'editInfo'),
2931 "editInfo", get_class($this));
2934 if ($this->ilias->getSetting(
"custom_icons"))
2936 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2937 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2938 "editGroupIcons", get_class($this));
2941 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2944 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2945 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2946 "editMapSettings", get_class($this));
2949 $this->tabs_gui->addSubTabTarget(
'groupings',
2950 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
2954 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2955 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2959 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
2960 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
2962 'ilobjectcustomuserfieldsgui');
2981 global $ilUser,$ilAccess;
2983 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2989 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2994 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
3000 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3001 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
3011 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3048 $link = chr(13).chr(10).chr(13).chr(10);
3049 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3050 $link .= chr(13).chr(10).chr(13).chr(10);
3051 include_once
'./classes/class.ilLink.php';
3053 return rawurlencode(base64_encode($link));