19 declare(strict_types=1);
57 public function __construct($a_data,
int $a_id,
bool $a_call_by_reference,
bool $a_prepare_output =
false)
64 $this->
lng->loadLanguageModule(
'grp');
65 $this->
lng->loadLanguageModule(
'obj');
66 $this->
http = $DIC->http();
68 $this->rbacsystem = $DIC->rbac()->system();
69 $this->news = $DIC->news();
74 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
75 return $this->
http->wrapper()->query()->retrieve(
90 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
94 $next_class = $this->
ctrl->getNextClass($this);
95 $cmd = $this->
ctrl->getCmd();
100 $ilNavigationHistory->addItem(
102 ilLink::_getLink(
$ref_id,
"grp"),
108 if ($next_class ==
"" && $cmd ==
"" && $this->
object->isNewsTimelineLandingPageEffective()
110 $this->
ctrl->redirectByClass(
"ilnewstimelinegui");
113 $header_action =
true;
114 switch ($next_class) {
115 case strtolower(ilRepositoryTrashGUI::class):
116 $ru = new \ilRepositoryTrashGUI($this);
117 $this->
ctrl->setReturn($this,
'trash');
118 $this->
ctrl->forwardCommand($ru);
121 case 'illtiproviderobjectsettinggui':
123 $this->tabs_gui->activateTab(
'settings');
124 $this->tabs_gui->activateSubTab(
'lti_provider');
127 $lti_gui->offerLTIRolesForSelection(
false);
128 $this->
ctrl->forwardCommand($lti_gui);
132 case 'ilgroupmembershipgui':
134 $this->tabs_gui->activateTab(
'members');
137 $this->
ctrl->forwardCommand($mem_gui);
141 case 'ilgroupregistrationgui':
142 $this->
ctrl->setReturn($this,
'');
143 $this->tabs_gui->setTabActive(
'join');
145 $this->
ctrl->forwardCommand($registration);
148 case 'ilpermissiongui':
149 $this->tabs_gui->activateTab(
'perm_settings');
151 $this->
ctrl->forwardCommand($perm_gui);
154 case "ilinfoscreengui":
158 case "illearningprogressgui":
160 if ($this->
http->wrapper()->query()->has(
'user_id')) {
168 $this->
object->getRefId(),
171 $this->
ctrl->forwardCommand($new_gui);
172 $this->tabs_gui->setTabActive(
'learning_progress');
175 case 'ilobjcoursegroupinggui':
177 $this->
ctrl->setReturn($this,
'edit');
179 if ($this->
http->wrapper()->query()->has(
'obj_id')) {
180 $obj_id = $this->
http->wrapper()->query()->retrieve(
186 $this->
ctrl->forwardCommand($crs_grp_gui);
187 $this->tabs_gui->setTabActive(
'settings');
188 $this->tabs_gui->setSubTabActive(
'groupings');
191 case 'ilcoursecontentgui':
193 $this->
ctrl->forwardCommand($course_content_obj);
196 case 'ilpublicuserprofilegui':
198 $this->tabs_gui->setTabActive(
'group_members');
199 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
201 if ($this->
http->wrapper()->query()->has(
'user')) {
202 $usr_id = $this->
http->wrapper()->query()->retrieve(
209 if ($this->
http->wrapper()->query()->has(
'back_url')) {
210 $back_url = $this->
http->wrapper()->query()->retrieve(
212 $this->
refinery->kindlyTo()->string()
215 if ($back_url ==
'') {
216 $profile_gui->setBackUrl($this->
ctrl->getLinkTargetByClass([
"ilGroupMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
218 $html = $this->
ctrl->forwardCommand($profile_gui);
219 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
223 $this->tabs_gui->setTabActive(
'none');
225 $this->tpl->setVariable(
226 "LOCATION_CONTENT_STYLESHEET",
233 case "ilcontainerpagegui":
236 $this->tpl->setContent($ret);
238 $header_action =
false;
241 case 'ilobjectcopygui':
244 $this->
ctrl->forwardCommand($cp);
247 case "ilobjectcontentstylesettingsgui":
253 $settings_gui = $DIC->contentStyle()->gui()
254 ->objectSettingsGUIForRefId(
258 $this->
ctrl->forwardCommand($settings_gui);
261 case 'ilobjectcustomuserfieldsgui':
264 $this->tabs_gui->setTabActive(
'settings');
265 $this->tabs_gui->activateSubTab(
'grp_custom_user_fields');
266 $this->
ctrl->forwardCommand($cdf_gui);
269 case 'ilmemberagreementgui':
270 $this->
ctrl->setReturn($this,
'');
271 $this->tabs_gui->setTabActive(
'view_content');
273 $this->
ctrl->forwardCommand($agreement);
277 $this->tabs_gui->setTabActive(
'export');
279 $exp->addFormat(
'xml');
280 $this->
ctrl->forwardCommand($exp);
283 case "ilcommonactiondispatchergui":
288 case 'ilobjectservicesettingsgui':
289 $this->
ctrl->setReturn($this,
'edit');
291 $this->tabs_gui->activateTab(
'settings');
292 $this->tabs_gui->activateSubTab(
'tool_settings');
304 case 'ilmailmembersearchgui':
307 if (!($this->
access->checkAccess(
'manage_members',
'', $this->object->getRefId()) ||
309 $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
310 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
313 $this->tabs_gui->setTabActive(
'members');
318 $this->
ctrl->forwardCommand($mail_search);
321 case 'ilbadgemanagementgui':
322 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
324 $this->
ctrl->forwardCommand($bgui);
327 case "ilcontainernewssettingsgui":
329 $this->tabs_gui->setTabActive(
'settings');
330 $this->tabs_gui->activateSubTab(
'obj_news_settings');
332 $news_set_gui->setTimeline(
true);
333 $news_set_gui->setCronNotifications(
true);
334 $news_set_gui->setHideByDate(
true);
335 $this->
ctrl->forwardCommand($news_set_gui);
338 case "ilnewstimelinegui":
340 $this->tabs_gui->setTabActive(
'news_timeline');
342 $t->setUserEditAll($this->
access->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
344 $this->
ctrl->forwardCommand($t);
346 $this->
user->getId(),
347 $this->
object->getId(),
348 $this->
object->getRefId(),
353 case "ilcontainerskillgui":
354 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
359 case 'ilcalendarpresentationgui':
361 $this->
ctrl->forwardCommand($cal);
364 case 'ilobjectmetadatagui':
365 if (!$this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
366 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
368 $this->tabs_gui->activateTab(
'meta_data');
373 case 'ilobjecttranslationgui':
376 $this->
tabs->activateTab(
"settings");
378 $this->
ctrl->forwardCommand($transgui);
385 !$this->
access->checkAccess(
'visible',
'', $this->object->getRefId(),
'grp') and
386 !$this->
access->checkAccess(
'read',
'', $this->object->getRefId(),
'grp')) {
387 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
391 if ($cmd ==
'infoScreenGoto') {
392 if ($this->
object->isRegistrationEnabled()) {
401 && !$this->rbacsystem->checkAccess(
'read', $this->object->getRefId()) && $cmd !=
'infoScreen')
403 || $cmd ===
'leaveWaitList') {
405 if (!$this->rbacsystem->checkAccess(
'join', $this->object->getRefId())) {
406 $this->
ctrl->redirect($this,
"infoScreen");
408 $this->
ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
419 if ($header_action) {
427 $this->
ctrl->redirect($this,
"");
433 $this->
ctrl->redirect($this,
"");
442 $this->
user->getId(),
443 $this->
object->getId(),
444 $this->
object->getRefId(),
449 parent::renderObject();
455 $this->
ctrl->redirectByClass(ilMemberAgreementGUI::class);
458 $this->tabs_gui->setTabActive(
'view_content');
464 $this->
tabs->activateTab(
"view_content");
465 parent::renderObject();
474 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(),
'crs')) {
478 'ilcoursecontentgui',
495 $new_object->setRegistrationType(
503 $this->tree->checkForParentType($new_object->
getRefId(),
'crs',
true) ||
504 $this->tree->checkForParentType($new_object->
getRefId(),
'grp',
true)
518 $members_obj->updateNotification($this->
user->getId(), (bool) $this->
settings->get(
'mail_grp_admin_notification',
'1'));
519 $members_obj->updateContact($this->
user->getId(),
true);
521 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
523 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
524 $this->
ctrl->redirect($this,
'edit');
536 $this->tabs_gui->setTabActive(
'settings');
537 $this->tabs_gui->setSubTabActive(
'general');
542 $this->tpl->setVariable(
'ADM_CONTENT', $a_form->getHTML());
548 $this->
object->getRefId(),
549 (
int) $_REQUEST[
'grp_type']
552 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
553 $this->
ctrl->redirect($this,
'edit');
570 if ($new_type_info) {
572 $new_type = (
int) $new_type[1];
574 $modified = ($new_type !== $old_type);
583 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_tile_and_session_limit_not_supported'));
590 $this->
object->setGroupType((
int)
$form->
getInput(
'grp_type'));
591 $this->
object->setRegistrationType((
int)
$form->
getInput(
'registration_type'));
593 $this->
object->enableUnlimitedRegistration(!
$form->
getInput(
'reg_limit_time'));
594 $this->
object->enableMembershipLimitation((
bool)
$form->
getInput(
'registration_membership_limited'));
595 $this->
object->setMinMembers((
int)
$form->
getInput(
'registration_min_members'));
596 $this->
object->setMaxMembers((
int)
$form->
getInput(
'registration_max_members'));
597 $this->
object->enableRegistrationAccessCode((
bool)
$form->
getInput(
'reg_code_enabled'));
598 $this->
object->setRegistrationAccessCode(
$form->
getInput(
'reg_code'));
599 $this->
object->setViewMode((
int)
$form->
getInput(
'view_mode'));
600 $this->
object->setMailToMembersType((
int)
$form->
getInput(
'mail_type'));
601 $this->
object->setShowMembers((
bool)
$form->
getInput(
'show_members'));
602 $this->
object->setAutoNotification((
bool)
$form->
getInput(
'auto_notification'));
605 $this->
object->enableSessionLimit((
bool)
$form->
getInput(
'sl'));
607 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
609 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
613 $this->
object->setPeriod(
614 $grp_period->getStart(),
615 $grp_period->getEnd()
620 $this->
object->enableUnlimitedRegistration(
false);
622 $this->
object->enableUnlimitedRegistration(
true);
625 $this->
object->setRegistrationStart($reg->getStart());
626 $this->
object->setRegistrationEnd($reg->getEnd());
629 $this->
object->setCancellationEnd($cancel_end->getDate());
632 if ($this->
http->wrapper()->post()->has(
'waiting_list')) {
633 $waiting_list = $this->
http->wrapper()->post()->retrieve(
638 switch ($waiting_list) {
640 $this->
object->enableWaitingList(
true);
641 $this->
object->setWaitingListAutoFill(
true);
645 $this->
object->enableWaitingList(
true);
646 $this->
object->setWaitingListAutoFill(
false);
650 $this->
object->enableWaitingList(
false);
651 $this->
object->setWaitingListAutoFill(
false);
654 $this->
object->handleAutoFill();
657 $property_online = $this->
object->getObjectProperties()->getPropertyIsOnline();
659 $property_online->withOnline() :
660 $property_online->withOffline();
661 $this->
object->getObjectProperties()->storePropertyIsOnline($online);
664 $this->
object->update();
667 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
670 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
673 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
676 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
693 $this->
user->getId(),
700 $ecs->handleSettingsUpdate(
$form);
702 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
711 if ($new_type == 0) {
712 $new_type_txt =
$GLOBALS[
'DIC'][
'lng']->txt(
'il_grp_status_open');
715 $new_type_txt = $dtpl->getPresentationTitle(
$GLOBALS[
'DIC'][
'lng']->getLangKey());
720 $confirm->setHeaderText($this->
lng->txt(
'grp_warn_grp_type_changed'));
721 $confirm->setFormAction($this->
ctrl->getFormAction($this));
725 $this->
lng->txt(
'grp_info_new_grp_type') .
': ' . $new_type_txt
727 $confirm->setConfirm($this->
lng->txt(
'grp_change_type'),
'updateGroupType');
728 $confirm->setCancel($this->
lng->txt(
'cancel'),
'edit');
730 $this->tpl->setContent($confirm->getHTML());
732 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
733 $this->
ctrl->redirect($this,
'edit');
749 if ($this->news->isGloballyActivated()) {
762 $this->tabs_gui->setTabActive(
'settings');
763 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
766 !$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
770 $latitude = $this->
object->getLatitude();
771 $longitude = $this->
object->getLongitude();
772 $zoom = $this->
object->getLocationZoom();
775 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
777 $latitude = $def[
"latitude"];
778 $longitude = $def[
"longitude"];
779 $zoom = $def[
"zoom"];
790 $this->
lng->txt(
"grp_enable_map"),
793 $public->setValue(
"1");
794 $public->setChecked($this->
object->getEnableGroupMap());
799 $this->
lng->txt(
"grp_map_location"),
803 $loc_prop->setLongitude((
float) $longitude);
804 $loc_prop->setZoom((
int) $zoom);
809 $this->tpl->setVariable(
"ADM_CONTENT",
$form->
getHTML());
818 if ($this->
http->wrapper()->post()->has(
'location')) {
819 $custom_transformer = $this->
refinery->custom()->transformation(
830 if ($this->
http->wrapper()->post()->has(
'enable_map')) {
831 $enable_map = $this->
http->wrapper()->post()->retrieve(
837 $this->
object->setLatitude((
string)
$location[
'latitude']);
838 $this->
object->setLongitude((
string) $location[
'longitude']);
839 $this->
object->setLocationZoom((
int) $location[
'zoom']);
840 $this->
object->setEnableGroupMap($enable_map);
841 $this->
object->update();
842 $this->
ctrl->redirect($this,
"editMapSettings");
852 $this->tabs_gui->setTabActive(
'settings');
853 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
868 $area->
setInfo($this->
lng->txt(
'grp_information_info'));
869 $area->setValue($this->
object->getInformation());
882 if ($this->
http->wrapper()->post()->has(
'important')) {
883 $important = $this->
http->wrapper()->post()->retrieve(
885 $this->
refinery->kindlyTo()->string()
888 $this->
object->setInformation($important);
889 $this->
object->update();
890 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
894 public function readMemberData(array $ids, array $selected_columns = null): array
898 $this->show_tracking =
903 $completed = $in_progress = $failed = [];
904 if ($this->show_tracking) {
906 $this->show_tracking = $olp->isActive();
909 if ($this->show_tracking) {
915 if ($privacy->enabledGroupAccessTimes()) {
919 $do_prtf = (is_array($selected_columns) &&
920 in_array(
'prtf', $selected_columns) &&
925 $this->
ctrl->getLinkTarget($this,
"members")
936 foreach ($ids as $usr_id) {
937 $tmp_data[
'notification'] = (bool) $this->
object->members_obj->isNotificationEnabled((
int) $usr_id) ? 1 : 0;
938 $tmp_data[
'contact'] = (bool) $this->
object->members_obj->isContact((
int) $usr_id) ? 1 : 0;
940 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
941 $tmp_data[$field] = $value;
944 if ($this->show_tracking) {
945 $tmp_data[
'progress'] =
'';
946 if (in_array($usr_id, $completed)) {
948 } elseif (in_array($usr_id, $in_progress)) {
950 } elseif (in_array($usr_id, $failed)) {
957 if ($privacy->enabledGroupAccessTimes()) {
958 if (isset($progress[$usr_id][
'ts']) && ($progress[$usr_id][
'ts'] ??
false)) {
962 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
964 $tmp_data[
'access_time'] = $this->
lng->txt(
'no_date');
965 $tmp_data[
'access_time_unix'] = 0;
968 $tmp_data[
'prtf'] = [];
970 $tmp_data[
'prtf'] = ($all_prtf[$usr_id] ?? []);
972 $members[$usr_id] = $tmp_data;
982 if ($part->isLastAdmin($this->user->getId())) {
983 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'grp_err_administrator_required'));
988 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
991 $cgui->setHeaderText($this->
lng->txt(
'grp_dismiss_myself'));
992 $cgui->setFormAction($this->
ctrl->getFormAction($this));
993 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancel");
994 $cgui->setConfirm($this->
lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
995 $this->tpl->setContent($cgui->getHTML());
1001 $this->
object->members_obj->delete($this->
user->getId());
1002 $this->
object->members_obj->sendNotification(
1004 $this->
user->getId()
1006 $this->
object->members_obj->sendNotification(
1008 $this->
user->getId()
1011 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'grp_msg_membership_annulled'),
true);
1012 $this->
ctrl->setParameterByClass(
1015 $this->tree->getParentId($this->object->getRefId())
1017 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
1022 $this->tabs_gui->addTab(
1024 $this->
lng->txt(
"content"),
1025 $this->
ctrl->getLinkTarget($this,
"view")
1036 $ilHelp = $DIC[
'ilHelp'];
1037 $ilHelp->setScreenIdComponent(
"grp");
1039 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
1040 if ($this->
object->isNewsTimelineEffective()) {
1041 if (!$this->
object->isNewsTimelineLandingPageEffective()) {
1044 $this->tabs_gui->addTab(
1046 $this->
lng->txt(
"cont_news_timeline_tab"),
1047 $this->
ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
1049 if ($this->
object->isNewsTimelineLandingPageEffective()) {
1057 $this->
access->checkAccess(
'visible',
'', $this->ref_id) ||
1058 $this->
access->checkAccess(
'join',
'', $this->ref_id) ||
1059 $this->
access->checkAccess(
'read',
'', $this->ref_id)
1061 $this->tabs_gui->addTarget(
1063 $this->
ctrl->getLinkTargetByClass(
1064 array(
"ilobjgroupgui",
"ilinfoscreengui"),
1075 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1076 $this->tabs_gui->addTarget(
1078 $this->
ctrl->getLinkTarget($this,
"edit"),
1079 array(
"edit",
"editMapSettings"),
1089 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1093 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1095 $this->tabs_gui->addTarget(
1096 "obj_tool_setting_badges",
1097 $this->
ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
1099 "ilbadgemanagementgui" 1110 $this->tabs_gui->addTarget(
1111 "obj_tool_setting_skills",
1112 $this->
ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
1114 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
1120 $this->tabs_gui->addTarget(
1121 'learning_progress',
1122 $this->
ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
1124 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
1129 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1131 $tab_link = $md_gui->getTab();
1132 if ($tab_link !== null) {
1133 $this->tabs_gui->addTab(
1135 $this->
lng->txt(
'meta_data'),
1143 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1144 $this->tabs_gui->addTarget(
1146 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
1155 if ($this->
access->checkAccess(
'join',
'', $this->object->getRefId()) and
1156 !$this->
object->members_obj->isAssigned($this->user->getId())) {
1158 $this->tabs_gui->addTab(
1160 $this->
lng->txt(
'membership_leave'),
1161 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
1164 $this->tabs_gui->addTarget(
1166 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
1172 if ($this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) and
1173 $this->
object->members_obj->isMember($this->user->getId())) {
1174 $this->tabs_gui->addTarget(
1175 "grp_btn_unsubscribe",
1176 $this->
ctrl->getLinkTarget($this,
"leave"),
1185 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
1190 $this->tabs_gui->setTabActive(
'info_short');
1198 if (strlen($this->
object->getInformation())) {
1199 $info->addSection($this->
lng->txt(
'grp_general_informations'));
1200 $info->addProperty($this->
lng->txt(
'grp_information'), nl2br(
1205 $info->enablePrivateNotes();
1206 $info->enableLearningProgress(
true);
1210 $record_gui->parse();
1213 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1218 $contacts =
$parts->getContacts();
1219 if (count($contacts) > 0) {
1220 $info->addSection($this->
lng->txt(
"grp_mem_contacts"));
1221 foreach ($contacts as
$c) {
1223 $pgui->setBackUrl($this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
1224 $pgui->setEmbedded(
true);
1225 $info->addProperty(
"", $pgui->getHTML());
1230 $info->addSection($this->
lng->txt(
'group_registration'));
1231 $info->showLDAPRoleGroupMappingInfo();
1233 if (!$this->
object->isRegistrationEnabled()) {
1235 $this->
lng->txt(
'group_registration_mode'),
1236 $this->
lng->txt(
'grp_reg_deac_info_screen')
1239 switch ($this->
object->getRegistrationType()) {
1242 $this->
lng->txt(
'group_registration_mode'),
1243 $this->
lng->txt(
'grp_reg_direct_info_screen')
1249 $this->
lng->txt(
'group_registration_mode'),
1250 $this->
lng->txt(
'grp_reg_req_info_screen')
1256 $this->
lng->txt(
'group_registration_mode'),
1257 $this->
lng->txt(
'grp_reg_passwd_info_screen')
1267 if ($this->
object->isRegistrationUnlimited()) {
1269 $this->
lng->txt(
'group_registration_time'),
1270 $this->
lng->txt(
'grp_registration_unlimited')
1272 } elseif ($this->
object->getRegistrationStart()->getUnixTime() < time()) {
1274 $this->
lng->txt(
"group_registration_time"),
1275 $this->
lng->txt(
'cal_until') .
' ' .
1278 } elseif ($this->
object->getRegistrationStart()->getUnixTime() >= time()) {
1280 $this->
lng->txt(
"group_registration_time"),
1281 $this->
lng->txt(
'cal_from') .
' ' .
1285 if ($this->
object->isMembershipLimited()) {
1286 if ($this->
object->getMinMembers()) {
1288 $this->
lng->txt(
"mem_min_users"),
1289 (string) $this->
object->getMinMembers()
1292 if ($this->
object->getMaxMembers()) {
1296 $this->
lng->txt(
'mem_free_places'),
1297 (string) ($reg_info[
'reg_info_free_places'] ??
'0')
1302 if ($this->
object->getCancellationEnd()) {
1304 $this->
lng->txt(
'grp_cancellation_end'),
1311 !$this->
object->getStart()->isNull()
1314 $this->
lng->txt(
'grp_period'),
1316 $this->
object->getStart(),
1317 $this->
object->getEnd()
1328 $this->
lng->loadLanguageModule(
'ps');
1329 $info->addSection($this->
lng->txt(
'grp_user_agreement_info'));
1330 $info->addProperty($this->
lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
1333 $info->addProperty($this->
lng->txt(
'ps_grp_user_fields'), $fields);
1339 $this->
ctrl->forwardCommand($info);
1346 $grp_notification =
false;
1347 if ($this->
http->wrapper()->query()->has(
'grp_ntf')) {
1348 $grp_notification = $this->
http->wrapper()->query()->retrieve(
1350 $this->
refinery->kindlyTo()->bool()
1354 if ($noti->canCurrentUserEdit()) {
1355 if ($grp_notification) {
1356 $noti->activateUser();
1358 $noti->deactivateUser();
1361 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1362 $this->
ctrl->redirect($this,
"");
1367 $this->
ctrl->redirectByClass(
'ilgroupmembershipgui');
1371 public static function _goto(
string $a_target,
string $a_add =
""): void
1374 $main_tpl = $DIC->ui()->mainTemplate();
1375 $a_target = (
int) $a_target;
1377 $ilUser = $DIC->user();
1378 $ilAccess = $DIC->access();
1379 $lng = $DIC->language();
1381 $http = $DIC->http();
1382 $refinery = $DIC->refinery();
1385 if ($http->
wrapper()->query()->has(
'target')) {
1386 $target = $http->
wrapper()->query()->retrieve(
1391 if (substr($a_add, 0, 5) ==
'rcode') {
1395 "login.php?target=" . $target .
"&cmd=force_login&lang=" .
1396 $ilUser->getCurrentLanguage()
1408 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
1416 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1420 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1424 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1425 $lng->
txt(
"msg_no_perm_read_item"),
1441 if (!$a_omit_form_action) {
1455 $this->initFormTitleDescription(
$form);
1459 if ($a_mode ==
'edit') {
1462 $this->
lng->loadLanguageModule(
'mem');
1463 $cdur->enableToggleFullTime(
1464 $this->
lng->txt(
'mem_period_without_time'),
1465 !$this->
object->getStartTimeIndication()
1467 $cdur->setShowTime(
true);
1468 $cdur->setInfo($this->
lng->txt(
'grp_period_info'));
1469 $cdur->setStart($this->
object->getStart());
1470 $cdur->setEnd($this->
object->getEnd());
1474 $this->
lng->loadLanguageModule(
'rep');
1477 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
1481 $online->setChecked(!$this->
object->getOfflineStatus());
1482 $online->setInfo($this->
lng->txt(
'grp_activation_online_info'));
1488 $pres->setTitle($this->
lng->txt(
'grp_setting_header_registration'));
1493 $reg_type->
setValue((
string) $this->
object->getRegistrationType());
1496 $this->
lng->txt(
'grp_reg_direct'),
1498 );#$this->
lng->txt(
'grp_reg_direct_info'));
1499 $reg_type->addOption($opt_dir);
1502 $this->
lng->txt(
'grp_pass_request'),
1506 $pass->setRequired(
true);
1507 $pass->setInfo($this->
lng->txt(
'grp_reg_password_info'));
1508 $pass->setValue($this->
object->getPassword());
1510 $pass->setMaxLength(32);
1511 $opt_pass->addSubItem($pass);
1512 $reg_type->addOption($opt_pass);
1515 $reg_type->addOption($opt_req);
1518 $reg_type->addOption($opt_deact);
1522 $reg_code->setChecked($this->
object->isRegistrationAccessCodeEnabled());
1523 $reg_code->setValue(
'1');
1524 $reg_code->setInfo($this->
lng->txt(
'grp_reg_code_enabled_info'));
1528 if (!$this->
object->getRegistrationAccessCode()) {
1532 $reg_link->setValue($this->
object->getRegistrationAccessCode());
1536 $val = ilLink::_getLink($this->
object->getRefId(), $this->
object->getType(), array(),
'rcode' . $this->
object->getRegistrationAccessCode());
1537 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1538 $reg_code->addSubItem($link);
1542 $this->
lng->loadLanguageModule(
'dateplaner');
1544 $dur->setShowTime(
true);
1545 $dur->setStart($this->
object->getRegistrationStart());
1546 $dur->setEnd($this->
object->getRegistrationEnd());
1551 $cancel->
setInfo($this->
lng->txt(
'grp_cancellation_end_info'));
1552 $cancel->setDate($this->
object->getCancellationEnd());
1556 $lim =
new ilCheckboxInputGUI($this->
lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
1557 $lim->setValue(
'1');
1559 $lim->setChecked($this->
object->isMembershipLimited());
1561 $min =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_min_members'),
'registration_min_members');
1563 $min->setMaxLength(4);
1564 $min->setValue($this->
object->getMinMembers() ?:
'');
1565 $min->setInfo($this->
lng->txt(
'grp_subscription_min_members_info'));
1566 $lim->addSubItem($min);
1568 $max =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_max_members'),
'registration_max_members');
1569 $max->setValue($this->
object->getMaxMembers() ?:
'');
1572 $max->setMaxLength(4);
1573 $max->setInfo($this->
lng->txt(
'grp_reg_max_members_info'));
1574 $lim->addSubItem($max);
1589 $wait->addOption($option);
1591 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_no_autofill'),
'1');
1592 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_info'));
1593 $wait->addOption($option);
1595 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_autofill'),
'2');
1596 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_autofill_info'));
1597 $wait->addOption($option);
1599 if ($this->
object->hasWaitingListAutoFill()) {
1600 $wait->setValue(
'2');
1601 } elseif ($this->
object->isWaitingListEnabled()) {
1602 $wait->setValue(
'1');
1604 $wait->setValue(
'0');
1607 $lim->addSubItem($wait);
1613 $parent_membership_ref_id = 0;
1614 $hasParentMembership =
1616 $parent_membership_ref_id = $this->tree->checkForParentType($this->
object->getRefId(),
'crs',
true)
1620 $pres->setTitle($this->
lng->txt(
'grp_setting_header_presentation'));
1624 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1627 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1630 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1633 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1641 if ($hasParentMembership) {
1643 $course_view_mode =
'';
1644 switch ($parent_view_mode) {
1646 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_sessions');
1650 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_simple');
1654 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_by_type');
1657 if ($course_view_mode) {
1659 $opt->setInfo($this->
lng->txt(
'grp_view_inherit_info'));
1660 $view_type->addOption($opt);
1671 $opt->setInfo($this->
lng->txt(
'cntr_view_info_sessions'));
1672 $view_type->addOption($opt);
1675 $this->
lng->loadLanguageModule(
'crs');
1677 $sess->setValue(
'1');
1678 $sess->setChecked($this->
object->isSessionLimitEnabled());
1679 $sess->setInfo($this->
lng->txt(
'sess_limit_info'));
1682 $prev->setMinValue(0);
1683 $prev->setValue((
string) (
1684 $this->
object->getNumberOfPreviousSessions() == -1 ?
1686 $this->
object->getNumberOfPreviousSessions()
1689 $prev->setMaxLength(3);
1690 $sess->addSubItem($prev);
1693 $next->setMinValue(0);
1694 $next->setValue((
string) (
1695 $this->
object->getNumberOfNextSessions() == -1 ?
1697 $this->
object->getNumberOfNextSessions()
1700 $next->setMaxLength(3);
1701 $sess->addSubItem($next);
1702 $opt->addSubItem($sess);
1705 $opt->setInfo($this->
lng->txt(
'grp_view_info_simple'));
1706 $view_type->addOption($opt);
1709 $opt->setInfo($this->
lng->txt(
'grp_view_info_by_type'));
1710 $view_type->addOption($opt);
1715 $sorting_settings = array();
1716 if ($hasParentMembership) {
1726 $feat->setTitle($this->
lng->txt(
'obj_features'));
1737 $mem->setChecked($this->
object->getShowMembers());
1738 $mem->setInfo($this->
lng->txt(
'grp_show_members_info'));
1743 $mail_type->
setValue((
string) $this->
object->getMailToMembersType());
1746 $this->
lng->txt(
'grp_mail_tutors_only'),
1748 $this->
lng->txt(
'grp_mail_tutors_only_info')
1750 $mail_type->addOption($mail_tutors);
1753 $this->
lng->txt(
'grp_mail_all'),
1755 $this->
lng->txt(
'grp_mail_all_info')
1757 $mail_type->addOption($mail_all);
1762 $not->setValue(
'1');
1763 $not->setInfo($this->
lng->txt(
'grp_auto_notification_info'));
1764 $not->setChecked($this->
object->getAutoNotification());
1783 $ecs->addSettingsToForm(
$form,
'grp');
1796 $this->tabs_gui->addSubTabTarget(
1798 $this->
ctrl->getLinkTarget($this,
'edit'),
1803 $this->tabs_gui->addSubTabTarget(
1804 "grp_info_settings",
1805 $this->
ctrl->getLinkTarget($this,
'editInfo'),
1811 $this->tabs_gui->addSubTabTarget(
1813 $this->
ctrl->getLinkTarget($this,
'editMapSettings'),
1819 $this->tabs_gui->addSubTabTarget(
1821 $this->
ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1828 $this->tabs_gui->addSubTabTarget(
1829 'grp_custom_user_fields',
1830 $this->
ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1832 'ilobjectcustomuserfieldsgui' 1837 if ($this->
object->getUseNews()) {
1838 $this->tabs_gui->addSubTab(
1839 'obj_news_settings',
1840 $this->
lng->txt(
"cont_news_settings"),
1841 $this->
ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1846 if ($lti_settings->hasSettingsAccess()) {
1847 $this->tabs_gui->addSubTabTarget(
1849 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1853 $this->tabs_gui->addSubTabTarget(
1854 "obj_multilinguality",
1855 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1857 "ilobjecttranslationgui" 1867 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1872 if (!$this->
object->members_obj->isAssigned($this->user->getId())) {
1899 return parent::prepareOutput($show_subobjects);
1904 $link = chr(13) . chr(10) . chr(13) . chr(10);
1905 $link .= $this->
lng->txt(
'grp_mail_permanent_link');
1906 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1907 $link .= ilLink::_getLink($this->
object->getRefId());
1908 return rawurlencode(base64_encode($link));
1919 $ilUser = $DIC[
'ilUser'];
1921 $lg = parent::initHeaderAction($sub_type, $sub_id);
1926 if (!$noti->isCurrentUserActive()) {
1930 $this->
lng->txt(
"grp_notification_deactivated")
1933 $this->
ctrl->setParameter($this,
"grp_ntf", 1);
1934 $caption =
"grp_activate_notification";
1939 $this->
lng->txt(
"grp_notification_activated")
1942 $this->
ctrl->setParameter($this,
"grp_ntf", 0);
1943 $caption =
"grp_deactivate_notification";
1946 if ($noti->canCurrentUserEdit()) {
1947 $lg->addCustomCommand(
1948 $this->
ctrl->getLinkTarget($this,
"saveNotification"),
1953 $this->
ctrl->setParameter($this,
"grp_ntf",
"");
1966 $res_data = array();
1967 foreach ($a_data as $usr_id => $user_data) {
1968 $res_data[$usr_id] = $user_data;
1972 foreach ($udf_data->getAll() as $field => $value) {
1973 list(
$f, $field_id) = explode(
'_', $field);
1974 $res_data[$usr_id][
'udf_' . $field_id] = (string) $value;
1977 foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1978 $res_data[$usr_id][
'cdf_' . $cdf_field] = (string) $cdf_value;
1987 $local_roles = $this->
object->getLocalGroupRoles();
1988 $grp_member = $this->
object->getDefaultMemberRole();
1989 $grp_roles = array();
1992 if (in_array($grp_member, $local_roles)) {
1994 unset($local_roles[$grp_roles[$grp_member]]);
1997 foreach ($local_roles as $title => $role_id) {
2005 $this->
ctrl->redirectByClass(
'ilUsersGalleryGUI');
2013 $this->
ctrl->setReturn($this,
"view");
static handleCode(int $a_ref_id, string $a_type, string $a_code)
static lookupRegistrationInfo(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(int $a_ref_id, bool $a_include_auto_entries)
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ilObjUser $user=null,)
const TYPE_NOTIFICATION_UNSUBSCRIBE
ilBadgeManagementGUI: ilPropertyFormGUI
const GRP_REGISTRATION_DEACTIVATED
static getLogger(string $a_component_id)
Get component logger.
saveSortingSettings(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSubTabs(string $a_tab)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
GUI class for the workflow of copying objects.
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initHeaderAction(?string $sub_type=null, ?int $sub_id=null)
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)
static _goto(string $a_target, string $a_add="")
const LP_STATUS_NOT_ATTEMPTED
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
static getInstance(int $a_ref_id)
static isActiveForRefId(int $ref_id)
static _getValuesByObjId(int $a_obj_id)
static _gotoRepositoryNode(int $ref_id, string $cmd="")
enableAdministrationPanelObject()
editMapSettingsObject()
Edit Map Settings.
disableAdministrationPanelObject()
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const GRP_REGISTRATION_REQUEST
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
Class ilMailMemberCourseRoles.
isActiveAdministrationPanel()
const LP_STATUS_IN_PROGRESS
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupObjId(int $ref_id)
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
const EXTERNAL_MAIL_PREFIX
static _enabledUserRelatedData()
static _checkRequired(int $a_usr_id, int $a_obj_id)
GUI class for public user profile presentation.
static _enabledLearningProgress()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupTemplateId(int $a_ref_id)
static http()
Fetches the global http state from ILIAS.
const GRP_REGISTRATION_PASSWORD
__construct($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=false)
static _lookupTitle(int $obj_id)
static _getInstanceByObjId(int $a_obj_id)
GUI class for LTI provider object settings.
const MAIL_ALLOWED_TUTORS
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilECSGroupSettings.
static _getTranslation(string $a_role_title)
initDidacticTemplate(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupViewMode(int $a_id)
static getDefaultSettings()
Get default longitude, latitude and zoom.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
jump2UsersGalleryObject()
const TYPE_UNSUBSCRIBE_MEMBER
static _modifyItemGUI(ilObjectListGUI $a_item_list_gui, string $a_cmd_class, array $a_item_data, bool $a_abo_status, int $a_course_ref_id, int $a_course_obj_id, int $a_parent_ref_id=0)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
const GRP_REGISTRATION_DIRECT
GUI class for group registrations.
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
setCustomRolesForSelection(array $a_roles)
Set custom roles for mapping to LTI roles.
const AUTO_RATING_NEW_OBJECTS
Class ilObjCourseGroupingGUI.
saveListPresentation(ilPropertyFormGUI $form)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
GUI class for membership features.
static redirect(string $a_script)
setObjParticipants(ilParticipants $objParticipants)
static isActivated()
Checks whether Map feature is activated.
addAdoptContentLinkToToolbar()
static generateCode()
Generate new registration key.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
static _getInstanceByType(string $a_type)
Get Singleton Instance.
static isAccessible(int $ref_id)
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initForm(string $a_mode='edit', bool $a_omit_form_action=false)
static _readUsersProfileData(array $a_user_ids)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ilObjUser $user=null)
Format a period of two dates Shows: 14.
__construct(Container $dic, ilPlugin $plugin)
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
Class ilCourseContentGUI.
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, ?string $a_back_url=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupAboStatus(int $a_id)
static _isOnList(int $a_usr_id, int $a_obj_id)
language()
description: > Example for rendring a language glyph.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _hasAccepted(int $a_usr_id, int $a_obj_id)
Check if user has accepted agreement.
readMemberData(array $ids, array $selected_columns=null)
editObject(?ilPropertyFormGUI $a_form=null)
static _lookupType(int $id, bool $reference=false)
const ORGU_POSITION_ACCESS
const LP_STATUS_COMPLETED
static lookupViewMode($a_obj_id)
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
addHeaderAction()
Add header action menu.
static getInstance(int $obj_id)
static makeClickable(string $a_text, bool $detectGotoLinks=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _fieldsToInfoString(int $a_obj_id)
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _hasFields(int $a_container_id)
Check if there are any define fields.
modifyItemGUI(ilObjectListGUI $a_item_list_gui, array $a_item_data)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
afterSave(ilObject $new_object, bool $redirect=true)
public
GUI class for object translation handling.
const CALENDAR_CONFIGURATION
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
addCustomData(array $a_data)
prepareOutput(bool $show_subobjects=true)