19 declare(strict_types=1);
56 public function __construct($a_data,
int $a_id,
bool $a_call_by_reference,
bool $a_prepare_output =
false)
63 $this->
lng->loadLanguageModule(
'grp');
64 $this->
lng->loadLanguageModule(
'obj');
66 $this->rbacsystem = $DIC->rbac()->system();
67 $this->news = $DIC->news();
72 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
73 return $this->
http->wrapper()->query()->retrieve(
88 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
92 $next_class = $this->
ctrl->getNextClass($this);
93 $cmd = $this->
ctrl->getCmd();
98 $ilNavigationHistory->addItem(
100 ilLink::_getLink(
$ref_id,
"grp"),
106 if ($next_class ==
"" && $cmd ==
"" && $this->
object->isNewsTimelineLandingPageEffective()
108 $this->
ctrl->redirectByClass(
"ilnewstimelinegui");
111 $header_action =
true;
112 switch ($next_class) {
113 case strtolower(ilRepositoryTrashGUI::class):
114 $ru = new \ilRepositoryTrashGUI($this);
115 $this->
ctrl->setReturn($this,
'trash');
116 $this->
ctrl->forwardCommand($ru);
119 case 'illtiproviderobjectsettinggui':
121 $this->tabs_gui->activateTab(
'settings');
122 $this->tabs_gui->activateSubTab(
'lti_provider');
125 $lti_gui->offerLTIRolesForSelection(
false);
126 $this->
ctrl->forwardCommand($lti_gui);
130 case 'ilgroupmembershipgui':
132 $this->tabs_gui->activateTab(
'members');
135 $this->
ctrl->forwardCommand($mem_gui);
139 case 'ilgroupregistrationgui':
140 $this->
ctrl->setReturn($this,
'');
141 $this->tabs_gui->setTabActive(
'join');
143 $this->
ctrl->forwardCommand($registration);
146 case 'ilpermissiongui':
147 $this->tabs_gui->activateTab(
'perm_settings');
149 $this->
ctrl->forwardCommand($perm_gui);
152 case "ilinfoscreengui":
156 case "illearningprogressgui":
158 if ($this->
http->wrapper()->query()->has(
'user_id')) {
166 $this->
object->getRefId(),
169 $this->
ctrl->forwardCommand($new_gui);
170 $this->tabs_gui->setTabActive(
'learning_progress');
173 case 'ilobjcoursegroupinggui':
175 $this->
ctrl->setReturn($this,
'edit');
177 if ($this->
http->wrapper()->query()->has(
'obj_id')) {
178 $obj_id = $this->
http->wrapper()->query()->retrieve(
184 $this->
ctrl->forwardCommand($crs_grp_gui);
185 $this->tabs_gui->setTabActive(
'settings');
186 $this->tabs_gui->setSubTabActive(
'groupings');
189 case 'ilcoursecontentgui':
191 $this->
ctrl->forwardCommand($course_content_obj);
194 case 'ilpublicuserprofilegui':
196 $this->tabs_gui->setTabActive(
'group_members');
197 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
199 if ($this->
http->wrapper()->query()->has(
'user')) {
200 $usr_id = $this->
http->wrapper()->query()->retrieve(
207 if ($this->
http->wrapper()->query()->has(
'back_url')) {
208 $back_url = $this->
http->wrapper()->query()->retrieve(
210 $this->
refinery->kindlyTo()->string()
213 if ($back_url ==
'') {
214 $profile_gui->setBackUrl($this->
ctrl->getLinkTargetByClass([
"ilGroupMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
216 $html = $this->
ctrl->forwardCommand($profile_gui);
217 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
221 $this->tabs_gui->setTabActive(
'none');
223 $this->tpl->setVariable(
224 "LOCATION_CONTENT_STYLESHEET",
231 case "ilcontainerpagegui":
234 $this->tpl->setContent($ret);
236 $header_action =
false;
239 case 'ilobjectcopygui':
242 $this->
ctrl->forwardCommand($cp);
245 case "ilobjectcontentstylesettingsgui":
251 $settings_gui = $DIC->contentStyle()->gui()
252 ->objectSettingsGUIForRefId(
256 $this->
ctrl->forwardCommand($settings_gui);
259 case 'ilobjectcustomuserfieldsgui':
262 $this->tabs_gui->setTabActive(
'settings');
263 $this->tabs_gui->activateSubTab(
'grp_custom_user_fields');
264 $this->
ctrl->forwardCommand($cdf_gui);
267 case 'ilmemberagreementgui':
268 $this->
ctrl->setReturn($this,
'');
269 $this->tabs_gui->setTabActive(
'view_content');
271 $this->
ctrl->forwardCommand($agreement);
275 $this->tabs_gui->setTabActive(
'export');
277 $exp->addFormat(
'xml');
278 $this->
ctrl->forwardCommand($exp);
281 case "ilcommonactiondispatchergui":
286 case 'ilobjectservicesettingsgui':
287 $this->
ctrl->setReturn($this,
'edit');
289 $this->tabs_gui->activateTab(
'settings');
290 $this->tabs_gui->activateSubTab(
'tool_settings');
302 case 'ilmailmembersearchgui':
305 if (!($this->
access->checkAccess(
'manage_members',
'', $this->object->getRefId()) ||
307 $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
308 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
311 $this->tabs_gui->setTabActive(
'members');
316 $this->
ctrl->forwardCommand($mail_search);
319 case 'ilbadgemanagementgui':
320 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
322 $this->
ctrl->forwardCommand($bgui);
325 case "ilcontainernewssettingsgui":
327 $this->tabs_gui->setTabActive(
'settings');
328 $this->tabs_gui->activateSubTab(
'obj_news_settings');
330 $news_set_gui->setTimeline(
true);
331 $news_set_gui->setCronNotifications(
true);
332 $news_set_gui->setHideByDate(
true);
333 $this->
ctrl->forwardCommand($news_set_gui);
336 case "ilnewstimelinegui":
338 $this->tabs_gui->setTabActive(
'news_timeline');
340 $t->setUserEditAll($this->
access->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
342 $this->
ctrl->forwardCommand($t);
344 $this->
user->getId(),
345 $this->
object->getId(),
346 $this->
object->getRefId(),
351 case "ilcontainerskillgui":
352 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
357 case 'ilcalendarpresentationgui':
359 $this->
ctrl->forwardCommand($cal);
362 case 'ilobjectmetadatagui':
363 if (!$this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
364 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
366 $this->tabs_gui->activateTab(
'meta_data');
371 case strtolower(TranslationGUI::class):
374 $this->
tabs->activateTab(
"settings");
388 $this->
ctrl->forwardCommand($transgui);
395 !$this->
access->checkAccess(
'visible',
'', $this->object->getRefId(),
'grp') and
396 !$this->
access->checkAccess(
'read',
'', $this->object->getRefId(),
'grp')) {
397 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
401 if ($cmd ==
'infoScreenGoto') {
402 if ($this->
object->isRegistrationEnabled()) {
411 && !$this->rbacsystem->checkAccess(
'read', $this->object->getRefId()) && $cmd !=
'infoScreen')
413 || $cmd ===
'leaveWaitList') {
415 if (!$this->rbacsystem->checkAccess(
'join', $this->object->getRefId())) {
416 $this->
ctrl->redirect($this,
"infoScreen");
418 $this->
ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
429 if ($header_action) {
437 $this->
ctrl->redirect($this,
"");
443 $this->
ctrl->redirect($this,
"");
452 $this->
user->getId(),
453 $this->
object->getId(),
454 $this->
object->getRefId(),
459 parent::renderObject();
465 $this->
ctrl->redirectByClass(ilMemberAgreementGUI::class);
468 $this->tabs_gui->setTabActive(
'view_content');
474 $this->
tabs->activateTab(
"view_content");
475 parent::renderObject();
484 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(),
'crs')) {
488 'ilcoursecontentgui',
505 $new_object->setRegistrationType(
513 $this->tree->checkForParentType($new_object->
getRefId(),
'crs',
true) ||
514 $this->tree->checkForParentType($new_object->
getRefId(),
'grp',
true)
528 $members_obj->updateNotification($this->
user->getId(), (bool) $this->
settings->get(
'mail_grp_admin_notification',
'1'));
529 $members_obj->updateContact($this->
user->getId(),
true);
531 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
533 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
534 $this->
ctrl->redirect($this,
'edit');
546 $this->tabs_gui->setTabActive(
'settings');
547 $this->tabs_gui->setSubTabActive(
'general');
552 $this->tpl->setVariable(
'ADM_CONTENT', $a_form->getHTML());
558 $this->
object->getRefId(),
559 (
int) $_REQUEST[
'grp_type']
562 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
563 $this->
ctrl->redirect($this,
'edit');
580 if ($new_type_info) {
582 $new_type = (
int) $new_type[1];
584 $modified = ($new_type !== $old_type);
593 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_tile_and_session_limit_not_supported'));
600 $this->
object->setGroupType((
int)
$form->
getInput(
'grp_type'));
601 $this->
object->setRegistrationType((
int)
$form->
getInput(
'registration_type'));
603 $this->
object->enableUnlimitedRegistration(!
$form->
getInput(
'reg_limit_time'));
604 $this->
object->enableMembershipLimitation((
bool)
$form->
getInput(
'registration_membership_limited'));
605 $this->
object->setMinMembers((
int)
$form->
getInput(
'registration_min_members'));
606 $this->
object->setMaxMembers((
int)
$form->
getInput(
'registration_max_members'));
607 $this->
object->enableRegistrationAccessCode((
bool)
$form->
getInput(
'reg_code_enabled'));
608 $this->
object->setRegistrationAccessCode(
$form->
getInput(
'reg_code'));
609 $this->
object->setViewMode((
int)
$form->
getInput(
'view_mode'));
610 $this->
object->setMailToMembersType((
int)
$form->
getInput(
'mail_type'));
611 $this->
object->setShowMembers((
bool)
$form->
getInput(
'show_members'));
612 $this->
object->setAutoNotification((
bool)
$form->
getInput(
'auto_notification'));
615 $this->
object->enableSessionLimit((
bool)
$form->
getInput(
'sl'));
617 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
619 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
623 $this->
object->setPeriod(
624 $grp_period->getStart(),
625 $grp_period->getEnd()
630 $this->
object->enableUnlimitedRegistration(
false);
632 $this->
object->enableUnlimitedRegistration(
true);
635 $this->
object->setRegistrationStart($reg->getStart());
636 $this->
object->setRegistrationEnd($reg->getEnd());
639 $this->
object->setCancellationEnd($cancel_end->getDate());
642 if ($this->
http->wrapper()->post()->has(
'waiting_list')) {
643 $waiting_list = $this->
http->wrapper()->post()->retrieve(
648 switch ($waiting_list) {
650 $this->
object->enableWaitingList(
true);
651 $this->
object->setWaitingListAutoFill(
true);
655 $this->
object->enableWaitingList(
true);
656 $this->
object->setWaitingListAutoFill(
false);
660 $this->
object->enableWaitingList(
false);
661 $this->
object->setWaitingListAutoFill(
false);
664 $this->
object->handleAutoFill();
667 $property_online = $this->
object->getObjectProperties()->getPropertyIsOnline();
669 $property_online->withOnline() :
670 $property_online->withOffline();
671 $this->
object->getObjectProperties()->storePropertyIsOnline($online);
674 $this->
object->update();
677 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
680 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
683 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
686 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
703 $this->
user->getId(),
710 $ecs->handleSettingsUpdate(
$form);
712 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
721 if ($new_type == 0) {
722 $new_type_txt =
$GLOBALS[
'DIC'][
'lng']->txt(
'il_grp_status_open');
725 $new_type_txt = $dtpl->getPresentationTitle(
$GLOBALS[
'DIC'][
'lng']->getLangKey());
730 $confirm->setHeaderText($this->
lng->txt(
'grp_warn_grp_type_changed'));
731 $confirm->setFormAction($this->
ctrl->getFormAction($this));
735 $this->
lng->txt(
'grp_info_new_grp_type') .
': ' . $new_type_txt
737 $confirm->setConfirm($this->
lng->txt(
'grp_change_type'),
'updateGroupType');
738 $confirm->setCancel($this->
lng->txt(
'cancel'),
'edit');
740 $this->tpl->setContent($confirm->getHTML());
742 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
743 $this->
ctrl->redirect($this,
'edit');
759 if ($this->news->isGloballyActivated()) {
772 $this->tabs_gui->setTabActive(
'settings');
773 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
776 !$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
780 $latitude = $this->
object->getLatitude();
781 $longitude = $this->
object->getLongitude();
782 $zoom = $this->
object->getLocationZoom();
785 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
787 $latitude = $def[
"latitude"];
788 $longitude = $def[
"longitude"];
789 $zoom = $def[
"zoom"];
800 $this->
lng->txt(
"grp_enable_map"),
803 $public->setValue(
"1");
804 $public->setChecked($this->
object->getEnableGroupMap());
809 $this->
lng->txt(
"grp_map_location"),
813 $loc_prop->setLongitude((
float) $longitude);
814 $loc_prop->setZoom((
int) $zoom);
819 $this->tpl->setVariable(
"ADM_CONTENT",
$form->
getHTML());
828 if ($this->
http->wrapper()->post()->has(
'location')) {
829 $custom_transformer = $this->
refinery->custom()->transformation(
840 if ($this->
http->wrapper()->post()->has(
'enable_map')) {
841 $enable_map = $this->
http->wrapper()->post()->retrieve(
847 $this->
object->setLatitude((
string)
$location[
'latitude']);
848 $this->
object->setLongitude((
string) $location[
'longitude']);
849 $this->
object->setLocationZoom((
int) $location[
'zoom']);
850 $this->
object->setEnableGroupMap($enable_map);
851 $this->
object->update();
852 $this->
ctrl->redirect($this,
"editMapSettings");
862 $this->tabs_gui->setTabActive(
'settings');
863 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
878 $area->
setInfo($this->
lng->txt(
'grp_information_info'));
879 $area->setValue($this->
object->getInformation());
892 if ($this->
http->wrapper()->post()->has(
'important')) {
893 $important = $this->
http->wrapper()->post()->retrieve(
895 $this->
refinery->kindlyTo()->string()
898 $this->
object->setInformation($important);
899 $this->
object->update();
900 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
908 $this->show_tracking =
913 $completed = $in_progress = $failed = [];
914 if ($this->show_tracking) {
916 $this->show_tracking = $olp->isActive();
919 if ($this->show_tracking) {
925 if ($privacy->enabledGroupAccessTimes()) {
929 $do_prtf = (is_array($selected_columns) &&
930 in_array(
'prtf', $selected_columns) &&
935 $this->
ctrl->getLinkTarget($this,
"members")
946 foreach ($ids as $usr_id) {
947 $tmp_data[
'notification'] = (bool) $this->
object->members_obj->isNotificationEnabled((
int) $usr_id) ? 1 : 0;
948 $tmp_data[
'contact'] = (bool) $this->
object->members_obj->isContact((
int) $usr_id) ? 1 : 0;
950 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
951 $tmp_data[$field] = $value;
954 if ($this->show_tracking) {
955 $tmp_data[
'progress'] =
'';
956 if (in_array($usr_id, $completed)) {
958 } elseif (in_array($usr_id, $in_progress)) {
960 } elseif (in_array($usr_id, $failed)) {
967 if ($privacy->enabledGroupAccessTimes()) {
968 if (isset($progress[$usr_id][
'ts']) && ($progress[$usr_id][
'ts'] ??
false)) {
972 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
974 $tmp_data[
'access_time'] = $this->
lng->txt(
'no_date');
975 $tmp_data[
'access_time_unix'] = 0;
978 $tmp_data[
'prtf'] = [];
980 $tmp_data[
'prtf'] = ($all_prtf[$usr_id] ?? []);
982 $members[$usr_id] = $tmp_data;
992 if ($part->isLastAdmin($this->user->getId())) {
993 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'grp_err_administrator_required'));
998 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
1001 $cgui->setHeaderText($this->
lng->txt(
'grp_dismiss_myself'));
1002 $cgui->setFormAction($this->
ctrl->getFormAction($this));
1003 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancel");
1004 $cgui->setConfirm($this->
lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
1005 $this->tpl->setContent($cgui->getHTML());
1011 $this->
object->members_obj->delete($this->
user->getId());
1012 $this->
object->members_obj->sendNotification(
1014 $this->
user->getId()
1016 $this->
object->members_obj->sendNotification(
1018 $this->
user->getId()
1021 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'grp_msg_membership_annulled'),
true);
1022 $this->
ctrl->setParameterByClass(
1025 $this->tree->getParentId($this->object->getRefId())
1027 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
1032 $this->tabs_gui->addTab(
1034 $this->
lng->txt(
"content"),
1035 $this->
ctrl->getLinkTarget($this,
"view")
1046 $ilHelp = $DIC[
'ilHelp'];
1047 $ilHelp->setScreenIdComponent(
"grp");
1049 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
1050 if ($this->
object->isNewsTimelineEffective()) {
1051 if (!$this->
object->isNewsTimelineLandingPageEffective()) {
1054 $this->tabs_gui->addTab(
1056 $this->
lng->txt(
"cont_news_timeline_tab"),
1057 $this->
ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
1059 if ($this->
object->isNewsTimelineLandingPageEffective()) {
1067 $this->
access->checkAccess(
'visible',
'', $this->ref_id) ||
1068 $this->
access->checkAccess(
'join',
'', $this->ref_id) ||
1069 $this->
access->checkAccess(
'read',
'', $this->ref_id)
1071 $this->tabs_gui->addTarget(
1073 $this->
ctrl->getLinkTargetByClass(
1074 array(
"ilobjgroupgui",
"ilinfoscreengui"),
1085 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1086 $this->tabs_gui->addTarget(
1088 $this->
ctrl->getLinkTarget($this,
"edit"),
1089 array(
"edit",
"editMapSettings"),
1099 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1103 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1105 $this->tabs_gui->addTarget(
1106 "obj_tool_setting_badges",
1107 $this->
ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
1109 "ilbadgemanagementgui" 1120 $this->tabs_gui->addTarget(
1121 "obj_tool_setting_skills",
1122 $this->
ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
1124 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
1130 $this->tabs_gui->addTarget(
1131 'learning_progress',
1132 $this->
ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
1134 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
1139 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1141 $tab_link = $md_gui->getTab();
1142 if ($tab_link !==
null) {
1143 $this->tabs_gui->addTab(
1145 $this->
lng->txt(
'meta_data'),
1153 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1154 $this->tabs_gui->addTarget(
1156 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
1165 if ($this->
access->checkAccess(
'join',
'', $this->object->getRefId()) and
1166 !$this->
object->members_obj->isAssigned($this->user->getId())) {
1168 $this->tabs_gui->addTab(
1170 $this->
lng->txt(
'membership_leave'),
1171 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
1174 $this->tabs_gui->addTarget(
1176 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
1182 if ($this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) and
1183 $this->
object->members_obj->isMember($this->user->getId())) {
1184 $this->tabs_gui->addTarget(
1185 "grp_btn_unsubscribe",
1186 $this->
ctrl->getLinkTarget($this,
"leave"),
1195 $this->
ctrl->redirectByClass(ilInfoScreenGUI::class,
"showSummary");
1200 $this->tabs_gui->setTabActive(
'info_short');
1208 if (strlen($this->
object->getInformation())) {
1209 $info->addSection($this->
lng->txt(
'grp_general_informations'));
1210 $info->addProperty($this->
lng->txt(
'grp_information'), nl2br(
1215 $info->enablePrivateNotes();
1216 $info->enableLearningProgress(
true);
1220 $record_gui->parse();
1223 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1228 $contacts =
$parts->getContacts();
1229 if (count($contacts) > 0) {
1230 $info->addSection($this->
lng->txt(
"grp_mem_contacts"));
1231 foreach ($contacts as
$c) {
1233 $pgui->setBackUrl($this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
1234 $pgui->setEmbedded(
true);
1235 $info->addProperty(
"", $pgui->getHTML());
1240 $info->addSection($this->
lng->txt(
'group_registration'));
1241 $info->showLDAPRoleGroupMappingInfo();
1243 if (!$this->
object->isRegistrationEnabled()) {
1245 $this->
lng->txt(
'group_registration_mode'),
1246 $this->
lng->txt(
'grp_reg_deac_info_screen')
1249 switch ($this->
object->getRegistrationType()) {
1252 $this->
lng->txt(
'group_registration_mode'),
1253 $this->
lng->txt(
'grp_reg_direct_info_screen')
1259 $this->
lng->txt(
'group_registration_mode'),
1260 $this->
lng->txt(
'grp_reg_req_info_screen')
1266 $this->
lng->txt(
'group_registration_mode'),
1267 $this->
lng->txt(
'grp_reg_passwd_info_screen')
1277 if ($this->
object->isRegistrationUnlimited()) {
1279 $this->
lng->txt(
'group_registration_time'),
1280 $this->
lng->txt(
'grp_registration_unlimited')
1282 } elseif ($this->
object->getRegistrationStart()->getUnixTime() < time()) {
1284 $this->
lng->txt(
"group_registration_time"),
1285 $this->
lng->txt(
'cal_until') .
' ' .
1288 } elseif ($this->
object->getRegistrationStart()->getUnixTime() >= time()) {
1290 $this->
lng->txt(
"group_registration_time"),
1291 $this->
lng->txt(
'cal_from') .
' ' .
1295 if ($this->
object->isMembershipLimited()) {
1296 if ($this->
object->getMinMembers()) {
1298 $this->
lng->txt(
"mem_min_users"),
1299 (string) $this->
object->getMinMembers()
1302 if ($this->
object->getMaxMembers()) {
1306 $this->
lng->txt(
'mem_free_places'),
1307 (string) ($reg_info[
'reg_info_free_places'] ??
'0')
1312 if ($this->
object->getCancellationEnd()) {
1314 $this->
lng->txt(
'grp_cancellation_end'),
1321 !$this->
object->getStart()->isNull()
1324 $this->
lng->txt(
'grp_period'),
1326 $this->
object->getStart(),
1327 $this->
object->getEnd()
1338 $this->
lng->loadLanguageModule(
'ps');
1339 $info->addSection($this->
lng->txt(
'grp_user_agreement_info'));
1340 $info->addProperty($this->
lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
1343 $info->addProperty($this->
lng->txt(
'ps_grp_user_fields'), $fields);
1356 $grp_notification =
false;
1357 if ($this->
http->wrapper()->query()->has(
'grp_ntf')) {
1358 $grp_notification = $this->
http->wrapper()->query()->retrieve(
1360 $this->
refinery->kindlyTo()->bool()
1364 if ($noti->canCurrentUserEdit()) {
1365 if ($grp_notification) {
1366 $noti->activateUser();
1368 $noti->deactivateUser();
1371 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1372 $this->
ctrl->redirect($this,
"");
1377 $this->
ctrl->redirectByClass(
'ilgroupmembershipgui');
1381 public static function _goto(
string $a_target,
string $a_add =
""): void
1384 $main_tpl = $DIC->ui()->mainTemplate();
1385 $a_target = (
int) $a_target;
1387 $ilUser = $DIC->user();
1388 $ilAccess = $DIC->access();
1389 $lng = $DIC->language();
1391 $http = $DIC->http();
1392 $refinery = $DIC->refinery();
1395 if (
$http->wrapper()->query()->has(
'target')) {
1396 $target =
$http->wrapper()->query()->retrieve(
1401 if (substr($a_add, 0, 5) ==
'rcode') {
1405 "login.php?target=" . $target .
"&cmd=force_login&lang=" .
1406 $ilUser->getCurrentLanguage()
1418 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
1426 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1430 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1434 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1435 $lng->
txt(
"msg_no_perm_read_item"),
1451 if (!$a_omit_form_action) {
1465 $this->initFormTitleDescription(
$form);
1469 if ($a_mode ==
'edit') {
1472 $this->
lng->loadLanguageModule(
'mem');
1473 $cdur->enableToggleFullTime(
1474 $this->
lng->txt(
'mem_period_without_time'),
1475 !$this->
object->getStartTimeIndication()
1477 $cdur->setShowTime(
true);
1478 $cdur->setInfo($this->
lng->txt(
'grp_period_info'));
1479 $cdur->setStart($this->
object->getStart());
1480 $cdur->setEnd($this->
object->getEnd());
1484 $this->
lng->loadLanguageModule(
'rep');
1487 $section->setTitle($this->
lng->txt(
'rep_activation_availability'));
1491 $online->setChecked(!$this->
object->getOfflineStatus());
1492 $online->setInfo($this->
lng->txt(
'grp_activation_online_info'));
1498 $pres->setTitle($this->
lng->txt(
'grp_setting_header_registration'));
1503 $reg_type->
setValue((
string) $this->
object->getRegistrationType());
1506 $this->
lng->txt(
'grp_reg_direct'),
1508 );#$this->
lng->txt(
'grp_reg_direct_info'));
1509 $reg_type->addOption($opt_dir);
1512 $this->
lng->txt(
'grp_pass_request'),
1516 $pass->setRequired(
true);
1517 $pass->setInfo($this->
lng->txt(
'grp_reg_password_info'));
1518 $pass->setValue($this->
object->getPassword());
1520 $pass->setMaxLength(32);
1521 $opt_pass->addSubItem($pass);
1522 $reg_type->addOption($opt_pass);
1525 $reg_type->addOption($opt_req);
1528 $reg_type->addOption($opt_deact);
1532 $reg_code->setChecked($this->
object->isRegistrationAccessCodeEnabled());
1533 $reg_code->setValue(
'1');
1534 $reg_code->setInfo($this->
lng->txt(
'grp_reg_code_enabled_info'));
1538 if (!$this->
object->getRegistrationAccessCode()) {
1542 $reg_link->setValue($this->
object->getRegistrationAccessCode());
1546 $val = ilLink::_getLink($this->
object->getRefId(), $this->
object->getType(), array(),
'rcode' . $this->
object->getRegistrationAccessCode());
1547 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1548 $reg_code->addSubItem($link);
1552 $this->
lng->loadLanguageModule(
'dateplaner');
1554 $dur->setShowTime(
true);
1555 $dur->setStart($this->
object->getRegistrationStart());
1556 $dur->setEnd($this->
object->getRegistrationEnd());
1561 $cancel->
setInfo($this->
lng->txt(
'grp_cancellation_end_info'));
1562 $cancel->setDate($this->
object->getCancellationEnd());
1566 $lim =
new ilCheckboxInputGUI($this->
lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
1567 $lim->setValue(
'1');
1569 $lim->setChecked($this->
object->isMembershipLimited());
1571 $min =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_min_members'),
'registration_min_members');
1573 $min->setMaxLength(4);
1574 $min->setValue($this->
object->getMinMembers() ?:
'');
1575 $min->setInfo($this->
lng->txt(
'grp_subscription_min_members_info'));
1576 $lim->addSubItem($min);
1578 $max =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_max_members'),
'registration_max_members');
1579 $max->setValue($this->
object->getMaxMembers() ?:
'');
1582 $max->setMaxLength(4);
1583 $max->setInfo($this->
lng->txt(
'grp_reg_max_members_info'));
1584 $lim->addSubItem($max);
1599 $wait->addOption($option);
1601 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_no_autofill'),
'1');
1602 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_info'));
1603 $wait->addOption($option);
1605 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_autofill'),
'2');
1606 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_autofill_info'));
1607 $wait->addOption($option);
1609 if ($this->
object->hasWaitingListAutoFill()) {
1610 $wait->setValue(
'2');
1611 } elseif ($this->
object->isWaitingListEnabled()) {
1612 $wait->setValue(
'1');
1614 $wait->setValue(
'0');
1617 $lim->addSubItem($wait);
1623 $parent_membership_ref_id = 0;
1624 $hasParentMembership =
1626 $parent_membership_ref_id = $this->tree->checkForParentType($this->
object->getRefId(),
'crs',
true)
1630 $pres->setTitle($this->
lng->txt(
'grp_setting_header_presentation'));
1634 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1637 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1640 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1643 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1651 if ($hasParentMembership) {
1653 $course_view_mode =
'';
1654 switch ($parent_view_mode) {
1656 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_sessions');
1660 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_simple');
1664 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_by_type');
1667 if ($course_view_mode) {
1669 $opt->setInfo($this->
lng->txt(
'grp_view_inherit_info'));
1670 $view_type->addOption($opt);
1681 $opt->setInfo($this->
lng->txt(
'cntr_view_info_sessions'));
1682 $view_type->addOption($opt);
1685 $this->
lng->loadLanguageModule(
'crs');
1687 $sess->setValue(
'1');
1688 $sess->setChecked($this->
object->isSessionLimitEnabled());
1689 $sess->setInfo($this->
lng->txt(
'sess_limit_info'));
1693 $prev->setValue((
string) (
1694 $this->
object->getNumberOfPreviousSessions() == -1 ?
1696 $this->
object->getNumberOfPreviousSessions()
1699 $prev->setMaxLength(3);
1700 $sess->addSubItem($prev);
1704 $next->setValue((
string) (
1705 $this->
object->getNumberOfNextSessions() == -1 ?
1707 $this->
object->getNumberOfNextSessions()
1710 $next->setMaxLength(3);
1711 $sess->addSubItem($next);
1712 $opt->addSubItem($sess);
1715 $opt->setInfo($this->
lng->txt(
'grp_view_info_simple'));
1716 $view_type->addOption($opt);
1719 $opt->setInfo($this->
lng->txt(
'grp_view_info_by_type'));
1720 $view_type->addOption($opt);
1725 $sorting_settings = array();
1726 if ($hasParentMembership) {
1736 $feat->setTitle($this->
lng->txt(
'obj_features'));
1747 $mem->setChecked($this->
object->getShowMembers());
1748 $mem->setInfo($this->
lng->txt(
'grp_show_members_info'));
1753 $mail_type->
setValue((
string) $this->
object->getMailToMembersType());
1756 $this->
lng->txt(
'grp_mail_tutors_only'),
1758 $this->
lng->txt(
'grp_mail_tutors_only_info')
1760 $mail_type->addOption($mail_tutors);
1763 $this->
lng->txt(
'grp_mail_all'),
1765 $this->
lng->txt(
'grp_mail_all_info')
1767 $mail_type->addOption($mail_all);
1772 $not->setValue(
'1');
1773 $not->setInfo($this->
lng->txt(
'grp_auto_notification_info'));
1774 $not->setChecked($this->
object->getAutoNotification());
1793 $ecs->addSettingsToForm(
$form,
'grp');
1806 $this->tabs_gui->addSubTabTarget(
1808 $this->
ctrl->getLinkTarget($this,
'edit'),
1813 $this->tabs_gui->addSubTabTarget(
1814 "grp_info_settings",
1815 $this->
ctrl->getLinkTarget($this,
'editInfo'),
1821 $this->tabs_gui->addSubTabTarget(
1823 $this->
ctrl->getLinkTarget($this,
'editMapSettings'),
1829 $this->tabs_gui->addSubTabTarget(
1831 $this->
ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1838 $this->tabs_gui->addSubTabTarget(
1839 'grp_custom_user_fields',
1840 $this->
ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1842 'ilobjectcustomuserfieldsgui' 1847 if ($this->
object->getUseNews()) {
1848 $this->tabs_gui->addSubTab(
1849 'obj_news_settings',
1850 $this->
lng->txt(
"cont_news_settings"),
1851 $this->
ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1856 if ($lti_settings->hasSettingsAccess()) {
1857 $this->tabs_gui->addSubTabTarget(
1859 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1863 $this->tabs_gui->addSubTabTarget(
1864 "obj_multilinguality",
1865 $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
""),
1867 TranslationGUI::class
1877 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1882 if (!$this->
object->members_obj->isAssigned($this->user->getId())) {
1909 return parent::prepareOutput($show_subobjects);
1914 $link = chr(13) . chr(10) . chr(13) . chr(10);
1915 $link .= $this->
lng->txt(
'grp_mail_permanent_link');
1916 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1917 $link .= ilLink::_getLink($this->
object->getRefId());
1918 return rawurlencode(base64_encode($link));
1929 $ilUser = $DIC[
'ilUser'];
1931 $lg = parent::initHeaderAction($sub_type, $sub_id);
1936 if (!$noti->isCurrentUserActive()) {
1940 $this->
lng->txt(
"grp_notification_deactivated")
1943 $this->
ctrl->setParameter($this,
"grp_ntf", 1);
1944 $caption =
"grp_activate_notification";
1949 $this->
lng->txt(
"grp_notification_activated")
1952 $this->
ctrl->setParameter($this,
"grp_ntf", 0);
1953 $caption =
"grp_deactivate_notification";
1956 if ($noti->canCurrentUserEdit()) {
1957 $lg->addCustomCommand(
1958 $this->
ctrl->getLinkTarget($this,
"saveNotification"),
1963 $this->
ctrl->setParameter($this,
"grp_ntf",
"");
1976 $res_data = array();
1977 foreach ($a_data as $usr_id => $user_data) {
1978 $res_data[$usr_id] = $user_data;
1982 foreach ($udf_data->getAll() as $field => $value) {
1983 list(
$f, $field_id) = explode(
'_', $field);
1984 $res_data[$usr_id][
'udf_' . $field_id] = (string) $value;
1987 foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1988 $res_data[$usr_id][
'cdf_' . $cdf_field] = (string) $cdf_value;
1997 $local_roles = $this->
object->getLocalGroupRoles();
1998 $grp_member = $this->
object->getDefaultMemberRole();
1999 $grp_roles = array();
2002 if (in_array($grp_member, $local_roles)) {
2004 unset($local_roles[$grp_roles[$grp_member]]);
2007 foreach ($local_roles as $title => $role_id) {
2015 $this->
ctrl->redirectByClass(
'ilUsersGalleryGUI');
2023 $this->
ctrl->setReturn($this,
"view");
static handleCode(int $a_ref_id, string $a_type, string $a_code)
static lookupRegistrationInfo(int $a_obj_id)
This class represents an option in a radio group.
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
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
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)
GUI class for object translation handling.
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 _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='')
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)
Skills for container (course/group) (top gui class)
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)
__construct(Container $dic, ilPlugin $plugin)
const LP_CONTEXT_REPOSITORY
This class represents a text area property in a property form.
Class ilCourseContentGUI.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
setInfoObject(ilInfoScreenGUI $info)
get info sections
ILIAS Container InternalGUIService $gui
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 _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _isOnList(int $a_usr_id, int $a_obj_id)
language()
description: > Example for rendring a language glyph.
GUI class for service settings (calendar, notes, comments)
static _hasAccepted(int $a_usr_id, int $a_obj_id)
Check if user has accepted agreement.
editObject(?ilPropertyFormGUI $a_form=null)
readMemberData(array $ids, ?array $selected_columns=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)
Membership notification settings.
static _fieldsToInfoString(int $a_obj_id)
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
Class ilObjUserTrackingGUI.
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
const CALENDAR_CONFIGURATION
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
addCustomData(array $a_data)
prepareOutput(bool $show_subobjects=true)