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":
159 $user_id = $this->
user->getId();
160 if ($this->
http->wrapper()->query()->has(
'user_id')) {
161 $user_id = $this->
http->wrapper()->query()->retrieve(
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(),
450 $this->
object->getId(),
455 parent::renderObject();
461 $this->tabs_gui->setTabActive(
'view_content');
462 $this->
ctrl->setReturn($this,
'view');
464 $this->
ctrl->setCmdClass(get_class($agreement));
465 $this->
ctrl->forwardCommand($agreement);
469 $this->tabs_gui->setTabActive(
'view_content');
475 $this->
tabs->activateTab(
"view_content");
476 parent::renderObject();
485 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(),
'crs')) {
489 'ilcoursecontentgui',
506 $new_object->setRegistrationType(
514 $this->tree->checkForParentType($new_object->
getRefId(),
'crs',
true) ||
515 $this->tree->checkForParentType($new_object->
getRefId(),
'grp',
true)
529 $members_obj->updateNotification($this->
user->getId(), (bool) $this->
settings->get(
'mail_grp_admin_notification',
'1'));
530 $members_obj->updateContact($this->
user->getId(),
true);
532 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
534 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
535 $this->
ctrl->redirect($this,
'edit');
547 $this->tabs_gui->setTabActive(
'settings');
548 $this->tabs_gui->setSubTabActive(
'grp_settings');
553 $this->tpl->setVariable(
'ADM_CONTENT', $a_form->getHTML());
559 $this->
object->getRefId(),
560 (
int) $_REQUEST[
'grp_type']
563 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
564 $this->
ctrl->redirect($this,
'edit');
581 if ($new_type_info) {
583 $new_type = (
int) $new_type[1];
585 $modified = ($new_type !== $old_type);
594 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_tile_and_session_limit_not_supported'));
601 $this->
object->setGroupType((
int)
$form->
getInput(
'grp_type'));
602 $this->
object->setRegistrationType((
int)
$form->
getInput(
'registration_type'));
604 $this->
object->enableUnlimitedRegistration(!
$form->
getInput(
'reg_limit_time'));
605 $this->
object->enableMembershipLimitation((
bool)
$form->
getInput(
'registration_membership_limited'));
606 $this->
object->setMinMembers((
int)
$form->
getInput(
'registration_min_members'));
607 $this->
object->setMaxMembers((
int)
$form->
getInput(
'registration_max_members'));
608 $this->
object->enableRegistrationAccessCode((
bool)
$form->
getInput(
'reg_code_enabled'));
609 $this->
object->setRegistrationAccessCode(
$form->
getInput(
'reg_code'));
610 $this->
object->setViewMode((
int)
$form->
getInput(
'view_mode'));
611 $this->
object->setMailToMembersType((
int)
$form->
getInput(
'mail_type'));
612 $this->
object->setShowMembers((
bool)
$form->
getInput(
'show_members'));
613 $this->
object->setAutoNotification((
bool)
$form->
getInput(
'auto_notification'));
616 $this->
object->enableSessionLimit((
bool)
$form->
getInput(
'sl'));
618 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
620 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
624 $this->
object->setPeriod(
625 $grp_period->getStart(),
626 $grp_period->getEnd()
631 $this->
object->enableUnlimitedRegistration(
false);
633 $this->
object->enableUnlimitedRegistration(
true);
636 $this->
object->setRegistrationStart($reg->getStart());
637 $this->
object->setRegistrationEnd($reg->getEnd());
640 $this->
object->setCancellationEnd($cancel_end->getDate());
643 if ($this->
http->wrapper()->post()->has(
'waiting_list')) {
644 $waiting_list = $this->
http->wrapper()->post()->retrieve(
649 switch ($waiting_list) {
651 $this->
object->enableWaitingList(
true);
652 $this->
object->setWaitingListAutoFill(
true);
656 $this->
object->enableWaitingList(
true);
657 $this->
object->setWaitingListAutoFill(
false);
661 $this->
object->enableWaitingList(
false);
662 $this->
object->setWaitingListAutoFill(
false);
665 $this->
object->handleAutoFill();
668 $this->
object->update();
671 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
674 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
677 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
680 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
697 $this->
user->getId(),
704 $ecs->handleSettingsUpdate(
$form);
706 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
715 if ($new_type == 0) {
716 $new_type_txt =
$GLOBALS[
'DIC'][
'lng']->txt(
'il_grp_status_open');
719 $new_type_txt = $dtpl->getPresentationTitle(
$GLOBALS[
'DIC'][
'lng']->getLangKey());
724 $confirm->setHeaderText($this->
lng->txt(
'grp_warn_grp_type_changed'));
725 $confirm->setFormAction($this->
ctrl->getFormAction($this));
729 $this->
lng->txt(
'grp_info_new_grp_type') .
': ' . $new_type_txt
731 $confirm->setConfirm($this->
lng->txt(
'grp_change_type'),
'updateGroupType');
732 $confirm->setCancel($this->
lng->txt(
'cancel'),
'edit');
734 $this->tpl->setContent($confirm->getHTML());
736 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
737 $this->
ctrl->redirect($this,
'edit');
753 if ($this->news->isGloballyActivated()) {
766 $this->tabs_gui->setTabActive(
'settings');
767 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
770 !$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
774 $latitude = $this->
object->getLatitude();
775 $longitude = $this->
object->getLongitude();
776 $zoom = $this->
object->getLocationZoom();
779 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
781 $latitude = $def[
"latitude"];
782 $longitude = $def[
"longitude"];
783 $zoom = $def[
"zoom"];
794 $this->
lng->txt(
"grp_enable_map"),
797 $public->setValue(
"1");
798 $public->setChecked($this->
object->getEnableGroupMap());
803 $this->
lng->txt(
"grp_map_location"),
807 $loc_prop->setLongitude((
float) $longitude);
808 $loc_prop->setZoom((
int) $zoom);
813 $this->tpl->setVariable(
"ADM_CONTENT",
$form->
getHTML());
822 if ($this->
http->wrapper()->post()->has(
'location')) {
823 $custom_transformer = $this->
refinery->custom()->transformation(
834 if ($this->
http->wrapper()->post()->has(
'enable_map')) {
835 $enable_map = $this->
http->wrapper()->post()->retrieve(
841 $this->
object->setLatitude((
string)
$location[
'latitude']);
842 $this->
object->setLongitude((
string) $location[
'longitude']);
843 $this->
object->setLocationZoom((
int) $location[
'zoom']);
844 $this->
object->setEnableGroupMap($enable_map);
845 $this->
object->update();
846 $this->
ctrl->redirect($this,
"editMapSettings");
856 $this->tabs_gui->setTabActive(
'settings');
857 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
872 $area->
setInfo($this->
lng->txt(
'grp_information_info'));
873 $area->setValue($this->
object->getInformation());
886 if ($this->
http->wrapper()->post()->has(
'important')) {
887 $important = $this->
http->wrapper()->post()->retrieve(
889 $this->
refinery->kindlyTo()->string()
892 $this->
object->setInformation($important);
893 $this->
object->update();
894 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
898 public function readMemberData(array $ids, array $selected_columns = null): array
902 $this->show_tracking =
907 $completed = $in_progress = $failed = [];
908 if ($this->show_tracking) {
910 $this->show_tracking = $olp->isActive();
913 if ($this->show_tracking) {
919 if ($privacy->enabledGroupAccessTimes()) {
923 $do_prtf = (is_array($selected_columns) &&
924 in_array(
'prtf', $selected_columns) &&
929 $this->
ctrl->getLinkTarget($this,
"members")
940 foreach ($ids as $usr_id) {
941 $tmp_data[
'notification'] = (bool) $this->
object->members_obj->isNotificationEnabled((
int) $usr_id) ? 1 : 0;
942 $tmp_data[
'contact'] = (bool) $this->
object->members_obj->isContact((
int) $usr_id) ? 1 : 0;
944 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
945 $tmp_data[$field] = $value;
948 if ($this->show_tracking) {
949 $tmp_data[
'progress'] =
'';
950 if (in_array($usr_id, $completed)) {
952 } elseif (in_array($usr_id, $in_progress)) {
954 } elseif (in_array($usr_id, $failed)) {
961 if ($privacy->enabledGroupAccessTimes()) {
962 if (isset($progress[$usr_id][
'ts']) && ($progress[$usr_id][
'ts'] ??
false)) {
966 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
968 $tmp_data[
'access_time'] = $this->
lng->txt(
'no_date');
969 $tmp_data[
'access_time_unix'] = 0;
972 $tmp_data[
'prtf'] = [];
974 $tmp_data[
'prtf'] = ($all_prtf[$usr_id] ?? []);
976 $members[$usr_id] = $tmp_data;
986 if ($part->isLastAdmin($this->user->getId())) {
987 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'grp_err_administrator_required'));
992 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
995 $cgui->setHeaderText($this->
lng->txt(
'grp_dismiss_myself'));
996 $cgui->setFormAction($this->
ctrl->getFormAction($this));
997 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancel");
998 $cgui->setConfirm($this->
lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
999 $this->tpl->setContent($cgui->getHTML());
1005 $this->
object->members_obj->delete($this->
user->getId());
1006 $this->
object->members_obj->sendNotification(
1008 $this->
user->getId()
1010 $this->
object->members_obj->sendNotification(
1012 $this->
user->getId()
1015 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'grp_msg_membership_annulled'),
true);
1016 $this->
ctrl->setParameterByClass(
1019 $this->tree->getParentId($this->object->getRefId())
1021 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
1026 $this->tabs_gui->addTab(
1028 $this->
lng->txt(
"content"),
1029 $this->
ctrl->getLinkTarget($this,
"view")
1040 $ilHelp = $DIC[
'ilHelp'];
1041 $ilHelp->setScreenIdComponent(
"grp");
1043 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
1044 if ($this->
object->isNewsTimelineEffective()) {
1045 if (!$this->
object->isNewsTimelineLandingPageEffective()) {
1048 $this->tabs_gui->addTab(
1050 $this->
lng->txt(
"cont_news_timeline_tab"),
1051 $this->
ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
1053 if ($this->
object->isNewsTimelineLandingPageEffective()) {
1061 $this->
access->checkAccess(
'visible',
'', $this->ref_id) ||
1062 $this->
access->checkAccess(
'join',
'', $this->ref_id) ||
1063 $this->
access->checkAccess(
'read',
'', $this->ref_id)
1065 $this->tabs_gui->addTarget(
1067 $this->
ctrl->getLinkTargetByClass(
1068 array(
"ilobjgroupgui",
"ilinfoscreengui"),
1079 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1080 $this->tabs_gui->addTarget(
1082 $this->
ctrl->getLinkTarget($this,
"edit"),
1083 array(
"edit",
"editMapSettings"),
1093 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1097 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1099 $this->tabs_gui->addTarget(
1100 "obj_tool_setting_badges",
1101 $this->
ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
1103 "ilbadgemanagementgui" 1114 $this->tabs_gui->addTarget(
1115 "obj_tool_setting_skills",
1116 $this->
ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
1118 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
1124 $this->tabs_gui->addTarget(
1125 'learning_progress',
1126 $this->
ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
1128 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
1133 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1135 $tab_link = $md_gui->getTab();
1136 if ($tab_link !== null) {
1137 $this->tabs_gui->addTab(
1139 $this->
lng->txt(
'meta_data'),
1147 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1148 $this->tabs_gui->addTarget(
1150 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
1159 if ($this->
access->checkAccess(
'join',
'', $this->object->getRefId()) and
1160 !$this->
object->members_obj->isAssigned($this->user->getId())) {
1162 $this->tabs_gui->addTab(
1164 $this->
lng->txt(
'membership_leave'),
1165 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
1168 $this->tabs_gui->addTarget(
1170 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
1176 if ($this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) and
1177 $this->
object->members_obj->isMember($this->user->getId())) {
1178 $this->tabs_gui->addTarget(
1179 "grp_btn_unsubscribe",
1180 $this->
ctrl->getLinkTarget($this,
"leave"),
1189 $this->
ctrl->setCmd(
"showSummary");
1190 $this->
ctrl->setCmdClass(
"ilinfoscreengui");
1196 $this->tabs_gui->setTabActive(
'info_short');
1204 $this->
object->getId(),
1210 if (strlen($this->
object->getInformation())) {
1211 $info->addSection($this->
lng->txt(
'grp_general_informations'));
1212 $info->addProperty($this->
lng->txt(
'grp_information'), nl2br(
1217 $info->enablePrivateNotes();
1218 $info->enableLearningProgress(
true);
1222 $record_gui->parse();
1225 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1230 $contacts =
$parts->getContacts();
1231 if (count($contacts) > 0) {
1232 $info->addSection($this->
lng->txt(
"grp_mem_contacts"));
1233 foreach ($contacts as
$c) {
1235 $pgui->setBackUrl($this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
1236 $pgui->setEmbedded(
true);
1237 $info->addProperty(
"", $pgui->getHTML());
1242 $info->addSection($this->
lng->txt(
'group_registration'));
1243 $info->showLDAPRoleGroupMappingInfo();
1245 if (!$this->
object->isRegistrationEnabled()) {
1247 $this->
lng->txt(
'group_registration_mode'),
1248 $this->
lng->txt(
'grp_reg_deac_info_screen')
1251 switch ($this->
object->getRegistrationType()) {
1254 $this->
lng->txt(
'group_registration_mode'),
1255 $this->
lng->txt(
'grp_reg_direct_info_screen')
1261 $this->
lng->txt(
'group_registration_mode'),
1262 $this->
lng->txt(
'grp_reg_req_info_screen')
1268 $this->
lng->txt(
'group_registration_mode'),
1269 $this->
lng->txt(
'grp_reg_passwd_info_screen')
1279 if ($this->
object->isRegistrationUnlimited()) {
1281 $this->
lng->txt(
'group_registration_time'),
1282 $this->
lng->txt(
'grp_registration_unlimited')
1284 } elseif ($this->
object->getRegistrationStart()->getUnixTime() < time()) {
1286 $this->
lng->txt(
"group_registration_time"),
1287 $this->
lng->txt(
'cal_until') .
' ' .
1290 } elseif ($this->
object->getRegistrationStart()->getUnixTime() >= time()) {
1292 $this->
lng->txt(
"group_registration_time"),
1293 $this->
lng->txt(
'cal_from') .
' ' .
1297 if ($this->
object->isMembershipLimited()) {
1298 if ($this->
object->getMinMembers()) {
1300 $this->
lng->txt(
"mem_min_users"),
1301 (string) $this->
object->getMinMembers()
1304 if ($this->
object->getMaxMembers()) {
1308 $this->
lng->txt(
'mem_free_places'),
1309 (string) ($reg_info[
'reg_info_free_places'] ??
'0')
1314 if ($this->
object->getCancellationEnd()) {
1316 $this->
lng->txt(
'grp_cancellation_end'),
1323 !$this->
object->getStart()->isNull()
1326 $this->
lng->txt(
'grp_period'),
1328 $this->
object->getStart(),
1329 $this->
object->getEnd()
1340 $this->
lng->loadLanguageModule(
'ps');
1341 $info->addSection($this->
lng->txt(
'grp_user_agreement_info'));
1342 $info->addProperty($this->
lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
1345 $info->addProperty($this->
lng->txt(
'ps_grp_user_fields'), $fields);
1351 $this->
ctrl->forwardCommand($info);
1358 $grp_notification =
false;
1359 if ($this->
http->wrapper()->query()->has(
'grp_ntf')) {
1360 $grp_notification = $this->
http->wrapper()->query()->retrieve(
1362 $this->
refinery->kindlyTo()->bool()
1366 if ($noti->canCurrentUserEdit()) {
1367 if ($grp_notification) {
1368 $noti->activateUser();
1370 $noti->deactivateUser();
1373 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1374 $this->
ctrl->redirect($this,
"");
1379 $this->
ctrl->redirectByClass(
'ilgroupmembershipgui');
1383 public static function _goto(
string $a_target,
string $a_add =
""): void
1386 $main_tpl = $DIC->ui()->mainTemplate();
1387 $a_target = (
int) $a_target;
1389 $ilUser = $DIC->user();
1390 $ilAccess = $DIC->access();
1391 $lng = $DIC->language();
1393 $http = $DIC->http();
1394 $refinery = $DIC->refinery();
1397 if ($http->
wrapper()->query()->has(
'target')) {
1398 $target = $http->
wrapper()->query()->retrieve(
1403 if (substr($a_add, 0, 5) ==
'rcode') {
1407 "login.php?target=" . $target .
"&cmd=force_login&lang=" .
1408 $ilUser->getCurrentLanguage()
1420 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
1428 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1432 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1436 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1437 $lng->
txt(
"msg_no_perm_read_item"),
1453 if (!$a_omit_form_action) {
1467 $this->initFormTitleDescription(
$form);
1471 if ($a_mode ==
'edit') {
1474 $this->
lng->loadLanguageModule(
'mem');
1475 $cdur->enableToggleFullTime(
1476 $this->
lng->txt(
'mem_period_without_time'),
1477 !$this->
object->getStartTimeIndication()
1479 $cdur->setShowTime(
true);
1480 $cdur->setInfo($this->
lng->txt(
'grp_period_info'));
1481 $cdur->setStart($this->
object->getStart());
1482 $cdur->setEnd($this->
object->getEnd());
1487 $pres->setTitle($this->
lng->txt(
'grp_setting_header_registration'));
1492 $reg_type->
setValue((
string) $this->
object->getRegistrationType());
1495 $this->
lng->txt(
'grp_reg_direct'),
1497 );#$this->
lng->txt(
'grp_reg_direct_info'));
1498 $reg_type->addOption($opt_dir);
1501 $this->
lng->txt(
'grp_pass_request'),
1505 $pass->setRequired(
true);
1506 $pass->setInfo($this->
lng->txt(
'grp_reg_password_info'));
1507 $pass->setValue($this->
object->getPassword());
1509 $pass->setMaxLength(32);
1510 $opt_pass->addSubItem($pass);
1511 $reg_type->addOption($opt_pass);
1514 $reg_type->addOption($opt_req);
1517 $reg_type->addOption($opt_deact);
1521 $reg_code->setChecked($this->
object->isRegistrationAccessCodeEnabled());
1522 $reg_code->setValue(
'1');
1523 $reg_code->setInfo($this->
lng->txt(
'grp_reg_code_enabled_info'));
1527 if (!$this->
object->getRegistrationAccessCode()) {
1531 $reg_link->setValue($this->
object->getRegistrationAccessCode());
1535 $val = ilLink::_getLink($this->
object->getRefId(), $this->
object->getType(), array(),
'rcode' . $this->
object->getRegistrationAccessCode());
1536 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1537 $reg_code->addSubItem($link);
1541 $this->
lng->loadLanguageModule(
'dateplaner');
1543 $dur->setShowTime(
true);
1544 $dur->setStart($this->
object->getRegistrationStart());
1545 $dur->setEnd($this->
object->getRegistrationEnd());
1550 $cancel->
setInfo($this->
lng->txt(
'grp_cancellation_end_info'));
1551 $cancel->setDate($this->
object->getCancellationEnd());
1555 $lim =
new ilCheckboxInputGUI($this->
lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
1556 $lim->setValue(
'1');
1558 $lim->setChecked($this->
object->isMembershipLimited());
1560 $min =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_min_members'),
'registration_min_members');
1562 $min->setMaxLength(4);
1563 $min->setValue($this->
object->getMinMembers() ?:
'');
1564 $min->setInfo($this->
lng->txt(
'grp_subscription_min_members_info'));
1565 $lim->addSubItem($min);
1567 $max =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_max_members'),
'registration_max_members');
1568 $max->setValue($this->
object->getMaxMembers() ?:
'');
1571 $max->setMaxLength(4);
1572 $max->setInfo($this->
lng->txt(
'grp_reg_max_members_info'));
1573 $lim->addSubItem($max);
1588 $wait->addOption($option);
1590 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_no_autofill'),
'1');
1591 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_info'));
1592 $wait->addOption($option);
1594 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_autofill'),
'2');
1595 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_autofill_info'));
1596 $wait->addOption($option);
1598 if ($this->
object->hasWaitingListAutoFill()) {
1599 $wait->setValue(
'2');
1600 } elseif ($this->
object->isWaitingListEnabled()) {
1601 $wait->setValue(
'1');
1603 $wait->setValue(
'0');
1606 $lim->addSubItem($wait);
1612 $parent_membership_ref_id = 0;
1613 $hasParentMembership =
1615 $parent_membership_ref_id = $this->tree->checkForParentType($this->
object->getRefId(),
'crs',
true)
1619 $pres->setTitle($this->
lng->txt(
'grp_setting_header_presentation'));
1623 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1626 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1629 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1632 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1640 if ($hasParentMembership) {
1642 $course_view_mode =
'';
1643 switch ($parent_view_mode) {
1645 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_sessions');
1649 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_simple');
1653 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_by_type');
1656 if ($course_view_mode) {
1658 $opt->setInfo($this->
lng->txt(
'grp_view_inherit_info'));
1659 $view_type->addOption($opt);
1670 $opt->setInfo($this->
lng->txt(
'cntr_view_info_sessions'));
1671 $view_type->addOption($opt);
1674 $this->
lng->loadLanguageModule(
'crs');
1676 $sess->setValue(
'1');
1677 $sess->setChecked($this->
object->isSessionLimitEnabled());
1678 $sess->setInfo($this->
lng->txt(
'sess_limit_info'));
1681 $prev->setMinValue(0);
1682 $prev->setValue((
string) (
1683 $this->
object->getNumberOfPreviousSessions() == -1 ?
1685 $this->
object->getNumberOfPreviousSessions()
1688 $prev->setMaxLength(3);
1689 $sess->addSubItem($prev);
1692 $next->setMinValue(0);
1693 $next->setValue((
string) (
1694 $this->
object->getNumberOfNextSessions() == -1 ?
1696 $this->
object->getNumberOfNextSessions()
1699 $next->setMaxLength(3);
1700 $sess->addSubItem($next);
1701 $opt->addSubItem($sess);
1704 $opt->setInfo($this->
lng->txt(
'grp_view_info_simple'));
1705 $view_type->addOption($opt);
1708 $opt->setInfo($this->
lng->txt(
'grp_view_info_by_type'));
1709 $view_type->addOption($opt);
1714 $sorting_settings = array();
1715 if ($hasParentMembership) {
1725 $feat->setTitle($this->
lng->txt(
'obj_features'));
1736 $mem->setChecked($this->
object->getShowMembers());
1737 $mem->setInfo($this->
lng->txt(
'grp_show_members_info'));
1742 $mail_type->
setValue((
string) $this->
object->getMailToMembersType());
1745 $this->
lng->txt(
'grp_mail_tutors_only'),
1747 $this->
lng->txt(
'grp_mail_tutors_only_info')
1749 $mail_type->addOption($mail_tutors);
1752 $this->
lng->txt(
'grp_mail_all'),
1754 $this->
lng->txt(
'grp_mail_all_info')
1756 $mail_type->addOption($mail_all);
1761 $not->setValue(
'1');
1762 $not->setInfo($this->
lng->txt(
'grp_auto_notification_info'));
1763 $not->setChecked($this->
object->getAutoNotification());
1782 $ecs->addSettingsToForm(
$form,
'grp');
1795 $this->tabs_gui->addSubTabTarget(
1797 $this->
ctrl->getLinkTarget($this,
'edit'),
1802 $this->tabs_gui->addSubTabTarget(
1803 "grp_info_settings",
1804 $this->
ctrl->getLinkTarget($this,
'editInfo'),
1810 $this->tabs_gui->addSubTabTarget(
1812 $this->
ctrl->getLinkTarget($this,
'editMapSettings'),
1818 $this->tabs_gui->addSubTabTarget(
1820 $this->
ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1827 $this->tabs_gui->addSubTabTarget(
1828 'grp_custom_user_fields',
1829 $this->
ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1831 'ilobjectcustomuserfieldsgui' 1836 if ($this->
object->getUseNews()) {
1837 $this->tabs_gui->addSubTab(
1838 'obj_news_settings',
1839 $this->
lng->txt(
"cont_news_settings"),
1840 $this->
ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1845 if ($lti_settings->hasSettingsAccess()) {
1846 $this->tabs_gui->addSubTabTarget(
1848 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1852 $this->tabs_gui->addSubTabTarget(
1853 "obj_multilinguality",
1854 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1856 "ilobjecttranslationgui" 1866 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1871 if (!$this->
object->members_obj->isAssigned($this->user->getId())) {
1898 return parent::prepareOutput($show_subobjects);
1903 $link = chr(13) . chr(10) . chr(13) . chr(10);
1904 $link .= $this->
lng->txt(
'grp_mail_permanent_link');
1905 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1906 $link .= ilLink::_getLink($this->
object->getRefId());
1907 return rawurlencode(base64_encode($link));
1918 $ilUser = $DIC[
'ilUser'];
1920 $lg = parent::initHeaderAction($sub_type, $sub_id);
1925 if (!$noti->isCurrentUserActive()) {
1929 $this->
lng->txt(
"grp_notification_deactivated")
1932 $this->
ctrl->setParameter($this,
"grp_ntf", 1);
1933 $caption =
"grp_activate_notification";
1938 $this->
lng->txt(
"grp_notification_activated")
1941 $this->
ctrl->setParameter($this,
"grp_ntf", 0);
1942 $caption =
"grp_deactivate_notification";
1945 if ($noti->canCurrentUserEdit()) {
1946 $lg->addCustomCommand(
1947 $this->
ctrl->getLinkTarget($this,
"saveNotification"),
1952 $this->
ctrl->setParameter($this,
"grp_ntf",
"");
1965 $res_data = array();
1966 foreach ($a_data as $usr_id => $user_data) {
1967 $res_data[$usr_id] = $user_data;
1971 foreach ($udf_data->getAll() as $field => $value) {
1972 list(
$f, $field_id) = explode(
'_', $field);
1973 $res_data[$usr_id][
'udf_' . $field_id] = (string) $value;
1976 foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1977 $res_data[$usr_id][
'cdf_' . $cdf_field] = (string) $cdf_value;
1986 $local_roles = $this->
object->getLocalGroupRoles();
1987 $grp_member = $this->
object->getDefaultMemberRole();
1988 $grp_roles = array();
1991 if (in_array($grp_member, $local_roles)) {
1993 unset($local_roles[$grp_roles[$grp_member]]);
1996 foreach ($local_roles as $title => $role_id) {
2004 $this->
ctrl->redirectByClass(
'ilUsersGalleryGUI');
2012 $this->
ctrl->setReturn($this,
"view");
static handleCode(int $a_ref_id, string $a_type, string $a_code)
Interface GlobalHttpState.
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.
const TYPE_NOTIFICATION_UNSUBSCRIBE
Class ilBadgeManagementGUI.
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _getValuesByObjId(int $a_obj_id)
static _gotoRepositoryNode(int $ref_id, string $cmd="")
enableAdministrationPanelObject()
static _fillHTMLMetaTags(int $a_rbac_id, int $a_obj_id, string $a_type)
editMapSettingsObject()
Edit Map Settings.
Class ilMailMemberSearchGUI.
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
Export User Interface Class.
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 _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 formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
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)
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)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _lookupAboStatus(int $a_id)
static _isOnList(int $a_usr_id, int $a_obj_id)
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)