24 include_once
"./Services/Container/classes/class.ilContainerGUI.php";
25 include_once(
'./Modules/Group/classes/class.ilObjGroup.php');
47 public function __construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output =
false)
50 $this->
ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
52 $this->lng->loadLanguageModule(
'grp');
57 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,
$ilErr,
$ilCtrl;
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd();
65 $ilAccess->checkAccess(
"read",
"",
$_GET[
"ref_id"]))
67 $ilNavigationHistory->addItem(
$_GET[
"ref_id"],
68 "repository.php?cmd=frameset&ref_id=".
$_GET[
"ref_id"],
"grp");
73 case "ilconditionhandlerinterface":
74 include_once
'./classes/class.ilConditionHandlerInterface.php';
78 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
80 $this->tabs_gui->setTabActive(
'view_content');
83 $this->ctrl->forwardCommand($new_gui);
88 $this->ctrl->forwardCommand($new_gui);
92 case 'ilgroupregistrationgui':
93 $this->ctrl->setReturn($this,
'');
94 $this->tabs_gui->setTabActive(
'join');
95 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
97 $this->ctrl->forwardCommand($registration);
100 case 'ilpermissiongui':
101 $this->tabs_gui->setTabActive(
'perm_settings');
102 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
104 $ret =& $this->ctrl->forwardCommand($perm_gui);
107 case 'ilrepositorysearchgui':
108 include_once(
'./Services/Search/classes/class.ilRepositorySearchGUI.php');
110 $rep_search->setCallback($this,
118 $this->tabs_gui->setTabActive(
'members');
119 $this->ctrl->setReturn($this,
'members');
120 $ret =& $this->ctrl->forwardCommand($rep_search);
122 $this->tabs_gui->setSubTabActive(
'members');
125 case 'ilcourseitemadministrationgui':
126 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
127 $this->tabs_gui->clearSubTabs();
128 $this->ctrl->setReturn($this,
'view');
130 $this->ctrl->forwardCommand($item_adm_gui);
133 case "ilinfoscreengui":
137 case "illearningprogressgui":
138 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
141 $this->object->getRefId(),
142 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
143 $this->ctrl->forwardCommand($new_gui);
144 $this->tabs_gui->setTabActive(
'learning_progress');
147 case 'ilobjcoursegroupinggui':
148 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
150 $this->ctrl->setReturn($this,
'edit');
152 $this->ctrl->forwardCommand($crs_grp_gui);
154 $this->tabs_gui->setTabActive(
'settings');
155 $this->tabs_gui->setSubTabActive(
'groupings');
158 case 'ilcoursecontentgui':
160 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
162 $this->ctrl->forwardCommand($course_content_obj);
165 case 'ilcourseitemadministrationgui':
167 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
169 $this->ctrl->setReturn($this,
'');
171 $this->ctrl->forwardCommand($item_adm_gui);
175 $this->tabs_gui->setTabActive(
'view_content');
176 $this->tabs_gui->setSubTabActive(
'activation');
179 case 'ilpublicuserprofilegui':
180 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
182 $html = $this->ctrl->forwardCommand($profile_gui);
184 $this->tabs_gui->setTabActive(
'group_members');
185 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
186 $this->tpl->setVariable(
"ADM_CONTENT", $html);
190 $this->tabs_gui->setTabActive(
'none');
192 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
193 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
199 case "ilpageobjectgui":
203 $this->tpl->setContent(
$ret);
207 case 'ilobjectcopygui':
208 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
211 $this->ctrl->forwardCommand($cp);
214 case "ilobjstylesheetgui":
221 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
223 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
228 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
232 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
234 $this->ctrl->redirect($this,
"infoScreen");
238 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
239 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
254 global
$tree,$rbacsystem,$ilUser;
256 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
259 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
264 $this->tabs_gui->setTabActive(
'view_content');
275 $ilTabs->activateTab(
"view_content");
290 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
292 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
293 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
297 $this->object->getRefId());
313 if(!is_object($this->
object))
318 $this->ctrl->setParameter($this,
'new_type',
'grp');
320 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_create.html',
'Modules/Group');
321 $this->tpl->setVariable(
'CREATE_FORM',$this->form->getHTML());
324 $this->tpl->setVariable(
'IMP_FORMACTION',$this->ctrl->getFormAction($this));
325 $this->tpl->setVariable(
"TYPE_IMG",
327 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_grp"));
329 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
330 $this->tpl->setVariable(
"TXT_IMPORT_CRS", $this->lng->txt(
"import_grp"));
331 $this->tpl->setVariable(
"TXT_CRS_FILE", $this->lng->txt(
"file"));
332 $this->tpl->setVariable(
"TXT_IMPORT", $this->lng->txt(
"import"));
333 $this->tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
336 $umf=get_cfg_var(
"upload_max_filesize");
338 $pms=get_cfg_var(
"post_max_size");
341 $max_filesize=min($umf, $pms);
343 $max_filesize=max($umf, $pms);
346 $this->tpl->setVariable(
"TXT_FILE_INFO", $this->lng->txt(
"file_notice").$max_filesize);
365 $ilErr->setMessage(
'');
367 if(!$this->object->validate())
369 $err = $this->lng->txt(
'err_check_input');
371 $err = $ilErr->getMessage();
377 $this->
object->create();
378 $this->
object->createReference();
379 $this->
object->putInTree(
$_GET[
"ref_id"]);
380 $this->
object->setPermissions(
$_GET[
"ref_id"]);
381 $this->
object->initDefaultRoles();
382 $this->
object->initGroupStatus($this->object->getGroupType());
386 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
389 $members_obj->updateNotification($ilUser->getId(),1);
393 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
417 $this->tabs_gui->setTabActive(
'settings');
418 $this->tabs_gui->setSubTabActive(
'grp_settings');
420 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
421 if(
$_GET[
'group_type_changed'])
423 $this->ctrl->clearParameters($this);
424 $this->tpl->setVariable(
'GRP_FORMACTION',$this->ctrl->getFormAction($this));
425 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_S',$this->lng->txt(
'grp_change_type'));
426 $this->tpl->setVariable(
'TXT_SW_GRP_TYPE_C',$this->lng->txt(
'cancel'));
427 $this->
initForm(
'update_group_type');
433 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
445 $type = $this->
object->getGroupType() ?
446 $this->
object->getGroupType() :
447 $this->
object->readGroupStatus();
457 $this->
object->updateGroupType();
458 $this->
object->update();
460 $this->ctrl->redirect($this,
'edit');
475 $old_type = $this->
object->getGroupType();
478 $ilErr->setMessage(
'');
480 if(!$this->object->validate())
482 $err = $this->lng->txt(
'err_check_input');
484 $err = $ilErr->getMessage();
491 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
494 $this->
object->setGroupType($old_type);
497 $this->
object->update();
500 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
512 $this->ctrl->setParameter($this,
'group_type_changed',1);
513 $this->ctrl->redirect($this,
'edit');
519 $this->ctrl->redirect($this,
'edit');
534 $this->tabs_gui->setTabActive(
'settings');
535 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
537 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_edit_icons.html",
'Modules/Group');
539 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateGroupIcons'));
540 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
541 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
542 $this->tpl->setVariable(
"CMD_CANCEL",
"cancel");
543 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateGroupIcons");
544 $this->tpl->parseCurrentBlock();
558 if ($this->ilias->getSetting(
"custom_icons"))
560 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
561 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
565 $this->ctrl->redirect($this,
"editGroupIcons");
575 $this->
object->removeSmallIcon();
586 $this->
object->removeBigIcon();
597 $this->
object->removeTinyIcon();
606 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
609 $this->tabs_gui->setTabActive(
'settings');
610 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
612 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
614 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
619 $latitude = $this->
object->getLatitude();
620 $longitude = $this->
object->getLongitude();
621 $zoom = $this->
object->getLocationZoom();
624 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
627 $latitude = $def[
"latitude"];
628 $longitude = $def[
"longitude"];
629 $zoom = $def[
"zoom"];
636 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
638 $form->setFormAction($ilCtrl->getFormAction($this));
640 $form->setTitle($this->lng->txt(
"grp_map_settings"));
646 $public->setChecked($this->object->getEnableGroupMap());
647 $form->addItem($public);
653 $loc_prop->setLongitude($longitude);
654 $loc_prop->setZoom($zoom);
655 $form->addItem($loc_prop);
657 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
659 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
670 $this->
object->update();
672 $ilCtrl->redirect($this,
"editMapSettings");
683 $this->tabs_gui->setTabActive(
'members');
685 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
691 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
693 $map->setMapId(
"group_map");
694 $map->setWidth(
"700px");
695 $map->setHeight(
"500px");
696 $map->setLatitude($this->object->getLatitude());
697 $map->setLongitude($this->object->getLongitude());
698 $map->setZoom($this->object->getLocationZoom());
699 $map->setEnableTypeControl(
true);
700 $map->setEnableNavigationControl(
true);
701 $map->setEnableCentralMarker(
true);
704 $member_ids = $this->
object->getGroupMemberIds();
705 $admin_ids = $this->
object->getGroupAdminIds();
708 $members = $this->
object->getGroupMemberData($member_ids);
709 foreach($member_ids as $user_id)
711 $map->addUserMarker($user_id);
713 $tpl->setContent(
$map->getHTML());
714 $tpl->setLeftContent(
$map->getUserListHTML());
731 $this->tabs_gui->setTabActive(
'settings');
732 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
735 $this->tpl->setContent($this->form->getHTML());
746 if(is_object($this->form))
751 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
753 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
754 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
755 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
756 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
759 $area->
setInfo($this->lng->txt(
'grp_information_info'));
760 $area->setValue($this->object->getInformation());
763 $this->form->addItem($area);
777 $this->
object->update();
792 global $rbacsystem, $ilAccess, $ilUser;
794 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
796 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
799 $this->tabs_gui->setTabActive(
'members');
801 $member_ids = $this->
object->getGroupMemberIds();
802 $admin_ids = $this->
object->getGroupAdminIds();
805 $members = $this->
object->getGroupMemberData($member_ids);
810 $ordered_members = array();
812 foreach($members as $member)
823 array_push($ordered_members,array(
"id" => $member[
"id"],
824 "login" => $usr_obj->getLogin(),
825 "lastname" => $usr_obj->getLastName(),
826 "firstname" => $usr_obj->getFirstName(),
827 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
828 "usr_obj" => $usr_obj));
833 foreach($ordered_members as $member) {
835 $usr_obj = $member[
"usr_obj"];
837 $public_profile = $usr_obj->getPref(
"public_profile");
838 if ($public_profile ==
"g")
840 $public_profile =
"y";
844 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
845 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
848 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
850 switch(in_array($member[
"id"],$admin_ids))
854 if ($public_profile ==
"y")
856 $this->tpl->setCurrentBlock(
"tutor_linked");
857 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
858 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
859 $this->tpl->parseCurrentBlock();
863 $this->tpl->setCurrentBlock(
"tutor_not_linked");
864 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
865 $this->tpl->parseCurrentBlock();
867 $this->tpl->setCurrentBlock(
"tutor");
871 if ($public_profile ==
"y")
873 $this->tpl->setCurrentBlock(
"member_linked");
874 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
875 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
876 $this->tpl->parseCurrentBlock();
880 $this->tpl->setCurrentBlock(
"member_not_linked");
881 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
882 $this->tpl->parseCurrentBlock();
884 $this->tpl->setCurrentBlock(
"member");
889 if ($public_profile ==
"y")
891 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
892 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
894 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
895 $this->tpl->parseCurrentBlock();
897 $this->tpl->setCurrentBlock(
"members");
899 $this->tpl->parseCurrentBlock();
902 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
909 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
912 if($this->show_tracking)
914 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
921 if($privacy->enabledGroupAccessTimes())
923 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
930 $tmp_data[
'firstname'] =
$name[
'firstname'];
931 $tmp_data[
'lastname'] =
$name[
'lastname'];
933 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
937 if($this->show_tracking)
939 if(in_array($usr_id,$completed))
943 elseif(in_array($usr_id,$in_progress))
957 if($privacy->enabledGroupAccessTimes())
959 if(isset($progress[$usr_id][
'ts']) and $progress[
$usr_id][
'ts'])
963 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
967 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
968 $tmp_data[
'access_time_unix'] = 0;
972 $members[] = $tmp_data;
974 return $members ? $members : array();
987 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
988 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
992 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
993 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
1002 $this->tabs_gui->setTabActive(
'members');
1003 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1005 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
1006 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
1011 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
1014 $ilToolbar->addInputItem($ul,
true);
1017 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1023 $si->setOptions($options);
1024 $ilToolbar->addInputItem($si);
1027 $ilToolbar->addFormButton($lng->txt(
"add"),
"addAsMember");
1028 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1031 $ilToolbar->addSeparator();
1034 $ilToolbar->addButton($this->lng->txt(
"grp_search_users"),
1035 $this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
1041 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1043 if(count($wait = $waiting_list->getAllUsers()))
1045 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1046 if($ilUser->getPref(
'grp_wait_hide'))
1049 $this->ctrl->setParameter($this,
'wait_hide',0);
1050 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1051 $this->lng->txt(
'show'),
1054 $this->ctrl->clearParameters($this);
1059 $this->ctrl->setParameter($this,
'wait_hide',1);
1060 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1061 $this->lng->txt(
'hide'),
1064 $this->ctrl->clearParameters($this);
1066 $table_gui->setUsers($wait);
1067 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1068 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1073 if(count($subscribers = $part->getSubscribers()))
1075 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1076 if($ilUser->getPref(
'grp_subscriber_hide'))
1079 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1080 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1081 $this->lng->txt(
'show'),
1084 $this->ctrl->clearParameters($this);
1089 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1090 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1091 $this->lng->txt(
'hide'),
1094 $this->ctrl->clearParameters($this);
1096 $table_gui->setSubscribers($subscribers);
1097 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1098 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1101 if(count($part->getAdmins()))
1103 if($ilUser->getPref(
'grp_admin_hide'))
1106 $this->ctrl->setParameter($this,
'admin_hide',0);
1107 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1108 $this->lng->txt(
'show'),
1111 $this->ctrl->clearParameters($this);
1116 $this->ctrl->setParameter($this,
'admin_hide',1);
1117 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1118 $this->lng->txt(
'hide'),
1121 $this->ctrl->clearParameters($this);
1123 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.gif',$this->lng->txt(
'grp_admins'));
1125 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1128 if(count($part->getMembers()))
1130 if($ilUser->getPref(
'grp_member_hide'))
1133 $this->ctrl->setParameter($this,
'member_hide',0);
1134 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1135 $this->lng->txt(
'show'),
1138 $this->ctrl->clearParameters($this);
1143 $this->ctrl->setParameter($this,
'member_hide',1);
1144 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1145 $this->lng->txt(
'hide'),
1148 $this->ctrl->clearParameters($this);
1151 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.gif',$this->lng->txt(
'grp_members'));
1153 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1157 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1158 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1159 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1160 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1170 include_once(
"./Services/Form/classes/class.ilUserLoginAutoCompleteInputGUI.php");
1186 if(!count(
$_POST[
'subscribers']))
1193 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1196 $this->
object->members_obj->sendNotification(
1202 $this->
object->members_obj->deleteSubscriber($usr_id);
1221 if(!count(
$_POST[
'subscribers']))
1228 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1231 $this->
object->members_obj->sendNotification(
1235 $this->
object->members_obj->deleteSubscriber($usr_id);
1254 if(!count(
$_POST[
"waiting"]))
1261 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1264 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1267 foreach(
$_POST[
"waiting"] as $user_id)
1273 if($this->object->members_obj->isAssigned($user_id))
1278 $this->
object->members_obj->sendNotification(
1296 $this->searchObject();
1312 if(!count(
$_POST[
'waiting']))
1319 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1322 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1323 foreach(
$_POST[
"waiting"] as $user_id)
1326 $this->
object->members_obj->sendNotification(
1347 $this->tabs_gui->setTabActive(
'members');
1348 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1350 if(!count(
$_POST[
'admins']) and !count(
$_POST[
'members']))
1357 if(count(
$_POST[
'admins']) ==
1365 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1367 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1368 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1369 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1370 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1372 foreach($this->
readMemberData(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members'])) as $participants)
1374 $confirm->addItem(
'participants[]',
1375 $participants[
'usr_id'],
1376 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1380 $this->tpl->setContent($confirm->getHTML());
1394 if(!count(
$_POST[
'participants']))
1401 $this->
object->members_obj->deleteParticipants(
$_POST[
'participants']);
1404 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1405 foreach(
$_POST[
'participants'] as $part)
1407 $this->
object->members_obj->sendNotification(
1428 if(isset(
$_GET[
'member_id']))
1430 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1434 $_POST[
'participants'] = array_unique(array_merge((array)
$_POST[
'admins'],
1435 (array) $_POST[
'members'],
1436 (array) $_POST[
'waiting'],
1437 (array) $_POST[
'subscribers']));
1439 if (!count(
$_POST[
'participants']))
1449 ilUtil::redirect(
"ilias.php?baseClass=ilmailgui&type=new&rcp_to=".implode(
',',$rcps));
1463 if(isset(
$_GET[
'admin_hide']))
1465 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1467 if(isset(
$_GET[
'member_hide']))
1469 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1471 if(isset(
$_GET[
'subscriber_hide']))
1473 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1475 if(isset(
$_GET[
'wait_hide']))
1477 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1488 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1502 $participants = array_unique(array_merge((array)
$_POST[
'admins'],(array) $_POST[
'members']));
1504 if(!count($participants))
1512 $this->tabs_gui->setTabActive(
'members');
1513 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1515 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1517 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.gif',$this->lng->txt(
'grp_mem_change_status'));
1520 $this->tpl->setContent($table_gui->getHTML());
1535 if(!count(
$_POST[
'participants']))
1544 $admin_role = $this->
object->getDefaultAdminRole();
1547 if(!isset(
$_POST[
'roles'][$admin_id]))
1552 if(in_array($admin_role,
$_POST[
'roles'][$admin_id]))
1562 $_POST[
'members'] = $_POST[
'participants'];
1567 $admin_role = $this->
object->getDefaultAdminRole();
1569 $notifications =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1573 $notification =
false;
1574 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1576 $notification =
true;
1578 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array)
$_POST[
'roles'][$usr_id]))
1580 $notification =
true;
1584 $this->
object->members_obj->updateRoleAssignments($usr_id,(array)
$_POST[
'roles'][$usr_id]);
1587 $this->
object->members_obj->updateNotification($usr_id,0);
1589 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1591 $this->
object->members_obj->updateNotification($usr_id,1);
1596 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1597 $this->
object->members_obj->sendNotification(
1619 $notification =
$_POST[
'notification'] ?
$_POST[
'notification'] : array();
1620 foreach($this->object->members_obj->getAdmins() as $admin_id)
1622 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1634 $this->tabs_gui->setTabActive(
'export');
1636 $this->lng->loadLanguageModule(
'content');
1638 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1640 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1643 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
1646 $this->
object->__initFileObject();
1647 $export_files = $this->
object->file_obj->getExportFiles();
1649 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1652 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
1653 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.grp_export_file_row.html");
1657 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1659 $tbl->setTitle($this->lng->txt(
"cont_export_files"));
1660 $tbl->setHeaderNames(array(
"", $this->lng->txt(
"type"),
1661 $this->lng->txt(
"cont_file"),
1662 $this->lng->txt(
"cont_size"), $this->lng->txt(
"date") ));
1664 $cols = array(
"",
"type",
"file",
"size",
"date");
1665 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
1666 "cmd" =>
"listExportFiles",
"cmdClass" => strtolower(get_class($this)));
1667 $tbl->setHeaderVars($cols, $header_params);
1668 $tbl->setColumnWidth(array(
"1%",
"9%",
"40%",
"25%",
"25%"));
1671 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1672 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1673 $tbl->setLimit(
$_GET[
"limit"]);
1674 $tbl->setOffset(
$_GET[
"offset"]);
1675 $tbl->setMaxCount($this->maxcount);
1676 $tbl->disable(
"sort");
1678 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
1682 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1683 $this->tpl->setVariable(
"BTN_NAME",
"confirmDeleteExportFile");
1684 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
1685 $this->tpl->parseCurrentBlock();
1687 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1688 $this->tpl->setVariable(
"BTN_NAME",
"downloadExportFile");
1689 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
1690 $this->tpl->parseCurrentBlock();
1693 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1695 $tbl->setMaxCount(count($export_files));
1696 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
1698 foreach($export_files as $exp_file)
1700 $this->tpl->setCurrentBlock(
"tbl_content");
1701 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
1704 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1706 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
1707 $this->tpl->setVariable(
"TXT_TYPE", $exp_file[
"type"]);
1708 $this->tpl->setVariable(
"CHECKBOX_ID",$exp_file[
"file"]);
1710 $file_arr = explode(
"__", $exp_file[
"file"]);
1714 $this->tpl->parseCurrentBlock();
1716 if(!count($export_files))
1718 $tbl->disable(
'footer');
1719 $this->tpl->setCurrentBlock(
"notfound");
1720 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1721 $this->tpl->setVariable(
"NUM_COLS", 4);
1722 $this->tpl->parseCurrentBlock();
1725 $this->tpl->parseCurrentBlock();
1731 $this->tpl->setCurrentBlock(
"btn_cell");
1732 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"exportXML"));
1733 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_create_export_file_xml"));
1734 $this->tpl->parseCurrentBlock();
1741 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1743 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1746 $this->
object->exportXML();
1757 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1759 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1762 if(!count(
$_POST[
'file']))
1768 $this->
object->deleteExportFiles(
$_POST[
'file']);
1779 if(!count(
$_POST[
'file']))
1785 if(count(
$_POST[
'file']) > 1)
1828 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1830 $tpl =
new ilTemplate(
'tpl.unsubscribe.html',
true,
true,
'Modules/Group');
1831 $tpl->setVariable(
'UNSUB_FORMACTION',$this->ctrl->getFormAction($this));
1832 $tpl->setVariable(
'TXT_SUBMIT',$this->lng->txt(
'grp_btn_unsubscribe'));
1833 $tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
1836 $this->tpl->setContent(
$tpl->get());
1847 global $ilUser,
$tree;
1851 $this->
object->members_obj->delete($ilUser->getId());
1853 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1854 $this->
object->members_obj->sendNotification(
1858 $this->
object->members_obj->sendNotification(
1864 ilUtil::redirect(
'repository.php?ref_id='.$tree->getParentId($this->object->getRefId()));
1874 $user_ids =
$_POST[
"id"];
1876 if (empty($user_ids[0]))
1879 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1882 foreach ($user_ids as $new_member)
1884 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1886 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1901 $users = explode(
',',
$_POST[
'user_login']);
1902 foreach($users as
$user)
1919 $user_ids =
$_POST[
"user"];
1923 if (empty($user_ids[0]))
1926 #$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1931 foreach ($user_ids as $new_member)
1933 switch(
$_POST[
'member_type'])
1936 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1938 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1943 if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
1945 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1952 include_once
'./Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1953 $this->
object->members_obj->sendNotification(
1960 unset(
$_SESSION[
'grp_usr_search_result']);
1971 global $rbacreview, $ilObjDataCache;
1972 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1975 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
'Services/Contact');
1979 $this->tabs_gui->setTabActive(
'members');
1981 $this->tpl->setVariable(
"MAILACTION",
'ilias.php?baseClass=ilMailGUI&type=role');
1983 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1984 $this->tpl->setVariable(
"OK",$this->lng->txt(
'ok'));
1987 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1988 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1989 $role_addrs = array();
1992 $sorted_role_ids = array();
1994 foreach($role_ids as $role_id)
1999 $sorted_role_ids[1] = $role_id;
2003 $sorted_role_ids[0] = $role_id;
2007 $sorted_role_ids[$counter++] = $role_id;
2011 ksort($sorted_role_ids,SORT_NUMERIC);
2012 foreach ((array) $sorted_role_ids as $role_id)
2014 $this->tpl->setCurrentBlock(
"mailbox_row");
2015 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
2017 htmlspecialchars($role_addr)
2023 $this->tpl->setVariable(
"MAILBOX",$role_addr);
2030 $this->tpl->parseCurrentBlock();
2040 $user_ids =
$_POST[
"user_id"];
2042 if (empty($user_ids[0]))
2044 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
2049 foreach ($user_ids as $new_member)
2051 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
2053 $this->
object->deleteApplicationListEntry($new_member);
2054 $mail->sendMail(
$user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
2064 global $rbacsystem, $ilUser, $ilAccess,
$lng;
2066 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
2068 $tabs_gui->addTab(
"view_content", $lng->txt(
"content"),
2069 $this->ctrl->getLinkTarget($this,
""));
2071 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
2073 $tabs_gui->addTarget(
"info_short",
2074 $this->ctrl->getLinkTargetByClass(
2075 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
2081 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2083 $tabs_gui->addTarget(
"settings",
2084 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
2089 if($ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
2091 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
2092 $tabs_gui->addTarget(
"members",$this->ctrl->getLinkTarget($this, $mem_cmd), array(),get_class($this));
2097 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
2100 $tabs_gui->addTarget(
'learning_progress',
2101 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
2103 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
2106 if ($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
2108 $tabs_gui->addTarget(
'export',
2109 $this->ctrl->getLinkTarget($this,
'listExportFiles'),
2110 array(
'listExportFiles',
'exportXML',
'confirmDeleteExportFile',
'downloadExportFile'),
2117 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
2118 !$this->object->members_obj->isAssigned($ilUser->getId()))
2120 include_once
'./Modules/Group/classes/class.ilGroupWaitingList.php';
2125 $this->lng->txt(
'membership_leave'),
2126 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
2133 $tabs_gui->addTarget(
"join",
2134 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
2139 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
2140 $this->object->members_obj->isMember($ilUser->getId()))
2142 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
2143 $this->ctrl->getLinkTarget($this,
"leave"),
2154 if(!is_array($_FILES[
'xmldoc']))
2161 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
2165 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
2177 include_once
'./classes/class.ilConditionHandlerInterface.php';
2179 if(!is_object($this->chi_obj))
2181 if(
$_GET[
'item_id'])
2184 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
2203 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html");
2204 $this->tpl->setCurrentBlock(
"adm_content");
2205 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2206 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2207 $this->tpl->parseCurrentBlock();
2218 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2219 include_once
"./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2221 $workbook = $adapter->getWorkbook();
2223 $format_bold =& $workbook->addFormat();
2224 $format_bold->setBold();
2225 $format_percent =& $workbook->addFormat();
2226 $format_percent->setNumFormat(
"0.00%");
2227 $format_datetime =& $workbook->addFormat();
2228 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2229 $format_title =& $workbook->addFormat();
2230 $format_title->setBold();
2231 $format_title->setColor(
'black');
2232 $format_title->setPattern(1);
2233 $format_title->setFgColor(
'silver');
2234 $worksheet =& $workbook->addWorksheet();
2236 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2237 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2238 "fax",
"matriculation");
2239 foreach ($profile_data as
$data)
2241 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2243 $member_ids = $this->
object->getGroupMemberIds();
2245 foreach ($member_ids as $member_id)
2248 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2249 if ($member->getPref(
"public_email")==
"y")
2251 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getEmail()));
2257 $worksheet->writeString(
$row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2258 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFirstname()));
2259 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getLastname()));
2260 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getUTitle()));
2261 if ($member->getPref(
"public_institution")==
"y")
2263 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getInstitution()));
2269 if ($member->getPref(
"public_department")==
"y")
2271 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getDepartment()));
2277 if ($member->getPref(
"public_street")==
"y")
2279 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getStreet()));
2285 if ($member->getPref(
"public_zip")==
"y")
2287 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getZipcode()));
2293 if ($member->getPref(
"public_city")==
"y")
2295 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCity()));
2301 if ($member->getPref(
"public_country")==
"y")
2303 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getCountry()));
2309 if ($member->getPref(
"public_phone_office")==
"y")
2311 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneOffice()));
2317 if ($member->getPref(
"public_phone_home")==
"y")
2319 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneHome()));
2325 if ($member->getPref(
"public_phone_mobile")==
"y")
2327 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getPhoneMobile()));
2333 if ($member->getPref(
"public_fax")==
"y")
2335 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getFax()));
2341 if ($member->getPref(
"public_matriculation")==
"y")
2343 $worksheet->writeString(
$row, $column++, $this->
cleanString($member->getMatriculation()));
2364 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2379 $this->ctrl->setCmd(
"showSummary");
2380 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2391 $this->tabs_gui->setTabActive(
'info_short');
2393 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2395 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2398 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2401 if(strlen($this->object->getInformation()))
2403 $info->addSection($this->lng->txt(
'grp_general_informations'));
2404 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2408 $info->enablePrivateNotes();
2409 $info->enableLearningProgress(
true);
2411 $info->addSection($this->lng->txt(
'group_registration'));
2412 $info->showLDAPRoleGroupMappingInfo();
2414 if(!$this->object->isRegistrationEnabled())
2416 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2417 $this->lng->txt(
'grp_reg_deac_info_screen'));
2422 switch($this->object->getRegistrationType())
2425 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2426 $this->lng->txt(
'grp_reg_direct_info_screen'));
2430 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2431 $this->lng->txt(
'grp_reg_req_info_screen'));
2435 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2436 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2446 if($this->object->isRegistrationUnlimited())
2448 $info->addProperty($this->lng->txt(
'group_registration_time'),
2449 $this->lng->txt(
'grp_registration_unlimited'));
2451 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2453 $info->addProperty($this->lng->txt(
"group_registration_time"),
2454 $this->lng->txt(
'cal_until').
' '.
2457 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2459 $info->addProperty($this->lng->txt(
"group_registration_time"),
2460 $this->lng->txt(
'cal_from').
' '.
2463 if ($this->object->isMembershipLimited())
2465 $info->addProperty($this->lng->txt(
"mem_free_places"),
2466 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2473 $this->ctrl->forwardCommand($info);
2483 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2485 $_GET[
"cmd"] =
"frameset";
2486 $_GET[
"ref_id"] = $a_target;
2487 include(
"repository.php");
2493 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2495 $_GET[
"cmd"] =
"infoScreen";
2496 $_GET[
"ref_id"] = $a_target;
2497 include(
"repository.php");
2502 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2504 $_GET[
"cmd"] =
"frameset";
2505 $_GET[
"target"] =
"";
2506 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2509 include(
"repository.php");
2514 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2527 global $ilUser,
$tpl;
2529 if(is_object($this->form))
2534 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2537 $this->form->setTableWidth(
'60%');
2542 $this->form->setFormAction($this->ctrl->getFormAction($this,
'update'));
2546 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
2552 $title->setSubmitFormOnEnter(
true);
2553 $title->setValue($this->object->getTitle());
2555 $title->setMaxLength(128);
2556 $title->setRequired(
true);
2557 $this->form->addItem(
$title);
2561 $desc->setValue($this->object->getLongDescription());
2564 $this->form->addItem(
$desc);
2569 if($a_mode ==
'edit')
2571 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2578 $grp_type->setValue(
$type);
2579 $grp_type->setRequired(
true);
2582 #$opt_open = new ilRadioOption($this->lng->txt('grp_open'),GRP_TYPE_OPEN,$this->lng->txt('grp_open_info'));
2583 #$grp_type->addOption($opt_open);
2588 $grp_type->addOption($opt_public);
2592 $reg_type->setValue($this->object->getRegistrationType());
2595 $reg_type->addOption($opt_dir);
2599 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2600 $pass->
setValue($this->object->getPassword());
2602 $pass->setMaxLength(32);
2604 $reg_type->addOption($opt_pass);
2605 $opt_public->addSubItem($reg_type);
2608 $reg_type->addOption($opt_req);
2611 $reg_type->addOption($opt_deact);
2615 $grp_type->addOption($opt_closed);
2616 if($a_mode ==
'update_group_type')
2618 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2620 $this->form->addItem($grp_type);
2623 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2624 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2625 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2627 $this->lng->loadLanguageModule(
'dateplaner');
2628 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
2629 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
2632 $dur->setEndText($this->lng->txt(
'cal_end'));
2633 $dur->setMinuteStepSize(5);
2634 $dur->setShowDate(
true);
2635 $dur->setShowTime(
true);
2636 $dur->setStart($this->object->getRegistrationStart());
2637 $dur->setEnd($this->object->getRegistrationEnd());
2639 $time_limit->addSubItem($dur);
2654 $this->form->addItem($time_limit);
2657 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2659 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2660 $lim->setChecked($this->object->isMembershipLimited());
2664 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2665 $max->setTitle($this->lng->txt(
'members').
':');
2667 $max->setMaxLength(4);
2668 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2669 $lim->addSubItem($max);
2673 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2674 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2675 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2676 $lim->addSubItem($wait);
2677 $this->form->addItem($lim);
2682 $this->form->setTitle($this->lng->txt(
'grp_new'));
2685 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2686 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2690 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2693 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2694 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2697 case 'update_group_type':
2698 $grp_type->setValue(
2704 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2724 $this->
object->enableUnlimitedRegistration((
bool) !
$_POST[
'reg_limit_time']);
2725 $this->
object->setRegistrationStart($this->
loadDate(
'start'));
2726 $this->
object->setRegistrationEnd($this->
loadDate(
'end'));
2727 $this->
object->enableMembershipLimitation((
bool)
$_POST[
'registration_membership_limited']);
2728 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2729 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2745 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2747 $dt[
'year'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'y'];
2748 $dt[
'mon'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'm'];
2749 $dt[
'mday'] = (int)
$_POST[
'reg'][$a_field][
'date'][
'd'];
2750 $dt[
'hours'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'h'];
2751 $dt[
'minutes'] = (int)
$_POST[
'reg'][$a_field][
'time'][
'm'];
2752 $dt[
'seconds'] = (int)
$_POST[
'reg'][$a_field][
'time'][
's'];
2767 global $rbacsystem,$ilUser,$ilAccess;
2773 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2775 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2776 $this->ctrl->getLinkTarget($this,
'members'),
2781 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2782 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2783 "membersGallery", get_class($this));
2786 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2788 $this->object->getEnableGroupMap())
2790 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2791 $this->ctrl->getLinkTarget($this,
'membersMap'),
2792 "membersMap", get_class($this));
2795 $this->tabs_gui->addSubTabTarget(
"mail_members",
2796 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2797 "mailMembers", get_class($this));
2802 $this->tabs_gui->addSubTabTarget(
"activation",
2803 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
2804 "edit", get_class($this));
2805 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
2806 $this->tabs_gui->addSubTabTarget(
"preconditions",
2807 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
2808 "",
"ilConditionHandlerInterface");
2812 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2813 $this->ctrl->getLinkTarget($this,
'edit'),
2814 "edit", get_class($this));
2816 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2817 $this->ctrl->getLinkTarget($this,
'editInfo'),
2818 "editInfo", get_class($this));
2821 if ($this->ilias->getSetting(
"custom_icons"))
2823 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2824 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2825 "editGroupIcons", get_class($this));
2829 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2832 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2833 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2834 "editMapSettings", get_class($this));
2837 $this->tabs_gui->addSubTabTarget(
'groupings',
2838 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),