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);
1279 $this->ctrl->redirect($this,
'members');
1295 if(!count(
$_POST[
'subscribers']))
1302 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1305 $this->
object->members_obj->sendNotification(
1309 $this->
object->members_obj->deleteSubscriber($usr_id);
1328 if(!count(
$_POST[
"waiting"]))
1335 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1338 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1341 foreach(
$_POST[
"waiting"] as $user_id)
1347 if($this->object->members_obj->isAssigned($user_id))
1352 $this->
object->members_obj->sendNotification(
1358 include_once(
'./Modules/Forum/classes/class.ilForumNotification.php');
1359 ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $user_id);
1373 $this->searchObject();
1389 if(!count(
$_POST[
'waiting']))
1396 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1399 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1400 foreach(
$_POST[
"waiting"] as $user_id)
1403 $this->
object->members_obj->sendNotification(
1424 $this->tabs_gui->setTabActive(
'members');
1425 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1427 $participants_to_delete = (array) array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members']));
1429 if(!count($participants_to_delete))
1439 $admins_after = (array) array_diff($admins, $participants_to_delete);
1440 if(!count($admins_after) and count($admins))
1447 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1449 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1450 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1451 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1452 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1454 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'])) as $participants)
1456 $confirm->addItem(
'participants[]',
1457 $participants[
'usr_id'],
1458 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1462 $this->tpl->setContent($confirm->getHTML());
1476 if(!count(
$_POST[
'participants']))
1483 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1486 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1487 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1488 foreach(
$_POST[
'participants'] as $part)
1490 $this->
object->members_obj->sendNotification(
1494 ilForumNotification::checkForumsExistsDelete($this->object->getRefId(), $part);
1512 if(isset(
$_GET[
'member_id']))
1514 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1518 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1519 (array) $_POST[
'members'],
1520 (array) $_POST[
'waiting'],
1521 (array) $_POST[
'subscribers']));
1523 if (!count(
$_POST[
'participants']))
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 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members']));
1594 if(!count($participants))
1602 $this->tabs_gui->setTabActive(
'members');
1603 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1605 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1607 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.gif',$this->lng->txt(
'grp_mem_change_status'));
1610 $this->tpl->setContent($table_gui->getHTML());
1625 if(!count(
$_POST[
'participants']))
1634 $admin_role = $this->
object->getDefaultAdminRole();
1637 if(!isset(
$_POST[
'roles'][$admin_id]))
1642 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1652 $_POST[
'members'] = $_POST[
'participants'];
1657 $admin_role = $this->
object->getDefaultAdminRole();
1659 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1663 $notification =
false;
1664 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1666 $notification =
true;
1668 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1670 $notification =
true;
1674 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1677 $this->
object->members_obj->updateNotification($usr_id,0);
1679 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1681 $this->
object->members_obj->updateNotification($usr_id,1);
1686 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1687 $this->
object->members_obj->sendNotification(
1709 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1710 foreach($this->object->members_obj->getAdmins() as $admin_id)
1712 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1747 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1749 $tpl =
new ilTemplate(
'tpl.unsubscribe.html',
true,
true,
'Modules/Group');
1750 $tpl->setVariable(
'UNSUB_FORMACTION',$this->ctrl->getFormAction($this));
1751 $tpl->setVariable(
'TXT_SUBMIT',$this->lng->txt(
'grp_btn_unsubscribe'));
1752 $tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
1755 $this->tpl->setContent(
$tpl->get());
1766 global $ilUser,
$tree;
1770 $this->
object->members_obj->delete($ilUser->getId());
1772 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1773 $this->
object->members_obj->sendNotification(
1777 $this->
object->members_obj->sendNotification(
1782 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1783 ilForumNotification::checkForumsExistsDelete($this->object->getRefId(), $ilUser->getId());
1786 ilUtil::redirect(
'repository.php?ref_id='.$tree->getParentId($this->object->getRefId()));
1796 $user_ids =
$_POST[
"id"];
1798 if (empty($user_ids[0]))
1801 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1804 foreach ($user_ids as $new_member)
1806 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1808 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1815 $this->ctrl->redirect($this,
'members');
1823 $users = explode(
',',
$_POST[
'user_login']);
1824 foreach($users as $user)
1841 $user_ids =
$_POST[
"user"];
1845 if (empty($user_ids[0]))
1848 #$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1853 foreach ($user_ids as $new_member)
1855 switch(
$_POST[
'member_type'])
1858 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1860 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1865 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1867 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1874 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1875 $this->
object->members_obj->sendNotification(
1880 include_once
'./Modules/Forum/classes/class.ilForumNotification.php';
1881 ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $new_member);
1885 unset(
$_SESSION[
'grp_usr_search_result']);
1888 $this->ctrl->redirect($this,
'members');
1896 global $rbacreview, $ilObjDataCache,
$ilias;
1897 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1899 $this->lng->loadLanguageModule(
'mail');
1903 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1907 $this->tabs_gui->setTabActive(
'members');
1909 require_once
'Services/Mail/classes/class.ilMailFormCall.php';
1912 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1913 $this->tpl->setVariable(
"OK",$this->lng->txt(
'next'));
1916 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1917 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1918 $role_addrs = array();
1921 $sorted_role_ids = array();
1923 foreach($role_ids as $role_id)
1928 $sorted_role_ids[1] = $role_id;
1932 $sorted_role_ids[0] = $role_id;
1936 $sorted_role_ids[$counter++] = $role_id;
1940 ksort($sorted_role_ids,SORT_NUMERIC);
1941 foreach ((array) $sorted_role_ids as $role_id)
1943 $this->tpl->setCurrentBlock(
"mailbox_row");
1944 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1948 if(count($ids_for_role_title) >= 2)
1950 $ilias->setSetting(
'pear_mail_enable',
true);
1954 htmlspecialchars($role_addr)
1960 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1967 $this->tpl->parseCurrentBlock();
1977 $user_ids =
$_POST[
"user_id"];
1979 if (empty($user_ids[0]))
1981 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1986 foreach ($user_ids as $new_member)
1988 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1990 $this->
object->deleteApplicationListEntry($new_member);
1991 $mail->sendMail($user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
1995 $this->ctrl->redirect($this,
'members');
2001 global $rbacsystem, $ilUser, $ilAccess,
$lng;
2003 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2005 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2006 $this->ctrl->getLinkTarget($this,
""));
2008 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2010 $tabs_gui->addTarget(
"info_short",
2011 $this->ctrl->getLinkTargetByClass(
2012 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2018 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2020 $tabs_gui->addTarget(
"settings",
2021 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2026 if($ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
2028 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2029 $tabs_gui->addTarget(
"members",$this->ctrl->getLinkTarget($this, $mem_cmd), array(),get_class($this));
2034 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2037 $tabs_gui->addTarget(
'learning_progress',
2038 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2040 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2046 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2048 $tabs_gui->addTarget(
2050 $this->ctrl->getLinkTargetByClass(
'ilexportgui',
''),
2070 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2071 !$this->object->members_obj->isAssigned($ilUser->getId()))
2073 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2078 $this->lng->txt(
'membership_leave'),
2079 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2086 $tabs_gui->addTarget(
"join",
2087 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2092 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2093 $this->object->members_obj->isMember($ilUser->getId()))
2095 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2096 $this->ctrl->getLinkTarget($this,
"leave"),
2110 if($new_id = parent::importFileObject())
2113 $this->ctrl->returnToParent($this);
2123 if(!is_array($_FILES[
'xmldoc']))
2130 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2134 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2146 include_once
'./classes/class.ilConditionHandlerInterface.php';
2148 if(!is_object($this->chi_obj))
2150 if(
$_GET[
'item_id'])
2153 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
2172 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html");
2173 $this->tpl->setCurrentBlock(
"adm_content");
2174 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2175 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2176 $this->tpl->parseCurrentBlock();
2187 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2188 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2190 $workbook = $adapter->getWorkbook();
2192 $format_bold =& $workbook->addFormat();
2193 $format_bold->setBold();
2194 $format_percent =& $workbook->addFormat();
2195 $format_percent->setNumFormat(
"0.00%");
2196 $format_datetime =& $workbook->addFormat();
2197 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2198 $format_title =& $workbook->addFormat();
2199 $format_title->setBold();
2200 $format_title->setColor(
'black');
2201 $format_title->setPattern(1);
2202 $format_title->setFgColor(
'silver');
2203 $worksheet =& $workbook->addWorksheet();
2205 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2206 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2207 "fax",
"matriculation");
2208 foreach ($profile_data as
$data)
2210 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2212 $member_ids = $this->
object->getGroupMemberIds();
2214 foreach ($member_ids as $member_id)
2217 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2218 if ($member->getPref(
"public_email")==
"y")
2220 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2226 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2227 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2228 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2229 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2230 if ($member->getPref(
"public_institution")==
"y")
2232 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2238 if ($member->getPref(
"public_department")==
"y")
2240 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2246 if ($member->getPref(
"public_street")==
"y")
2248 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2254 if ($member->getPref(
"public_zip")==
"y")
2256 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2262 if ($member->getPref(
"public_city")==
"y")
2264 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2270 if ($member->getPref(
"public_country")==
"y")
2272 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2278 if ($member->getPref(
"public_phone_office")==
"y")
2280 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2286 if ($member->getPref(
"public_phone_home")==
"y")
2288 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2294 if ($member->getPref(
"public_phone_mobile")==
"y")
2296 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2302 if ($member->getPref(
"public_fax")==
"y")
2304 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2310 if ($member->getPref(
"public_matriculation")==
"y")
2312 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2333 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2348 $this->ctrl->setCmd(
"showSummary");
2349 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2360 $this->tabs_gui->setTabActive(
'info_short');
2362 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2364 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2367 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2370 if(strlen($this->object->getInformation()))
2372 $info->addSection($this->lng->txt(
'grp_general_informations'));
2373 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2377 $info->enablePrivateNotes();
2378 $info->enableLearningProgress(
true);
2380 $info->addSection($this->lng->txt(
'group_registration'));
2381 $info->showLDAPRoleGroupMappingInfo();
2383 if(!$this->object->isRegistrationEnabled())
2385 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2386 $this->lng->txt(
'grp_reg_deac_info_screen'));
2391 switch($this->object->getRegistrationType())
2394 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2395 $this->lng->txt(
'grp_reg_direct_info_screen'));
2399 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2400 $this->lng->txt(
'grp_reg_req_info_screen'));
2404 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2405 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2415 if($this->object->isRegistrationUnlimited())
2417 $info->addProperty($this->lng->txt(
'group_registration_time'),
2418 $this->lng->txt(
'grp_registration_unlimited'));
2420 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2422 $info->addProperty($this->lng->txt(
"group_registration_time"),
2423 $this->lng->txt(
'cal_until').
' '.
2426 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2428 $info->addProperty($this->lng->txt(
"group_registration_time"),
2429 $this->lng->txt(
'cal_from').
' '.
2432 if ($this->object->isMembershipLimited())
2434 $info->addProperty($this->lng->txt(
"mem_free_places"),
2435 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2442 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2445 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2448 include_once(
'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2452 $this->lng->loadLanguageModule(
'ps');
2453 $info->addSection($this->lng->txt(
'grp_user_agreement_info'));
2454 $info->addProperty($this->lng->txt(
'ps_export_data'),$field_info->exportableFieldsToInfoString());
2458 $info->addProperty($this->lng->txt(
'ps_grp_user_fields'),$fields);
2464 $this->ctrl->forwardCommand($info);
2474 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2475 if(substr($a_add,0,5) ==
'rcode')
2477 if($ilUser->getId() == ANONYMOUS_USER_ID)
2481 "login.php?target=".
$_GET[
"target"].
"&cmd=force_login&lang=".
2482 $ilUser->getCurrentLanguage()
2494 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"write",
"", $a_target))
2496 $_GET[
"cmd"] =
"members";
2497 $_GET[
"ref_id"] = $a_target;
2498 include(
"repository.php");
2502 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2504 $_GET[
"cmd"] =
"frameset";
2505 $_GET[
"ref_id"] = $a_target;
2506 include(
"repository.php");
2512 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2514 $_GET[
"cmd"] =
"infoScreen";
2515 $_GET[
"ref_id"] = $a_target;
2516 include(
"repository.php");
2521 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2523 $_GET[
"cmd"] =
"frameset";
2524 $_GET[
"target"] =
"";
2525 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2528 include(
"repository.php");
2533 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2548 if(is_object($this->form))
2553 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2559 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2563 $this->form->setTableWidth(
'600px');
2564 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2570 $title->setSubmitFormOnEnter(
true);
2571 $title->setValue($this->object->getTitle());
2573 $title->setMaxLength(128);
2574 $title->setRequired(
true);
2575 $this->form->addItem(
$title);
2579 $desc->setValue($this->object->getLongDescription());
2582 $this->form->addItem(
$desc);
2587 if($a_mode ==
'edit')
2589 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2596 $grp_type->setValue(
$type);
2597 $grp_type->setRequired(
true);
2600 #$opt_open = new ilRadioOption($this->lng->txt('grp_open'),GRP_TYPE_OPEN,$this->lng->txt('grp_open_info'));
2601 #$grp_type->addOption($opt_open);
2606 $grp_type->addOption($opt_public);
2610 $reg_type->setValue($this->object->getRegistrationType());
2613 $reg_type->addOption($opt_dir);
2617 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2618 $pass->
setValue($this->object->getPassword());
2620 $pass->setMaxLength(32);
2622 $reg_type->addOption($opt_pass);
2623 $opt_public->addSubItem($reg_type);
2626 $reg_type->addOption($opt_req);
2629 $reg_type->addOption($opt_deact);
2632 $reg_code =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_code'),
'reg_code_enabled');
2633 $reg_code->
setChecked($this->object->isRegistrationAccessCodeEnabled());
2634 $reg_code->setValue(1);
2635 $reg_code->setInfo($this->lng->txt(
'grp_reg_code_enabled_info'));
2644 if(!$this->object->getRegistrationAccessCode())
2646 include_once
'./Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2650 $reg_link->setValue($this->object->getRegistrationAccessCode());
2651 $this->form->addItem($reg_link);
2654 include_once
'./classes/class.ilLink.php';
2655 $val =
ilLink::_getLink($this->object->getRefId(),$this->
object->getType(),array(),
'_rcode'.$this->object->getRegistrationAccessCode());
2656 $link->setHTML(
'<font class="small">'.$val.
'</font>');
2657 $reg_code->addSubItem($link);
2658 $opt_public->addSubItem($reg_code);
2663 $grp_type->addOption($opt_closed);
2664 if($a_mode ==
'update_group_type')
2666 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2668 $this->form->addItem($grp_type);
2671 if($a_mode ==
'create')
2677 $ref_id = $this->
object->getRefId();
2680 $hasParentCourse = $tree->checkForParentType(
$ref_id,
'crs');
2684 if($a_mode ==
'edit')
2688 elseif($hasParentCourse)
2697 if($hasParentCourse)
2702 $title = $this->lng->txt(
'sort_inherit_prefix');
2705 $sde->setInfo($this->lng->txt(
'sorting_info_inherit'));
2706 $sog->addOption($sde);
2711 $sma->setTitle($this->lng->txt(
'sorting_title_header'));
2712 $sma->setInfo($this->lng->txt(
'sorting_info_title'));
2713 $sog->addOption($sma);
2717 $sti->setTitle($this->lng->txt(
'sorting_manual_header'));
2718 $sti->setInfo($this->lng->txt(
'sorting_info_manual'));
2719 $sog->addOption($sti);
2721 $this->form->addItem($sog);
2724 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2725 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2726 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2728 $this->lng->loadLanguageModule(
'dateplaner');
2729 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2730 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2733 $dur->setEndText($this->lng->txt(
'cal_end'));
2734 $dur->setMinuteStepSize(5);
2735 $dur->setShowDate(
true);
2736 $dur->setShowTime(
true);
2737 $dur->setStart($this->object->getRegistrationStart());
2738 $dur->setEnd($this->object->getRegistrationEnd());
2740 $time_limit->addSubItem($dur);
2755 $this->form->addItem($time_limit);
2758 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2760 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2761 $lim->setChecked($this->object->isMembershipLimited());
2765 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2766 $max->setTitle($this->lng->txt(
'members').
':');
2768 $max->setMaxLength(4);
2769 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2770 $lim->addSubItem($max);
2774 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2775 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2776 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2777 $lim->addSubItem($wait);
2778 $this->form->addItem($lim);
2783 $this->form->setTitle($this->lng->txt(
'grp_new'));
2786 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2787 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2791 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2794 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2795 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2798 case 'update_group_type':
2799 $grp_type->setValue(
2805 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2825 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2826 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2827 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2828 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2829 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2830 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2831 $this->
object->enableRegistrationAccessCode((
bool) $_POST[
'reg_code_enabled']);
2848 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2850 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2851 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2852 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2853 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2854 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2855 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2870 global $rbacsystem,$ilUser,$ilAccess;
2876 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2878 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2879 $this->ctrl->getLinkTarget($this,
'members'),
2884 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2885 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2886 "membersGallery", get_class($this));
2889 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2891 $this->object->getEnableGroupMap())
2893 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2894 $this->ctrl->getLinkTarget($this,
'membersMap'),
2895 "membersMap", get_class($this));
2898 $this->tabs_gui->addSubTabTarget(
"mail_members",
2899 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2900 "mailMembers", get_class($this));
2902 include_once
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2905 $this->tabs_gui->addSubTabTarget(
'grp_export_members',
2906 $this->ctrl->getLinkTargetByClass(
'ilmemberexportgui',
'show'),
2907 "",
'ilmemberexportgui');
2913 $this->tabs_gui->addSubTabTarget(
"activation",
2914 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
2915 "edit", get_class($this));
2916 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
2917 $this->tabs_gui->addSubTabTarget(
"preconditions",
2918 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
2919 "",
"ilConditionHandlerInterface");
2923 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2924 $this->ctrl->getLinkTarget($this,
'edit'),
2925 "edit", get_class($this));
2927 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2928 $this->ctrl->getLinkTarget($this,
'editInfo'),
2929 "editInfo", get_class($this));
2932 if ($this->ilias->getSetting(
"custom_icons"))
2934 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2935 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2936 "editGroupIcons", get_class($this));
2939 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2942 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2943 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2944 "editMapSettings", get_class($this));
2947 $this->tabs_gui->addSubTabTarget(
'groupings',
2948 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
2952 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2953 include_once(
'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2957 $this->tabs_gui->addSubTabTarget(
'grp_custom_user_fields',
2958 $this->ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
2960 'ilobjectcustomuserfieldsgui');
2979 global $ilUser,$ilAccess;
2981 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2987 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2992 include_once
'./Services/Container/classes/class.ilMemberViewSettings.php';
2998 include_once(
'Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2999 include_once(
'Services/Membership/classes/class.ilMemberAgreement.php');
3009 include_once(
'Modules/Course/classes/Export/class.ilCourseUserData.php');
3046 $link = chr(13).chr(10).chr(13).chr(10);
3047 $link .= $this->lng->txt(
'grp_mail_permanent_link');
3048 $link .= chr(13).chr(10).chr(13).chr(10);
3049 include_once
'./classes/class.ilLink.php';
3051 return rawurlencode(base64_encode($link));