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;
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 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
96 $this->ctrl->forwardCommand($registration);
97 $this->tabs_gui->setTabActive(
'join');
100 case 'ilpermissiongui':
101 $this->tabs_gui->setTabActive(
'perm_settings');
102 include_once(
"./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,
'addUserObject');
113 $this->tabs_gui->setTabActive(
'members');
114 $this->ctrl->setReturn($this,
'members');
115 $ret =& $this->ctrl->forwardCommand($rep_search);
117 $this->tabs_gui->setSubTabActive(
'members');
120 case 'ilcourseitemadministrationgui':
121 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
122 $this->tabs_gui->clearSubTabs();
123 $this->ctrl->setReturn($this,
'view');
125 $this->ctrl->forwardCommand($item_adm_gui);
128 case "ilinfoscreengui":
132 case "illearningprogressgui":
133 include_once
'./Services/Tracking/classes/class.ilLearningProgressGUI.php';
136 $this->object->getRefId(),
137 $_GET[
'user_id'] ?
$_GET[
'user_id'] : $ilUser->getId());
138 $this->ctrl->forwardCommand($new_gui);
139 $this->tabs_gui->setTabActive(
'learning_progress');
142 case 'ilobjcoursegroupinggui':
143 include_once
'./Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
145 $this->ctrl->setReturn($this,
'edit');
147 $this->ctrl->forwardCommand($crs_grp_gui);
149 $this->tabs_gui->setTabActive(
'settings');
150 $this->tabs_gui->setSubTabActive(
'groupings');
153 case 'ilcoursecontentgui':
155 include_once
'./Modules/Course/classes/class.ilCourseContentGUI.php';
157 $this->ctrl->forwardCommand($course_content_obj);
160 case 'ilcourseitemadministrationgui':
162 include_once
'Modules/Course/classes/class.ilCourseItemAdministrationGUI.php';
164 $this->ctrl->setReturn($this,
'');
166 $this->ctrl->forwardCommand($item_adm_gui);
170 $this->tabs_gui->setTabActive(
'view_content');
171 $this->tabs_gui->setSubTabActive(
'activation');
174 case 'ilpublicuserprofilegui':
175 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
177 $html = $this->ctrl->forwardCommand($profile_gui);
179 $this->tabs_gui->setTabActive(
'group_members');
180 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
181 $this->tpl->setVariable(
"ADM_CONTENT", $html);
185 $this->tabs_gui->setTabActive(
'none');
187 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
189 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
195 case "ilpageobjectgui":
201 $this->tpl->setContent(
$ret);
208 if (!$this->
getCreationMode() and !$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId(),
'grp'))
210 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),$ilErr->MESSAGE);
215 && !$rbacsystem->checkAccess(
'read',$this->object->getRefId()) &&
$cmd !=
'infoScreen')
219 if (!$rbacsystem->checkAccess(
'join',$this->object->getRefId()))
221 $this->ctrl->redirect($this,
"infoScreen");
225 include_once(
'./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
226 $this->ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
241 global
$tree,$rbacsystem,$ilUser;
243 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
246 if (strtolower(
$_GET[
"baseClass"]) ==
"iladministrationgui")
251 $this->tabs_gui->setTabActive(
'view_content');
282 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),
'crs'))
284 include_once(
"./Modules/Course/classes/class.ilObjCourse.php");
285 include_once(
"./Modules/Course/classes/class.ilObjCourseGUI.php");
289 $this->object->getRefId());
305 if(!is_object($this->
object))
310 $this->ctrl->setParameter($this,
'new_type',
'grp');
312 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_create.html',
'Modules/Group');
313 $this->tpl->setVariable(
'CREATE_FORM',$this->form->getHTML());
316 $this->tpl->setVariable(
'IMP_FORMACTION',$this->ctrl->getFormAction($this));
317 $this->tpl->setVariable(
"TYPE_IMG",
319 $this->tpl->setVariable(
"ALT_IMG", $this->lng->txt(
"obj_grp"));
321 $this->tpl->setVariable(
"TXT_REQUIRED_FLD", $this->lng->txt(
"required_field"));
322 $this->tpl->setVariable(
"TXT_IMPORT_CRS", $this->lng->txt(
"import_grp"));
323 $this->tpl->setVariable(
"TXT_CRS_FILE", $this->lng->txt(
"file"));
324 $this->tpl->setVariable(
"TXT_IMPORT", $this->lng->txt(
"import"));
325 $this->tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
328 $umf=get_cfg_var(
"upload_max_filesize");
330 $pms=get_cfg_var(
"post_max_size");
333 $max_filesize=min($umf, $pms);
335 $max_filesize=max($umf, $pms);
338 $this->tpl->setVariable(
"TXT_FILE_INFO", $this->lng->txt(
"file_notice").$max_filesize);
357 $ilErr->setMessage(
'');
359 if(!$this->object->validate())
361 $err = $this->lng->txt(
'err_check_input').
'<br />';
362 $err .= $this->lng->txt($ilErr->getMessage());
368 $this->
object->create();
369 $this->
object->createReference();
370 $this->
object->putInTree(
$_GET[
"ref_id"]);
371 $this->
object->setPermissions(
$_GET[
"ref_id"]);
372 $this->
object->initDefaultRoles();
373 $this->
object->initGroupStatus($this->object->getGroupType());
377 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
380 $members_obj->updateNotification($ilUser->getId(),1);
384 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
408 $this->tabs_gui->setTabActive(
'settings');
409 $this->tabs_gui->setSubTabActive(
'grp_settings');
411 if($a_group_type_warning)
414 $this->
initForm(
'update_group_type');
420 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit.html',
'Modules/Group');
421 $this->tpl->setVariable(
'EDIT_FORM',$this->form->getHTML());
448 $old_type = $this->
object->getGroupType();
451 $ilErr->setMessage(
'');
453 if(!$this->object->validate())
455 $err = $this->lng->txt(
'err_check_input').
'<br />';
456 $err .= $this->lng->txt($ilErr->getMessage());
462 if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
468 if($update_group_type)
470 $this->
object->updateGroupType();
473 $this->
object->update();
476 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
486 $this->ctrl->redirect($this,
'edit');
500 $this->tabs_gui->setTabActive(
'settings');
501 $this->tabs_gui->setSubTabActive(
'grp_icon_settings');
503 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_edit_icons.html",
'Modules/Group');
505 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this,
'updateGroupIcons'));
506 $this->tpl->setVariable(
"TXT_CANCEL", $this->lng->txt(
"cancel"));
507 $this->tpl->setVariable(
"TXT_SUBMIT", $this->lng->txt(
"save"));
508 $this->tpl->setVariable(
"CMD_CANCEL",
"cancel");
509 $this->tpl->setVariable(
"CMD_SUBMIT",
"updateGroupIcons");
510 $this->tpl->parseCurrentBlock();
524 if ($this->ilias->getSetting(
"custom_icons"))
526 $this->
object->saveIcons($_FILES[
"cont_big_icon"][
'tmp_name'],
527 $_FILES[
"cont_small_icon"][
'tmp_name'], $_FILES[
"cont_tiny_icon"][
'tmp_name']);
531 $this->ctrl->redirect($this,
"editGroupIcons");
541 $this->
object->removeSmallIcon();
552 $this->
object->removeBigIcon();
563 $this->
object->removeTinyIcon();
572 global $ilUser,
$ilCtrl, $ilUser, $ilAccess;
575 $this->tabs_gui->setTabActive(
'settings');
576 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
578 include_once(
'./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
580 !$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
585 $latitude = $this->
object->getLatitude();
586 $longitude = $this->
object->getLongitude();
587 $zoom = $this->
object->getLocationZoom();
590 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
593 $latitude = $def[
"latitude"];
594 $longitude = $def[
"longitude"];
595 $zoom = $def[
"zoom"];
602 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
604 $form->setFormAction($ilCtrl->getFormAction($this));
606 $form->setTitle($this->lng->txt(
"grp_map_settings"));
612 $public->setChecked($this->object->getEnableGroupMap());
613 $form->addItem($public);
619 $loc_prop->setLongitude($longitude);
620 $loc_prop->setZoom($zoom);
621 $form->addItem($loc_prop);
623 $form->addCommandButton(
"saveMapSettings", $this->lng->txt(
"save"));
625 $this->tpl->setVariable(
"ADM_CONTENT", $form->getHTML());
636 $this->
object->update();
638 $ilCtrl->redirect($this,
"editMapSettings");
649 $this->tabs_gui->setTabActive(
'members');
651 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
657 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
659 $map->setMapId(
"group_map");
660 $map->setWidth(
"700px");
661 $map->setHeight(
"500px");
662 $map->setLatitude($this->object->getLatitude());
663 $map->setLongitude($this->object->getLongitude());
664 $map->setZoom($this->object->getLocationZoom());
665 $map->setEnableTypeControl(
true);
666 $map->setEnableNavigationControl(
true);
668 $member_ids = $this->
object->getGroupMemberIds();
669 $admin_ids = $this->
object->getGroupAdminIds();
672 $members = $this->
object->getGroupMemberData($member_ids);
673 foreach($member_ids as $user_id)
675 $map->addUserMarker($user_id);
677 $tpl->setContent($map->getHTML());
678 $tpl->setLeftContent($map->getUserListHTML());
695 $this->tabs_gui->setTabActive(
'settings');
696 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
699 $this->tpl->setContent($this->form->getHTML());
710 if(is_object($this->form))
715 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
717 $this->form->setFormAction($this->ctrl->getFormAction($this,
'updateInfo'));
718 $this->form->setTitle($this->lng->txt(
'grp_general_informations'));
719 $this->form->addCommandButton(
'updateInfo',$this->lng->txt(
'save'));
720 $this->form->addCommandButton(
'editInfo',$this->lng->txt(
'cancel'));
723 $area->
setInfo($this->lng->txt(
'grp_information_info'));
724 $area->setValue($this->object->getInformation());
727 $this->form->addItem($area);
741 $this->
object->update();
756 global $rbacsystem, $ilAccess, $ilUser;
758 $is_admin = (bool) $rbacsystem->checkAccess(
"write", $this->object->getRefId());
760 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.crs_members_gallery.html',
'Modules/Course');
763 $this->tabs_gui->setTabActive(
'members');
765 $member_ids = $this->
object->getGroupMemberIds();
766 $admin_ids = $this->
object->getGroupAdminIds();
769 $members = $this->
object->getGroupMemberData($member_ids);
774 $ordered_members = array();
776 foreach($members as $member)
787 array_push($ordered_members,array(
"id" => $member[
"id"],
788 "login" => $usr_obj->getLogin(),
789 "lastname" => $usr_obj->getLastName(),
790 "firstname" => $usr_obj->getFirstName(),
791 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
792 "usr_obj" => $usr_obj));
797 foreach($ordered_members as $member) {
799 $usr_obj = $member[
"usr_obj"];
801 $public_profile = $usr_obj->getPref(
"public_profile");
804 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user", $member[
"id"]);
805 $profile_target = $this->ctrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML");
808 $file = $usr_obj->getPersonalPicturePath(
"xsmall");
810 switch(in_array($member[
"id"],$admin_ids))
814 if ($public_profile ==
"y")
816 $this->tpl->setCurrentBlock(
"tutor_linked");
817 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
818 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
819 $this->tpl->parseCurrentBlock();
823 $this->tpl->setCurrentBlock(
"tutor_not_linked");
824 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
825 $this->tpl->parseCurrentBlock();
827 $this->tpl->setCurrentBlock(
"tutor");
831 if ($public_profile ==
"y")
833 $this->tpl->setCurrentBlock(
"member_linked");
834 $this->tpl->setVariable(
"LINK_PROFILE", $profile_target);
835 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
836 $this->tpl->parseCurrentBlock();
840 $this->tpl->setCurrentBlock(
"member_not_linked");
841 $this->tpl->setVariable(
"SRC_USR_IMAGE",
$file);
842 $this->tpl->parseCurrentBlock();
844 $this->tpl->setCurrentBlock(
"member");
849 if ($public_profile ==
"y")
851 $this->tpl->setVariable(
"FIRSTNAME", $member[
"firstname"]);
852 $this->tpl->setVariable(
"LASTNAME", $member[
"lastname"]);
854 $this->tpl->setVariable(
"LOGIN", $usr_obj->getLogin());
855 $this->tpl->parseCurrentBlock();
857 $this->tpl->setCurrentBlock(
"members");
859 $this->tpl->parseCurrentBlock();
862 $this->tpl->setVariable(
"TITLE",$this->lng->txt(
'crs_members_print_title'));
869 include_once(
'./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
872 if($this->show_tracking)
874 include_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
881 if($privacy->enabledGroupAccessTimes())
883 include_once(
'./Services/Tracking/classes/class.ilLearningProgress.php');
887 foreach($ids as $usr_id)
890 $tmp_data[
'firstname'] = $name[
'firstname'];
891 $tmp_data[
'lastname'] = $name[
'lastname'];
893 $tmp_data[
'notification'] = $this->
object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
894 $tmp_data[
'usr_id'] = $usr_id;
897 if($this->show_tracking)
899 if(in_array($usr_id,$completed))
903 elseif(in_array($usr_id,$in_progress))
907 elseif(in_array($usr_id,
$failed))
917 if($privacy->enabledGroupAccessTimes())
919 if(isset($progress[$usr_id][
'ts']) and $progress[$usr_id][
'ts'])
923 $tmp_data[
'access_time_unix'] = $tmp_date->get(
'IL_CAL_UNIX');
927 $tmp_data[
'access_time'] = $this->lng->txt(
'no_date');
928 $tmp_data[
'access_time_unix'] = 0;
932 $members[] = $tmp_data;
934 return $members ? $members : array();
947 include_once(
'./Modules/Group/classes/class.ilGroupParticipants.php');
948 include_once(
'./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
952 include_once
'./Services/Tracking/classes/class.ilObjUserTracking.php';
953 include_once(
'./Services/Tracking/classes/class.ilLPObjSettings.php');
962 $this->tabs_gui->setTabActive(
'members');
963 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
965 $this->tpl->addBlockfile(
'ADM_CONTENT',
'adm_content',
'tpl.grp_edit_members.html',
'Modules/Group');
966 $this->tpl->setVariable(
'FORMACTION',$this->ctrl->getFormAction($this));
969 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
970 $this->tpl->setCurrentBlock(
"btn_cell");
971 $this->tpl->setVariable(
"BTN_LINK",$this->ctrl->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
972 $this->tpl->setVariable(
"BTN_TXT",$this->lng->txt(
"grp_add_member"));
973 $this->tpl->parseCurrentBlock();
979 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
981 if(count($wait = $waiting_list->getAllUsers()))
983 include_once(
'./Services/Membership/classes/class.ilWaitingListTableGUI.php');
984 if($ilUser->getPref(
'grp_wait_hide'))
987 $this->ctrl->setParameter($this,
'wait_hide',0);
988 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
989 $this->lng->txt(
'show'),
992 $this->ctrl->clearParameters($this);
997 $this->ctrl->setParameter($this,
'wait_hide',1);
998 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
999 $this->lng->txt(
'hide'),
1002 $this->ctrl->clearParameters($this);
1004 $table_gui->setUsers($wait);
1005 $table_gui->setTitle($this->lng->txt(
'grp_header_waiting_list'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1006 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1011 if(count($subscribers = $part->getSubscribers()))
1013 include_once(
'./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1014 if($ilUser->getPref(
'grp_subscriber_hide'))
1017 $this->ctrl->setParameter($this,
'subscriber_hide',0);
1018 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1019 $this->lng->txt(
'show'),
1022 $this->ctrl->clearParameters($this);
1027 $this->ctrl->setParameter($this,
'subscriber_hide',1);
1028 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1029 $this->lng->txt(
'hide'),
1032 $this->ctrl->clearParameters($this);
1034 $table_gui->setSubscribers($subscribers);
1035 $table_gui->setTitle($this->lng->txt(
'group_new_registrations'),
'icon_usr.gif',$this->lng->txt(
'group_new_registrations'));
1036 $this->tpl->setVariable(
'TABLE_SUB',$table_gui->getHTML());
1039 if(count($part->getAdmins()))
1041 if($ilUser->getPref(
'grp_admin_hide'))
1044 $this->ctrl->setParameter($this,
'admin_hide',0);
1045 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1046 $this->lng->txt(
'show'),
1049 $this->ctrl->clearParameters($this);
1054 $this->ctrl->setParameter($this,
'admin_hide',1);
1055 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1056 $this->lng->txt(
'hide'),
1059 $this->ctrl->clearParameters($this);
1061 $table_gui->setTitle($this->lng->txt(
'grp_admins'),
'icon_usr.gif',$this->lng->txt(
'grp_admins'));
1063 $this->tpl->setVariable(
'ADMINS',$table_gui->getHTML());
1066 if(count($part->getMembers()))
1068 if($ilUser->getPref(
'grp_member_hide'))
1071 $this->ctrl->setParameter($this,
'member_hide',0);
1072 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1073 $this->lng->txt(
'show'),
1076 $this->ctrl->clearParameters($this);
1081 $this->ctrl->setParameter($this,
'member_hide',1);
1082 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,
'members'),
1083 $this->lng->txt(
'hide'),
1086 $this->ctrl->clearParameters($this);
1089 $table_gui->setTitle($this->lng->txt(
'grp_members'),
'icon_usr.gif',$this->lng->txt(
'grp_members'));
1091 $this->tpl->setVariable(
'MEMBERS',$table_gui->getHTML());
1095 $this->tpl->setVariable(
'TXT_SELECTED_USER',$this->lng->txt(
'grp_selected_users'));
1096 $this->tpl->setVariable(
'BTN_FOOTER_EDIT',$this->lng->txt(
'edit'));
1097 $this->tpl->setVariable(
'BTN_FOOTER_VAL',$this->lng->txt(
'remove'));
1098 $this->tpl->setVariable(
'BTN_FOOTER_MAIL',$this->lng->txt(
'grp_mem_send_mail'));
1115 if(!count($_POST[
'subscribers']))
1122 foreach($_POST[
'subscribers'] as $usr_id)
1124 $mail =
new ilMail($ilUser->getId());
1129 sprintf($lng->txt(
'grp_accept_subscriber'), $this->
object->getTitle()),
1130 sprintf(str_replace(
'\n',
"\n",$lng->txt(
'grp_accept_subscriber_body')),
1131 $this->object->getTitle(), $ilIliasIniFile->readVariable(
'server',
'http_path').
'/goto.php?client_id='.CLIENT_ID.
'&target=grp_'.$this->
object->getRefId()),
1132 array(),array(
'system'));
1134 $this->
object->members_obj->deleteSubscriber($usr_id);
1153 if(!count($_POST[
'subscribers']))
1160 foreach($_POST[
'subscribers'] as $usr_id)
1166 sprintf($lng->txt(
'grp_reject_subscriber'), $this->
object->getTitle()),
1167 sprintf(str_replace(
'\n',
"\n",$lng->txt(
'grp_reject_subscriber_body')),
1168 $this->object->getTitle()),
1169 array(),array(
'system'));
1170 $this->
object->members_obj->deleteSubscriber($usr_id);
1189 if(!count($_POST[
"waiting"]))
1196 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1200 foreach($_POST[
"waiting"] as $user_id)
1206 if($this->object->members_obj->isAssigned($user_id))
1211 #$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
1226 $this->searchObject();
1242 if(!count($_POST[
'waiting']))
1249 include_once(
'./Modules/Group/classes/class.ilGroupWaitingList.php');
1252 foreach($_POST[
"waiting"] as $user_id)
1272 $this->tabs_gui->setTabActive(
'members');
1273 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1275 if(!count($_POST[
'admins']) and !count($_POST[
'members']))
1282 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
1284 $confirm->setFormAction($this->ctrl->getFormAction($this,
'deleteMembers'));
1285 $confirm->setHeaderText($this->lng->txt(
'grp_dismiss_member'));
1286 $confirm->setConfirm($this->lng->txt(
'confirm'),
'deleteMembers');
1287 $confirm->setCancel($this->lng->txt(
'cancel'),
'members');
1289 foreach($this->
readMemberData(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members'])) as $participants)
1291 $confirm->addItem(
'participants[]',
1292 $participants[
'usr_id'],
1293 $participants[
'lastname'].
', '.$participants[
'firstname'].
' ['.$participants[
'login'].
']',
1297 $this->tpl->setContent($confirm->getHTML());
1311 if(!count($_POST[
'participants']))
1318 $this->
object->members_obj->deleteParticipants($_POST[
'participants']);
1333 if(isset(
$_GET[
'member_id']))
1335 $_POST[
'participants'] = array(
$_GET[
'member_id']);
1339 $_POST[
'participants'] = array_unique(array_merge((array) $_POST[
'admins'],
1340 (array) $_POST[
'members'],
1341 (array) $_POST[
'waiting'],
1342 (array) $_POST[
'subscribers']));
1344 if (!count($_POST[
'participants']))
1350 foreach($_POST[
'participants'] as $usr_id)
1354 ilUtil::redirect(
"ilias.php?baseClass=ilmailgui&type=new&rcp_to=".implode(
',',$rcps));
1368 if(isset(
$_GET[
'admin_hide']))
1370 $ilUser->writePref(
'grp_admin_hide',(
int)
$_GET[
'admin_hide']);
1372 if(isset(
$_GET[
'member_hide']))
1374 $ilUser->writePref(
'grp_member_hide',(
int)
$_GET[
'member_hide']);
1376 if(isset(
$_GET[
'subscriber_hide']))
1378 $ilUser->writePref(
'grp_subscriber_hide',(
int)
$_GET[
'subscriber_hide']);
1380 if(isset(
$_GET[
'wait_hide']))
1382 $ilUser->writePref(
'grp_wait_hide',(
int)
$_GET[
'wait_hide']);
1393 $_POST[
'members'] = array((
int)
$_GET[
'member_id']);
1407 $participants = array_unique(array_merge((array) $_POST[
'admins'],(array) $_POST[
'members']));
1409 if(!count($participants))
1417 $this->tabs_gui->setTabActive(
'members');
1418 $this->tabs_gui->setSubTabActive(
'grp_edit_members');
1420 include_once(
'./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1422 $table_gui->setTitle($this->lng->txt(
'grp_mem_change_status'),
'icon_usr.gif',$this->lng->txt(
'grp_mem_change_status'));
1425 $this->tpl->setContent($table_gui->getHTML());
1440 if(!count($_POST[
'participants']))
1447 $notifications = $_POST[
'notification'] ? $_POST[
'notification'] : array();
1448 foreach($_POST[
'participants'] as $usr_id)
1451 $this->
object->members_obj->updateRoleAssignments($usr_id,(array) $_POST[
'roles'][$usr_id]);
1454 $this->
object->members_obj->updateNotification($usr_id,0);
1456 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1458 $this->
object->members_obj->updateNotification($usr_id,1);
1477 $notification = $_POST[
'notification'] ? $_POST[
'notification'] : array();
1478 foreach($this->object->members_obj->getAdmins() as $admin_id)
1480 $this->
object->members_obj->updateNotification($admin_id,(
int) in_array($admin_id,$notification));
1492 $this->tabs_gui->setTabActive(
'export');
1494 $this->lng->loadLanguageModule(
'content');
1496 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1498 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1501 $this->tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
1504 $this->
object->__initFileObject();
1505 $export_files = $this->
object->file_obj->getExportFiles();
1507 require_once(
"./Services/Table/classes/class.ilTableGUI.php");
1510 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.table.html");
1511 $this->tpl->addBlockfile(
"TBL_CONTENT",
"tbl_content",
"tpl.grp_export_file_row.html");
1515 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
1517 $tbl->setTitle($this->lng->txt(
"cont_export_files"));
1518 $tbl->setHeaderNames(array(
"", $this->lng->txt(
"type"),
1519 $this->lng->txt(
"cont_file"),
1520 $this->lng->txt(
"cont_size"), $this->lng->txt(
"date") ));
1522 $cols = array(
"",
"type",
"file",
"size",
"date");
1523 $header_params = array(
"ref_id" =>
$_GET[
"ref_id"],
1524 "cmd" =>
"listExportFiles",
"cmdClass" => strtolower(get_class($this)));
1525 $tbl->setHeaderVars($cols, $header_params);
1526 $tbl->setColumnWidth(array(
"1%",
"9%",
"40%",
"25%",
"25%"));
1529 $tbl->setOrderColumn(
$_GET[
"sort_by"]);
1530 $tbl->setOrderDirection(
$_GET[
"sort_order"]);
1531 $tbl->setLimit(
$_GET[
"limit"]);
1532 $tbl->setOffset(
$_GET[
"offset"]);
1533 $tbl->setMaxCount($this->maxcount);
1534 $tbl->disable(
"sort");
1536 $this->tpl->setVariable(
"COLUMN_COUNTS", 5);
1540 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1541 $this->tpl->setVariable(
"BTN_NAME",
"confirmDeleteExportFile");
1542 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"delete"));
1543 $this->tpl->parseCurrentBlock();
1545 $this->tpl->setCurrentBlock(
"tbl_action_btn");
1546 $this->tpl->setVariable(
"BTN_NAME",
"downloadExportFile");
1547 $this->tpl->setVariable(
"BTN_VALUE", $this->lng->txt(
"download"));
1548 $this->tpl->parseCurrentBlock();
1551 $tbl->setFooter(
"tblfooter",$this->lng->txt(
"previous"),$this->lng->txt(
"next"));
1553 $tbl->setMaxCount(count($export_files));
1554 $export_files = array_slice($export_files,
$_GET[
"offset"],
$_GET[
"limit"]);
1556 foreach($export_files as $exp_file)
1558 $this->tpl->setCurrentBlock(
"tbl_content");
1559 $this->tpl->setVariable(
"TXT_FILENAME", $exp_file[
"file"]);
1562 $this->tpl->setVariable(
"CSS_ROW", $css_row);
1564 $this->tpl->setVariable(
"TXT_SIZE", $exp_file[
"size"]);
1565 $this->tpl->setVariable(
"TXT_TYPE", $exp_file[
"type"]);
1566 $this->tpl->setVariable(
"CHECKBOX_ID",$exp_file[
"file"]);
1568 $file_arr = explode(
"__", $exp_file[
"file"]);
1572 $this->tpl->parseCurrentBlock();
1574 if(!count($export_files))
1576 $tbl->disable(
'footer');
1577 $this->tpl->setCurrentBlock(
"notfound");
1578 $this->tpl->setVariable(
"TXT_OBJECT_NOT_FOUND", $this->lng->txt(
"obj_not_found"));
1579 $this->tpl->setVariable(
"NUM_COLS", 4);
1580 $this->tpl->parseCurrentBlock();
1583 $this->tpl->parseCurrentBlock();
1589 $this->tpl->setCurrentBlock(
"btn_cell");
1590 $this->tpl->setVariable(
"BTN_LINK", $this->ctrl->getLinkTarget($this,
"exportXML"));
1591 $this->tpl->setVariable(
"BTN_TXT", $this->lng->txt(
"cont_create_export_file_xml"));
1592 $this->tpl->parseCurrentBlock();
1599 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1601 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1604 $this->
object->exportXML();
1615 if (!$rbacsystem->checkAccess(
"write",$this->object->getRefId()))
1617 $this->ilErr->raiseError($this->lng->txt(
"permission_denied"),$this->ilErr->MESSAGE);
1620 if(!count($_POST[
'file']))
1626 $this->
object->deleteExportFiles($_POST[
'file']);
1637 if(!count($_POST[
'file']))
1643 if(count($_POST[
'file']) > 1)
1687 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1689 $tpl =
new ilTemplate(
'tpl.unsubscribe.html',
true,
true,
'Modules/Group');
1690 $tpl->setVariable(
'UNSUB_FORMACTION',$this->ctrl->getFormAction($this));
1691 $tpl->setVariable(
'TXT_SUBMIT',$this->lng->txt(
'grp_btn_unsubscribe'));
1692 $tpl->setVariable(
'TXT_CANCEL',$this->lng->txt(
'cancel'));
1695 $this->tpl->setContent(
$tpl->get());
1706 global $ilUser,
$tree;
1710 $this->
object->members_obj->delete($ilUser->getId());
1713 ilUtil::redirect(
'repository.php?ref_id='.$tree->getParentId($this->object->getRefId()));
1723 $user_ids = $_POST[
"id"];
1725 if (empty($user_ids[0]))
1728 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1731 foreach ($user_ids as $new_member)
1733 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1735 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1751 $user_ids = $_POST[
"user"];
1755 if (empty($user_ids[0]))
1758 #$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1764 foreach ($user_ids as $new_member)
1766 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1768 $this->ilErr->raiseError(
"An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1771 $user_obj = $this->ilias->obj_factory->getInstanceByObjId($new_member);
1774 $user_obj->addDesktopItem($this->object->getRefId(),
"grp");
1775 $mail->sendMail($user_obj->getLogin(),
"",
"",$this->lng->txtlng(
"common",
"grp_mail_subj_new_subscription",$user_obj->getLanguage()).
": ".$this->object->getTitle(),$this->lng->txtlng(
"common",
"grp_mail_body_new_subscription",$user_obj->getLanguage()),array(),array(
'system'));
1781 unset(
$_SESSION[
'grp_usr_search_result']);
1792 global $rbacreview, $ilObjDataCache;
1793 include_once(
'./Services/AccessControl/classes/class.ilObjRole.php');
1795 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.mail_members.html',
"Services/Mail");
1798 $this->tabs_gui->setTabActive(
'members');
1800 $this->tpl->setVariable(
"MAILACTION",
'ilias.php?baseClass=ilMailGUI&type=role');
1802 $this->tpl->setVariable(
"TXT_MARKED_ENTRIES",$this->lng->txt(
'marked_entries'));
1803 $this->tpl->setVariable(
"OK",$this->lng->txt(
'ok'));
1806 $role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
1807 $role_ids = $rbacreview->getRolesOfRoleFolder($role_folder[
'ref_id'],
false);
1808 $role_addrs = array();
1811 $sorted_role_ids = array();
1813 foreach($role_ids as $role_id)
1818 $sorted_role_ids[1] = $role_id;
1822 $sorted_role_ids[0] = $role_id;
1826 $sorted_role_ids[$counter++] = $role_id;
1830 ksort($sorted_role_ids,SORT_NUMERIC);
1831 foreach ((array) $sorted_role_ids as $role_id)
1833 $this->tpl->setCurrentBlock(
"mailbox_row");
1834 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1836 htmlspecialchars($role_addr)
1842 $this->tpl->setVariable(
"MAILBOX",$role_addr);
1849 $this->tpl->parseCurrentBlock();
1859 $user_ids = $_POST[
"user_id"];
1861 if (empty($user_ids[0]))
1863 $this->ilErr->raiseError($this->lng->txt(
"no_checkbox"),$this->ilErr->MESSAGE);
1868 foreach ($user_ids as $new_member)
1870 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1872 $this->
object->deleteApplicationListEntry($new_member);
1873 $mail->sendMail(
$user->getLogin(),
"",
"",
"Membership application refused: Group ".$this->object->getTitle(),
"Your application has been refused.",array(),array(
'system'));
1883 global $rbacsystem,$ilUser,$ilAccess;
1885 if ($rbacsystem->checkAccess(
'read',$this->ref_id))
1887 $force_active = ((
$_GET[
"cmd"] ==
"view" ||
$_GET[
"cmd"] ==
"")
1888 &&
$_GET[
"cmdClass"] ==
"")
1891 $tabs_gui->addTarget(
"view_content",
1892 $this->ctrl->getLinkTarget($this,
""), array(
"",
"view",
"addToDesk",
"removeFromDesk"), get_class($this),
1895 if ($rbacsystem->checkAccess(
'visible',$this->ref_id))
1897 $tabs_gui->addTarget(
"info_short",
1898 $this->ctrl->getLinkTargetByClass(
1899 array(
"ilobjgroupgui",
"ilinfoscreengui"),
"showSummary"),
1905 if ($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
1907 $tabs_gui->addTarget(
"settings",
1908 $this->ctrl->getLinkTarget($this,
"edit"), array(
"edit",
"editMapSettings"), get_class($this),
1913 if($ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
1915 $mem_cmd = $ilAccess->checkAccess(
'write',
'',$this->ref_id) ?
"members" :
"membersGallery";
1916 $tabs_gui->addTarget(
"members",$this->ctrl->getLinkTarget($this, $mem_cmd), array(),get_class($this));
1921 include_once
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
1924 $tabs_gui->addTarget(
'learning_progress',
1925 $this->ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
1927 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui'));
1930 if ($rbacsystem->checkAccess(
'write',$this->object->getRefId()))
1932 $tabs_gui->addTarget(
'export',
1933 $this->ctrl->getLinkTarget($this,
'listExportFiles'),
1934 array(
'listExportFiles',
'exportXML',
'confirmDeleteExportFile',
'downloadExportFile'),
1941 if($ilAccess->checkAccess(
'join',
'',$this->object->getRefId()) and
1942 !$this->object->members_obj->isAssigned($ilUser->getId()))
1944 $tabs_gui->addTarget(
"join",
1945 $this->ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
1949 if($ilAccess->checkAccess(
'leave',
'',$this->object->getRefId()) and
1950 $this->object->members_obj->isMember($ilUser->getId()))
1952 $tabs_gui->addTarget(
"grp_btn_unsubscribe",
1953 $this->ctrl->getLinkTarget($this,
"leave"),
1964 if(!is_array($_FILES[
'xmldoc']))
1971 include_once
'./Modules/Group/classes/class.ilObjGroup.php';
1975 $this->ctrl->setParameter($this,
"ref_id",
$ref_id);
1987 include_once
'./classes/class.ilConditionHandlerInterface.php';
1989 if(!is_object($this->chi_obj))
1991 if(
$_GET[
'item_id'])
1994 $this->ctrl->saveParameter($this,
'item_id',
$_GET[
'item_id']);
2013 $this->tpl->addBlockfile(
"ADM_CONTENT",
"adm_content",
"tpl.grp_members_export.html");
2014 $this->tpl->setCurrentBlock(
"adm_content");
2015 $this->tpl->setVariable(
"FORMACTION", $this->
getFormAction(
"export",$this->ctrl->getFormAction($this)));
2016 $this->tpl->setVariable(
"BUTTON_EXPORT", $this->lng->txt(
"export_group_members"));
2017 $this->tpl->parseCurrentBlock();
2028 $title = preg_replace(
"/\s/",
"_", $this->object->getTitle());
2029 include_once
"./classes/class.ilExcelWriterAdapter.php";
2031 $workbook = $adapter->getWorkbook();
2033 $format_bold =& $workbook->addFormat();
2034 $format_bold->setBold();
2035 $format_percent =& $workbook->addFormat();
2036 $format_percent->setNumFormat(
"0.00%");
2037 $format_datetime =& $workbook->addFormat();
2038 $format_datetime->setNumFormat(
"DD/MM/YYYY hh:mm:ss");
2039 $format_title =& $workbook->addFormat();
2040 $format_title->setBold();
2041 $format_title->setColor(
'black');
2042 $format_title->setPattern(1);
2043 $format_title->setFgColor(
'silver');
2044 $worksheet =& $workbook->addWorksheet();
2046 $profile_data = array(
"email",
"gender",
"firstname",
"lastname",
"person_title",
"institution",
2047 "department",
"street",
"zipcode",
"city",
"country",
"phone_office",
"phone_home",
"phone_mobile",
2048 "fax",
"matriculation");
2049 foreach ($profile_data as
$data)
2051 $worksheet->writeString(0, $column++, $this->
cleanString($this->lng->txt($data)), $format_title);
2053 $member_ids = $this->
object->getGroupMemberIds();
2055 foreach ($member_ids as $member_id)
2058 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2059 if ($member->getPref(
"public_email")==
"y")
2061 $worksheet->writeString($row, $column++, $this->
cleanString($member->getEmail()));
2067 $worksheet->writeString($row, $column++, $this->
cleanString($this->lng->txt(
"gender_" . $member->getGender())));
2068 $worksheet->writeString($row, $column++, $this->
cleanString($member->getFirstname()));
2069 $worksheet->writeString($row, $column++, $this->
cleanString($member->getLastname()));
2070 $worksheet->writeString($row, $column++, $this->
cleanString($member->getUTitle()));
2071 if ($member->getPref(
"public_institution")==
"y")
2073 $worksheet->writeString($row, $column++, $this->
cleanString($member->getInstitution()));
2079 if ($member->getPref(
"public_department")==
"y")
2081 $worksheet->writeString($row, $column++, $this->
cleanString($member->getDepartment()));
2087 if ($member->getPref(
"public_street")==
"y")
2089 $worksheet->writeString($row, $column++, $this->
cleanString($member->getStreet()));
2095 if ($member->getPref(
"public_zip")==
"y")
2097 $worksheet->writeString($row, $column++, $this->
cleanString($member->getZipcode()));
2103 if ($member->getPref(
"public_city")==
"y")
2105 $worksheet->writeString($row, $column++, $this->
cleanString($member->getCity()));
2111 if ($member->getPref(
"public_country")==
"y")
2113 $worksheet->writeString($row, $column++, $this->
cleanString($member->getCountry()));
2119 if ($member->getPref(
"public_phone_office")==
"y")
2121 $worksheet->writeString($row, $column++, $this->
cleanString($member->getPhoneOffice()));
2127 if ($member->getPref(
"public_phone_home")==
"y")
2129 $worksheet->writeString($row, $column++, $this->
cleanString($member->getPhoneHome()));
2135 if ($member->getPref(
"public_phone_mobile")==
"y")
2137 $worksheet->writeString($row, $column++, $this->
cleanString($member->getPhoneMobile()));
2143 if ($member->getPref(
"public_fax")==
"y")
2145 $worksheet->writeString($row, $column++, $this->
cleanString($member->getFax()));
2151 if ($member->getPref(
"public_matriculation")==
"y")
2153 $worksheet->writeString($row, $column++, $this->
cleanString($member->getMatriculation()));
2174 return str_replace(array(
"��",
"��",
"��",
"��",
"��",
"��",
"��"), array(
"ae",
"oe",
"ue",
"ss",
"Ae",
"Oe",
"Ue"), $str);
2189 $this->ctrl->setCmd(
"showSummary");
2190 $this->ctrl->setCmdClass(
"ilinfoscreengui");
2201 $this->tabs_gui->setTabActive(
'info_short');
2203 if(!$rbacsystem->checkAccess(
"visible", $this->ref_id))
2205 $this->ilias->raiseError($this->lng->txt(
"msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2208 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2211 if(strlen($this->object->getInformation()))
2213 $info->addSection($this->lng->txt(
'grp_general_informations'));
2214 $info->addProperty($this->lng->txt(
'grp_information'), nl2br(
2218 $info->enablePrivateNotes();
2219 $info->enableLearningProgress(
true);
2221 $info->addSection($this->lng->txt(
'group_registration'));
2222 $info->showLDAPRoleGroupMappingInfo();
2224 if(!$this->object->isRegistrationEnabled())
2226 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2227 $this->lng->txt(
'grp_reg_deac_info_screen'));
2232 switch($this->object->getRegistrationType())
2235 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2236 $this->lng->txt(
'grp_reg_direct_info_screen'));
2240 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2241 $this->lng->txt(
'grp_reg_req_info_screen'));
2245 $info->addProperty($this->lng->txt(
'group_registration_mode'),
2246 $this->lng->txt(
'grp_reg_passwd_info_screen'));
2256 if($this->object->isRegistrationUnlimited())
2258 $info->addProperty($this->lng->txt(
'group_registration_time'),
2259 $this->lng->txt(
'grp_registration_unlimited'));
2261 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2263 $info->addProperty($this->lng->txt(
"group_registration_time"),
2264 $this->lng->txt(
'cal_until').
' '.
2267 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2269 $info->addProperty($this->lng->txt(
"group_registration_time"),
2270 $this->lng->txt(
'cal_from').
' '.
2273 if ($this->object->isMembershipLimited())
2275 $info->addProperty($this->lng->txt(
"mem_free_places"),
2276 max(0,$this->object->getMaxMembers() - $this->
object->members_obj->getCountMembers()));
2283 $this->ctrl->forwardCommand($info);
2293 if ($ilAccess->checkAccess(
"read",
"", $a_target))
2295 $_GET[
"cmd"] =
"frameset";
2296 $_GET[
"ref_id"] = $a_target;
2297 include(
"repository.php");
2303 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
2305 $_GET[
"cmd"] =
"infoScreen";
2306 $_GET[
"ref_id"] = $a_target;
2307 include(
"repository.php");
2312 if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
2314 $_GET[
"cmd"] =
"frameset";
2315 $_GET[
"target"] =
"";
2316 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
2319 include(
"repository.php");
2324 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
2339 if(is_object($this->form))
2344 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2347 $this->form->setTableWidth(
'60%');
2348 $this->form->setFormAction($this->ctrl->getFormAction($this));
2352 $title->setValue($this->object->getTitle());
2354 $title->setMaxLength(128);
2355 $title->setRequired(
true);
2356 $this->form->addItem(
$title);
2360 $desc->
setValue($this->object->getLongDescription());
2363 $this->form->addItem($desc);
2368 if($a_mode ==
'edit')
2370 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() : $this->
object->readGroupStatus());
2374 $type = ($this->
object->getGroupType() ? $this->
object->getGroupType() :
GRP_TYPE_PUBLIC);
2378 $grp_type->setRequired(
true);
2381 #$opt_open = new ilRadioOption($this->lng->txt('grp_open'),GRP_TYPE_OPEN,$this->lng->txt('grp_open_info'));
2382 #$grp_type->addOption($opt_open);
2387 $grp_type->addOption($opt_public);
2391 $reg_type->setValue($this->object->getRegistrationType());
2394 $reg_type->addOption($opt_dir);
2398 $pass->
setInfo($this->lng->txt(
'grp_reg_password_info'));
2399 $pass->
setValue($this->object->getPassword());
2401 $pass->setMaxLength(32);
2403 $reg_type->addOption($opt_pass);
2404 $opt_public->addSubItem($reg_type);
2407 $reg_type->addOption($opt_req);
2410 $reg_type->addOption($opt_deact);
2414 $grp_type->addOption($opt_closed);
2415 if($a_mode ==
'update_group_type')
2417 $grp_type->setAlert($this->lng->txt(
'grp_type_changed_info'));
2419 $this->form->addItem($grp_type);
2422 $time_limit =
new ilCheckboxInputGUI($this->lng->txt(
'grp_reg_limited'),
'reg_limit_time');
2423 $time_limit->
setOptionTitle($this->lng->txt(
'grp_reg_limit_time'));
2424 $time_limit->setChecked($this->object->isRegistrationUnlimited() ?
false :
true);
2426 $start =
new ilDateTimeInputGUI($this->lng->txt(
'grp_reg_start'),
'registration_start');
2428 $start->setDate($this->object->getRegistrationStart());
2429 $time_limit->addSubItem($start);
2433 $end->setDate($this->object->getRegistrationEnd());
2435 $time_limit->addSubItem($end);
2437 $this->form->addItem($time_limit);
2440 $lim =
new ilCheckboxInputGUI($this->lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
2442 $lim->setOptionTitle($this->lng->txt(
'reg_grp_max_members'));
2443 $lim->setChecked($this->object->isMembershipLimited());
2447 $max->setValue($this->object->getMaxMembers() ? $this->
object->getMaxMembers() :
'');
2448 $max->setTitle($this->lng->txt(
'members').
':');
2450 $max->setMaxLength(4);
2451 $max->setInfo($this->lng->txt(
'grp_reg_max_members_info'));
2452 $lim->addSubItem($max);
2456 $wait->setOptionTitle($this->lng->txt(
'grp_waiting_list'));
2457 $wait->setInfo($this->lng->txt(
'grp_waiting_list_info'));
2458 $wait->setChecked($this->object->isWaitingListEnabled() ?
true :
false);
2459 $lim->addSubItem($wait);
2460 $this->form->addItem($lim);
2465 $this->form->setTitle($this->lng->txt(
'grp_new'));
2468 $this->form->addCommandButton(
'save',$this->lng->txt(
'grp_new'));
2469 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2473 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2476 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
2477 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2480 case 'update_group_type':
2481 $this->form->setTitle($this->lng->txt(
'grp_edit'));
2484 $this->form->addCommandButton(
'updateGroupType',$this->lng->txt(
'grp_change_type'));
2485 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
2504 $this->
object->enableUnlimitedRegistration((
bool) !$_POST[
'reg_limit_time']);
2505 $this->
object->setRegistrationStart($this->
loadDate(
'registration_start'));
2506 $this->
object->setRegistrationEnd($this->
loadDate(
'registration_end'));
2507 $this->
object->enableMembershipLimitation((
bool) $_POST[
'registration_membership_limited']);
2508 $this->
object->setMaxMembers((
int) $_POST[
'registration_max_members']);
2509 $this->
object->enableWaitingList((
bool) $_POST[
'waiting_list']);
2525 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
2527 $dt[
'year'] = (int) $_POST[$a_field][
'date'][
'y'];
2528 $dt[
'mon'] = (int) $_POST[$a_field][
'date'][
'm'];
2529 $dt[
'mday'] = (int) $_POST[$a_field][
'date'][
'd'];
2530 $dt[
'hours'] = (int) $_POST[$a_field][
'time'][
'h'];
2531 $dt[
'minutes'] = (int) $_POST[$a_field][
'time'][
'm'];
2532 $dt[
'seconds'] = (int) $_POST[$a_field][
'time'][
's'];
2547 global $rbacsystem,$ilUser,$ilAccess;
2553 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
2555 $this->tabs_gui->addSubTabTarget(
"grp_edit_members",
2556 $this->ctrl->getLinkTarget($this,
'members'),
2561 $this->tabs_gui->addSubTabTarget(
"grp_members_gallery",
2562 $this->ctrl->getLinkTarget($this,
'membersGallery'),
2563 "membersGallery", get_class($this));
2566 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2568 $this->object->getEnableGroupMap())
2570 $this->tabs_gui->addSubTabTarget(
"grp_members_map",
2571 $this->ctrl->getLinkTarget($this,
'membersMap'),
2572 "membersMap", get_class($this));
2575 $this->tabs_gui->addSubTabTarget(
"mail_members",
2576 $this->ctrl->getLinkTarget($this,
'mailMembers'),
2577 "mailMembers", get_class($this));
2582 $this->tabs_gui->addSubTabTarget(
"activation",
2583 $this->ctrl->getLinkTargetByClass(
'ilCourseItemAdministrationGUI',
'edit'),
2584 "edit", get_class($this));
2585 $this->ctrl->setParameterByClass(
'ilconditionhandlerinterface',
'item_id',(
int)
$_GET[
'item_id']);
2586 $this->tabs_gui->addSubTabTarget(
"preconditions",
2587 $this->ctrl->getLinkTargetByClass(
'ilConditionHandlerInterface',
'listConditions'),
2588 "",
"ilConditionHandlerInterface");
2592 $this->tabs_gui->addSubTabTarget(
"grp_settings",
2593 $this->ctrl->getLinkTarget($this,
'edit'),
2594 "edit", get_class($this));
2596 $this->tabs_gui->addSubTabTarget(
"grp_info_settings",
2597 $this->ctrl->getLinkTarget($this,
'editInfo'),
2598 "editInfo", get_class($this));
2601 if ($this->ilias->getSetting(
"custom_icons"))
2603 $this->tabs_gui->addSubTabTarget(
"grp_icon_settings",
2604 $this->ctrl->getLinkTarget($this,
'editGroupIcons'),
2605 "editGroupIcons", get_class($this));
2609 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
2612 $this->tabs_gui->addSubTabTarget(
"grp_map_settings",
2613 $this->ctrl->getLinkTarget($this,
'editMapSettings'),
2614 "editMapSettings", get_class($this));
2617 $this->tabs_gui->addSubTabTarget(
'groupings',
2618 $this->ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),