3 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');
65 $this->
http = $DIC->http();
67 $this->rbacsystem = $DIC->rbac()->system();
68 $this->news = $DIC->news();
73 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
74 return $this->
http->wrapper()->query()->retrieve(
89 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
93 $next_class = $this->
ctrl->getNextClass($this);
94 $cmd = $this->
ctrl->getCmd();
99 $ilNavigationHistory->addItem(
107 if ($next_class ==
"" && $cmd ==
"" && $this->
object->isNewsTimelineLandingPageEffective()
109 $this->
ctrl->redirectByClass(
"ilnewstimelinegui");
112 $header_action =
true;
113 switch ($next_class) {
114 case strtolower(ilRepositoryTrashGUI::class):
115 $ru = new \ilRepositoryTrashGUI($this);
116 $this->
ctrl->setReturn($this,
'trash');
117 $this->
ctrl->forwardCommand($ru);
120 case 'illtiproviderobjectsettinggui':
122 $this->tabs_gui->activateTab(
'settings');
123 $this->tabs_gui->activateSubTab(
'lti_provider');
126 $lti_gui->offerLTIRolesForSelection(
false);
127 $this->
ctrl->forwardCommand($lti_gui);
131 case 'ilgroupmembershipgui':
133 $this->tabs_gui->activateTab(
'members');
136 $this->
ctrl->forwardCommand($mem_gui);
140 case 'ilgroupregistrationgui':
141 $this->
ctrl->setReturn($this,
'');
142 $this->tabs_gui->setTabActive(
'join');
144 $this->
ctrl->forwardCommand($registration);
147 case 'ilpermissiongui':
148 $this->tabs_gui->activateTab(
'perm_settings');
150 $this->
ctrl->forwardCommand($perm_gui);
153 case "ilinfoscreengui":
157 case "illearningprogressgui":
158 $user_id = $this->
user->getId();
159 if ($this->
http->wrapper()->query()->has(
'user_id')) {
160 $user_id = $this->
http->wrapper()->query()->retrieve(
167 $this->
object->getRefId(),
170 $this->
ctrl->forwardCommand($new_gui);
171 $this->tabs_gui->setTabActive(
'learning_progress');
174 case 'ilobjcoursegroupinggui':
176 $this->
ctrl->setReturn($this,
'edit');
178 if ($this->
http->wrapper()->query()->has(
'obj_id')) {
179 $obj_id = $this->
http->wrapper()->query()->retrieve(
185 $this->
ctrl->forwardCommand($crs_grp_gui);
186 $this->tabs_gui->setTabActive(
'settings');
187 $this->tabs_gui->setSubTabActive(
'groupings');
190 case 'ilcoursecontentgui':
192 $this->
ctrl->forwardCommand($course_content_obj);
195 case 'ilpublicuserprofilegui':
197 $this->tabs_gui->setTabActive(
'group_members');
198 $this->tabs_gui->setSubTabActive(
'grp_members_gallery');
200 if ($this->
http->wrapper()->query()->has(
'user')) {
201 $usr_id = $this->
http->wrapper()->query()->retrieve(
208 if ($this->
http->wrapper()->query()->has(
'back_url')) {
209 $back_url = $this->
http->wrapper()->query()->retrieve(
211 $this->
refinery->kindlyTo()->string()
214 if ($back_url ==
'') {
215 $profile_gui->setBackUrl($this->
ctrl->getLinkTargetByClass([
"ilGroupMembershipGUI",
"ilUsersGalleryGUI"],
'view'));
217 $html = $this->
ctrl->forwardCommand($profile_gui);
218 $this->tpl->setVariable(
"ADM_CONTENT",
$html);
222 $this->tabs_gui->setTabActive(
'none');
224 $this->tpl->setVariable(
225 "LOCATION_CONTENT_STYLESHEET",
232 case "ilcontainerpagegui":
235 $this->tpl->setContent($ret);
237 $header_action =
false;
240 case 'ilobjectcopygui':
243 $this->
ctrl->forwardCommand($cp);
246 case "ilobjectcontentstylesettingsgui":
252 $settings_gui = $DIC->contentStyle()->gui()
253 ->objectSettingsGUIForRefId(
257 $this->
ctrl->forwardCommand($settings_gui);
260 case 'ilobjectcustomuserfieldsgui':
263 $this->tabs_gui->setTabActive(
'settings');
264 $this->tabs_gui->activateSubTab(
'grp_custom_user_fields');
265 $this->
ctrl->forwardCommand($cdf_gui);
268 case 'ilmemberagreementgui':
269 $this->
ctrl->setReturn($this,
'');
270 $this->tabs_gui->setTabActive(
'view_content');
272 $this->
ctrl->forwardCommand($agreement);
276 $this->tabs_gui->setTabActive(
'export');
278 $exp->addFormat(
'xml');
279 $this->
ctrl->forwardCommand($exp);
282 case "ilcommonactiondispatchergui":
284 $this->
ctrl->forwardCommand($gui);
287 case 'ilobjectservicesettingsgui':
288 $this->
ctrl->setReturn($this,
'edit');
290 $this->tabs_gui->activateTab(
'settings');
291 $this->tabs_gui->activateSubTab(
'tool_settings');
303 case 'ilmailmembersearchgui':
306 if (!($this->
access->checkAccess(
'manage_members',
'', $this->object->getRefId()) ||
308 $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId())) {
309 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
312 $this->tabs_gui->setTabActive(
'members');
317 $this->
ctrl->forwardCommand($mail_search);
320 case 'ilbadgemanagementgui':
321 $this->tabs_gui->setTabActive(
'obj_tool_setting_badges');
323 $this->
ctrl->forwardCommand($bgui);
326 case "ilcontainernewssettingsgui":
328 $this->tabs_gui->setTabActive(
'settings');
329 $this->tabs_gui->activateSubTab(
'obj_news_settings');
331 $news_set_gui->setTimeline(
true);
332 $news_set_gui->setCronNotifications(
true);
333 $news_set_gui->setHideByDate(
true);
334 $this->
ctrl->forwardCommand($news_set_gui);
337 case "ilnewstimelinegui":
339 $this->tabs_gui->setTabActive(
'news_timeline');
341 $t->setUserEditAll($this->
access->checkAccess(
'write',
'', $this->object->getRefId(),
'grp'));
343 $this->
ctrl->forwardCommand($t);
345 $this->
user->getId(),
346 $this->
object->getId(),
347 $this->
object->getRefId(),
352 case "ilcontainerskillgui":
353 $this->tabs_gui->activateTab(
'obj_tool_setting_skills');
355 $this->
ctrl->forwardCommand($gui);
358 case 'ilcalendarpresentationgui':
360 $this->
ctrl->forwardCommand($cal);
363 case 'ilobjectmetadatagui':
364 if (!$this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
365 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
367 $this->tabs_gui->activateTab(
'meta_data');
372 case 'ilobjecttranslationgui':
375 $this->
tabs->activateTab(
"settings");
377 $this->
ctrl->forwardCommand($transgui);
384 !$this->
access->checkAccess(
'visible',
'', $this->object->getRefId(),
'grp') and
385 !$this->
access->checkAccess(
'read',
'', $this->object->getRefId(),
'grp')) {
386 $this->error->raiseError($this->
lng->txt(
"msg_no_perm_read"), $this->error->MESSAGE);
390 if ($cmd ==
'infoScreenGoto') {
391 if ($this->
object->isRegistrationEnabled()) {
400 && !$this->rbacsystem->checkAccess(
'read', $this->object->getRefId()) && $cmd !=
'infoScreen')
402 || $cmd ===
'leaveWaitList') {
404 if (!$this->rbacsystem->checkAccess(
'join', $this->object->getRefId())) {
405 $this->
ctrl->redirect($this,
"infoScreen");
407 $this->
ctrl->redirectByClass(
"ilGroupRegistrationGUI",
"show");
418 if ($header_action) {
429 $this->
user->getId(),
430 $this->
object->getId(),
431 $this->
object->getRefId(),
437 $this->
object->getId(),
441 if ($this->
getAdminMode() === self::ADMIN_MODE_SETTINGS) {
442 parent::viewObject();
447 $this->tabs_gui->setTabActive(
'view_content');
448 $this->
ctrl->setReturn($this,
'view');
450 $this->
ctrl->setCmdClass(get_class($agreement));
451 $this->
ctrl->forwardCommand($agreement);
455 $this->tabs_gui->setTabActive(
'view_content');
461 $this->
tabs->activateTab(
"view_content");
462 parent::renderObject();
471 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(),
'crs')) {
475 'ilcoursecontentgui',
492 $new_object->setRegistrationType(
500 $this->tree->checkForParentType($new_object->
getRefId(),
'crs',
true) ||
501 $this->tree->checkForParentType($new_object->
getRefId(),
'grp',
true)
515 $members_obj->updateNotification($this->
user->getId(), (bool) $this->
settings->get(
'mail_grp_admin_notification',
'1'));
516 $members_obj->updateContact($this->
user->getId(),
true);
518 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_added"),
true);
520 $this->
ctrl->setParameter($this,
"ref_id", $new_object->
getRefId());
521 $this->
ctrl->redirect($this,
'edit');
533 $this->tabs_gui->setTabActive(
'settings');
534 $this->tabs_gui->setSubTabActive(
'grp_settings');
539 $this->tpl->setVariable(
'ADM_CONTENT', $a_form->getHTML());
545 $this->
object->getRefId(),
546 (
int) $_REQUEST[
'grp_type']
549 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'),
true);
550 $this->
ctrl->redirect($this,
'edit');
567 if ($new_type_info) {
569 $new_type = (
int) $new_type[1];
571 $modified = ($new_type !== $old_type);
580 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'crs_tile_and_session_limit_not_supported'));
585 $old_autofill = $this->
object->hasWaitingListAutoFill();
589 $this->
object->setGroupType((
int)
$form->
getInput(
'grp_type'));
590 $this->
object->setRegistrationType((
int)
$form->
getInput(
'registration_type'));
592 $this->
object->enableUnlimitedRegistration(!
$form->
getInput(
'reg_limit_time'));
593 $this->
object->enableMembershipLimitation((
bool)
$form->
getInput(
'registration_membership_limited'));
594 $this->
object->setMinMembers((
int)
$form->
getInput(
'registration_min_members'));
595 $this->
object->setMaxMembers((
int)
$form->
getInput(
'registration_max_members'));
596 $this->
object->enableRegistrationAccessCode((
bool)
$form->
getInput(
'reg_code_enabled'));
597 $this->
object->setRegistrationAccessCode(
$form->
getInput(
'reg_code'));
598 $this->
object->setViewMode((
int)
$form->
getInput(
'view_mode'));
599 $this->
object->setMailToMembersType((
int)
$form->
getInput(
'mail_type'));
600 $this->
object->setShowMembers((
bool)
$form->
getInput(
'show_members'));
601 $this->
object->setAutoNotification((
bool)
$form->
getInput(
'auto_notification'));
604 $this->
object->enableSessionLimit((
bool)
$form->
getInput(
'sl'));
606 $this->
object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (
int) $session_sp : -1);
608 $this->
object->setNumberOfnextSessions(is_numeric($session_sn) ? (
int) $session_sn : -1);
612 $this->
object->setPeriod(
613 $grp_period->getStart(),
614 $grp_period->getEnd()
619 $this->
object->enableUnlimitedRegistration(
false);
621 $this->
object->enableUnlimitedRegistration(
true);
624 $this->
object->setRegistrationStart($reg->getStart());
625 $this->
object->setRegistrationEnd($reg->getEnd());
628 $this->
object->setCancellationEnd($cancel_end->getDate());
631 if ($this->
http->wrapper()->post()->has(
'waiting_list')) {
632 $waiting_list = $this->
http->wrapper()->post()->retrieve(
637 switch ($waiting_list) {
639 $this->
object->enableWaitingList(
true);
640 $this->
object->setWaitingListAutoFill(
true);
644 $this->
object->enableWaitingList(
true);
645 $this->
object->setWaitingListAutoFill(
false);
649 $this->
object->enableWaitingList(
false);
650 $this->
object->setWaitingListAutoFill(
false);
655 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTitleIconVisibility();
658 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTopActionsVisibility();
661 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveIcon();
664 $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->saveTileImage();
670 $this->
object->update();
684 $this->
object->hasWaitingListAutoFill()) {
685 $this->
object->handleAutoFill();
691 $this->
user->getId(),
698 $ecs->handleSettingsUpdate();
700 $this->tpl->setOnScreenMessage(
'failure',
$GLOBALS[
'DIC']->
language()->txt(
'err_check_input'));
709 if ($new_type == 0) {
710 $new_type_txt =
$GLOBALS[
'DIC'][
'lng']->txt(
'il_grp_status_open');
713 $new_type_txt = $dtpl->getPresentationTitle(
$GLOBALS[
'DIC'][
'lng']->getLangKey());
718 $confirm->setHeaderText($this->
lng->txt(
'grp_warn_grp_type_changed'));
719 $confirm->setFormAction($this->
ctrl->getFormAction($this));
723 $this->
lng->txt(
'grp_info_new_grp_type') .
': ' . $new_type_txt
725 $confirm->setConfirm($this->
lng->txt(
'grp_change_type'),
'updateGroupType');
726 $confirm->setCancel($this->
lng->txt(
'cancel'),
'edit');
728 $this->tpl->setContent($confirm->getHTML());
730 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
731 $this->
ctrl->redirect($this,
'edit');
747 if ($this->news->isGloballyActivated()) {
760 $this->tabs_gui->setTabActive(
'settings');
761 $this->tabs_gui->setSubTabActive(
'grp_map_settings');
764 !$this->
access->checkAccess(
"write",
"", $this->object->getRefId())) {
768 $latitude = $this->
object->getLatitude();
769 $longitude = $this->
object->getLongitude();
770 $zoom = $this->
object->getLocationZoom();
773 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
775 $latitude = $def[
"latitude"];
776 $longitude = $def[
"longitude"];
777 $zoom = $def[
"zoom"];
788 $this->
lng->txt(
"grp_enable_map"),
792 $public->setChecked($this->
object->getEnableGroupMap());
797 $this->
lng->txt(
"grp_map_location"),
801 $loc_prop->setLongitude((
float) $longitude);
802 $loc_prop->setZoom((
int) $zoom);
807 $this->tpl->setVariable(
"ADM_CONTENT",
$form->
getHTML());
816 if ($this->
http->wrapper()->post()->has(
'location')) {
817 $custom_transformer = $this->
refinery->custom()->transformation(
828 if ($this->
http->wrapper()->post()->has(
'enable_map')) {
829 $enable_map = $this->
http->wrapper()->post()->retrieve(
835 $this->
object->setLatitude((
string)
$location[
'latitude']);
836 $this->
object->setLongitude((
string) $location[
'longitude']);
837 $this->
object->setLocationZoom((
int) $location[
'zoom']);
838 $this->
object->setEnableGroupMap($enable_map);
839 $this->
object->update();
840 $this->
ctrl->redirect($this,
"editMapSettings");
850 $this->tabs_gui->setTabActive(
'settings');
851 $this->tabs_gui->setSubTabActive(
'grp_info_settings');
866 $area->
setInfo($this->
lng->txt(
'grp_information_info'));
867 $area->setValue($this->
object->getInformation());
880 if ($this->
http->wrapper()->post()->has(
'important')) {
881 $important = $this->
http->wrapper()->post()->retrieve(
883 $this->
refinery->kindlyTo()->string()
886 $this->
object->setInformation($important);
887 $this->
object->update();
888 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"));
892 public function readMemberData(array $ids, array $selected_columns = null): array
896 $this->show_tracking =
901 $completed = $in_progress = $failed = [];
902 if ($this->show_tracking) {
904 $this->show_tracking = $olp->isActive();
907 if ($this->show_tracking) {
913 if ($privacy->enabledGroupAccessTimes()) {
917 $do_prtf = (is_array($selected_columns) &&
918 in_array(
'prtf', $selected_columns) &&
923 $this->
ctrl->getLinkTarget($this,
"members")
934 foreach ($ids as $usr_id) {
935 $tmp_data[
'notification'] = (bool) $this->
object->members_obj->isNotificationEnabled((
int) $usr_id) ? 1 : 0;
936 $tmp_data[
'contact'] = (bool) $this->
object->members_obj->isContact((
int) $usr_id) ? 1 : 0;
938 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
939 $tmp_data[$field] = $value;
942 if ($this->show_tracking) {
943 $tmp_data[
'progress'] =
'';
944 if (in_array($usr_id, $completed)) {
946 } elseif (in_array($usr_id, $in_progress)) {
948 } elseif (in_array($usr_id, $failed)) {
955 if ($privacy->enabledGroupAccessTimes()) {
956 if (isset($progress[$usr_id][
'ts']) && ($progress[$usr_id][
'ts'] ??
false)) {
960 $tmp_data[
'access_time_unix'] = $tmp_date->get(
IL_CAL_UNIX);
962 $tmp_data[
'access_time'] = $this->
lng->txt(
'no_date');
963 $tmp_data[
'access_time_unix'] = 0;
966 $tmp_data[
'prtf'] = [];
968 $tmp_data[
'prtf'] = ($all_prtf[$usr_id] ?? []);
970 $members[$usr_id] = $tmp_data;
980 if ($part->isLastAdmin($this->user->getId())) {
981 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'grp_err_administrator_required'));
986 $this->tabs_gui->setTabActive(
'grp_btn_unsubscribe');
989 $cgui->setHeaderText($this->
lng->txt(
'grp_dismiss_myself'));
990 $cgui->setFormAction($this->
ctrl->getFormAction($this));
991 $cgui->setCancel($this->
lng->txt(
"cancel"),
"cancel");
992 $cgui->setConfirm($this->
lng->txt(
"grp_btn_unsubscribe"),
"unsubscribe");
993 $this->tpl->setContent($cgui->getHTML());
999 $this->
object->members_obj->delete($this->
user->getId());
1000 $this->
object->members_obj->sendNotification(
1002 $this->
user->getId()
1004 $this->
object->members_obj->sendNotification(
1006 $this->
user->getId()
1009 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'grp_msg_membership_annulled'),
true);
1010 $this->
ctrl->setParameterByClass(
1013 $this->tree->getParentId($this->object->getRefId())
1015 $this->
ctrl->redirectByClass(
"ilrepositorygui",
"");
1020 $this->tabs_gui->addTab(
1022 $this->
lng->txt(
"content"),
1023 $this->
ctrl->getLinkTarget($this,
"view")
1034 $ilHelp = $DIC[
'ilHelp'];
1035 $ilHelp->setScreenIdComponent(
"grp");
1037 if ($this->
access->checkAccess(
'read',
'', $this->ref_id)) {
1038 if ($this->
object->isNewsTimelineEffective()) {
1039 if (!$this->
object->isNewsTimelineLandingPageEffective()) {
1042 $this->tabs_gui->addTab(
1044 $this->
lng->txt(
"cont_news_timeline_tab"),
1045 $this->
ctrl->getLinkTargetByClass(
"ilnewstimelinegui",
"show")
1047 if ($this->
object->isNewsTimelineLandingPageEffective()) {
1055 $this->
access->checkAccess(
'visible',
'', $this->ref_id) ||
1056 $this->
access->checkAccess(
'join',
'', $this->ref_id) ||
1057 $this->
access->checkAccess(
'read',
'', $this->ref_id)
1059 $this->tabs_gui->addTarget(
1061 $this->
ctrl->getLinkTargetByClass(
1062 array(
"ilobjgroupgui",
"ilinfoscreengui"),
1073 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1074 $this->tabs_gui->addTarget(
1076 $this->
ctrl->getLinkTarget($this,
"edit"),
1077 array(
"edit",
"editMapSettings"),
1087 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1091 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1093 $this->tabs_gui->addTarget(
1094 "obj_tool_setting_badges",
1095 $this->
ctrl->getLinkTargetByClass(
"ilbadgemanagementgui",
""),
1097 "ilbadgemanagementgui" 1108 $this->tabs_gui->addTarget(
1109 "obj_tool_setting_skills",
1110 $this->
ctrl->getLinkTargetByClass(array(
"ilcontainerskillgui",
"ilcontskillpresentationgui"),
""),
1112 array(
"ilcontainerskillgui",
"ilcontskillpresentationgui",
"ilcontskilladmingui")
1118 $this->tabs_gui->addTarget(
1119 'learning_progress',
1120 $this->
ctrl->getLinkTargetByClass(array(
'ilobjgroupgui',
'illearningprogressgui'),
''),
1122 array(
'illplistofobjectsgui',
'illplistofsettingsgui',
'illearningprogressgui',
'illplistofprogressgui')
1127 if ($this->
access->checkAccess(
'write',
'', $this->ref_id)) {
1129 $tab_link = $md_gui->getTab();
1130 if ($tab_link !== null) {
1131 $this->tabs_gui->addTab(
1133 $this->
lng->txt(
'meta_data'),
1141 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1142 $this->tabs_gui->addTarget(
1144 $this->
ctrl->getLinkTargetByClass(
'ilexportgui',
''),
1153 if ($this->
access->checkAccess(
'join',
'', $this->object->getRefId()) and
1154 !$this->
object->members_obj->isAssigned($this->user->getId())) {
1156 $this->tabs_gui->addTab(
1158 $this->
lng->txt(
'membership_leave'),
1159 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
'show',
'')
1162 $this->tabs_gui->addTarget(
1164 $this->
ctrl->getLinkTargetByClass(
'ilgroupregistrationgui',
"show"),
1170 if ($this->
access->checkAccess(
'leave',
'', $this->object->getRefId()) and
1171 $this->
object->members_obj->isMember($this->user->getId())) {
1172 $this->tabs_gui->addTarget(
1173 "grp_btn_unsubscribe",
1174 $this->
ctrl->getLinkTarget($this,
"leave"),
1183 $this->
ctrl->setCmd(
"showSummary");
1184 $this->
ctrl->setCmdClass(
"ilinfoscreengui");
1190 $this->tabs_gui->setTabActive(
'info_short');
1198 $this->
object->getId(),
1204 if (strlen($this->
object->getInformation())) {
1205 $info->addSection($this->
lng->txt(
'grp_general_informations'));
1206 $info->addProperty($this->
lng->txt(
'grp_information'), nl2br(
1211 $info->enablePrivateNotes();
1212 $info->enableLearningProgress(
true);
1216 $record_gui->parse();
1219 $info->addMetaDataSections($this->
object->getId(), 0, $this->
object->getType());
1224 $contacts =
$parts->getContacts();
1225 if (count($contacts) > 0) {
1226 $info->addSection($this->
lng->txt(
"grp_mem_contacts"));
1227 foreach ($contacts as
$c) {
1229 $pgui->setBackUrl($this->
ctrl->getLinkTargetByClass(
"ilinfoscreengui"));
1230 $pgui->setEmbedded(
true);
1231 $info->addProperty(
"", $pgui->getHTML());
1236 $info->addSection($this->
lng->txt(
'group_registration'));
1237 $info->showLDAPRoleGroupMappingInfo();
1239 if (!$this->
object->isRegistrationEnabled()) {
1241 $this->
lng->txt(
'group_registration_mode'),
1242 $this->
lng->txt(
'grp_reg_deac_info_screen')
1245 switch ($this->
object->getRegistrationType()) {
1248 $this->
lng->txt(
'group_registration_mode'),
1249 $this->
lng->txt(
'grp_reg_direct_info_screen')
1255 $this->
lng->txt(
'group_registration_mode'),
1256 $this->
lng->txt(
'grp_reg_req_info_screen')
1262 $this->
lng->txt(
'group_registration_mode'),
1263 $this->
lng->txt(
'grp_reg_passwd_info_screen')
1274 if ($this->
object->isRegistrationUnlimited()) {
1276 $this->
lng->txt(
'group_registration_time'),
1277 $this->
lng->txt(
'grp_registration_unlimited')
1279 } elseif ($this->
object->getRegistrationStart()->getUnixTime() < time()) {
1281 $this->
lng->txt(
"group_registration_time"),
1282 $this->
lng->txt(
'cal_until') .
' ' .
1285 } elseif ($this->
object->getRegistrationStart()->getUnixTime() >= time()) {
1287 $this->
lng->txt(
"group_registration_time"),
1288 $this->
lng->txt(
'cal_from') .
' ' .
1292 if ($this->
object->isMembershipLimited()) {
1293 if ($this->
object->getMinMembers()) {
1295 $this->
lng->txt(
"mem_min_users"),
1296 (string) $this->
object->getMinMembers()
1299 if ($this->
object->getMaxMembers()) {
1303 $this->
lng->txt(
'mem_free_places'),
1304 (string) ($reg_info[
'reg_info_free_places'] ??
'0')
1309 if ($this->
object->getCancellationEnd()) {
1311 $this->
lng->txt(
'grp_cancellation_end'),
1318 !$this->
object->getStart()->isNull()
1321 $this->
lng->txt(
'grp_period'),
1323 $this->
object->getStart(),
1324 $this->
object->getEnd()
1335 $this->
lng->loadLanguageModule(
'ps');
1336 $info->addSection($this->
lng->txt(
'grp_user_agreement_info'));
1337 $info->addProperty($this->
lng->txt(
'ps_export_data'), $field_info->exportableFieldsToInfoString());
1340 $info->addProperty($this->
lng->txt(
'ps_grp_user_fields'), $fields);
1346 $this->
ctrl->forwardCommand($info);
1353 $grp_notification =
false;
1354 if ($this->
http->wrapper()->query()->has(
'grp_ntf')) {
1355 $grp_notification = $this->
http->wrapper()->query()->retrieve(
1357 $this->
refinery->kindlyTo()->bool()
1361 if ($noti->canCurrentUserEdit()) {
1362 if ($grp_notification) {
1363 $noti->activateUser();
1365 $noti->deactivateUser();
1368 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"settings_saved"),
true);
1369 $this->
ctrl->redirect($this,
"");
1374 $this->
ctrl->redirectByClass(
'ilgroupmembershipgui');
1378 public static function _goto(
int $a_target,
string $a_add =
""): void
1381 $main_tpl = $DIC->ui()->mainTemplate();
1384 $ilAccess = $DIC->access();
1385 $lng = $DIC->language();
1387 $http = $DIC->http();
1388 $refinery = $DIC->refinery();
1391 if ($http->
wrapper()->query()->has(
'target')) {
1392 $target = $http->
wrapper()->query()->retrieve(
1397 if (substr($a_add, 0, 5) ==
'rcode') {
1401 "login.php?target=" . $target .
"&cmd=force_login&lang=" .
1414 if ($a_add ==
"mem" && $ilAccess->checkAccess(
"manage_members",
"", $a_target)) {
1422 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1426 if ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1430 $main_tpl->setOnScreenMessage(
'failure', sprintf(
1431 $lng->
txt(
"msg_no_perm_read_item"),
1447 if (!$a_omit_form_action) {
1461 $this->initFormTitleDescription(
$form);
1465 if ($a_mode ==
'edit') {
1468 $this->
lng->loadLanguageModule(
'mem');
1469 $cdur->enableToggleFullTime(
1470 $this->
lng->txt(
'mem_period_without_time'),
1471 !$this->
object->getStartTimeIndication()
1473 $cdur->setShowTime(
true);
1474 $cdur->setInfo($this->
lng->txt(
'grp_period_info'));
1475 $cdur->setStart($this->
object->getStart());
1476 $cdur->setEnd($this->
object->getEnd());
1481 $pres->setTitle($this->
lng->txt(
'grp_setting_header_registration'));
1486 $reg_type->
setValue((
string) $this->
object->getRegistrationType());
1489 $this->
lng->txt(
'grp_reg_direct'),
1491 );#$this->
lng->txt(
'grp_reg_direct_info'));
1492 $reg_type->addOption($opt_dir);
1495 $this->
lng->txt(
'grp_pass_request'),
1499 $pass->setRequired(
true);
1500 $pass->setInfo($this->
lng->txt(
'grp_reg_password_info'));
1501 $pass->setValue($this->
object->getPassword());
1503 $pass->setMaxLength(32);
1504 $opt_pass->addSubItem($pass);
1505 $reg_type->addOption($opt_pass);
1508 $reg_type->addOption($opt_req);
1511 $reg_type->addOption($opt_deact);
1516 $reg_code->setValue(
'1');
1517 $reg_code->setInfo($this->
lng->txt(
'grp_reg_code_enabled_info'));
1521 if (!$this->
object->getRegistrationAccessCode()) {
1525 $reg_link->setValue($this->
object->getRegistrationAccessCode());
1529 $val =
ilLink::_getLink($this->
object->getRefId(), $this->
object->getType(), array(),
'_rcode' . $this->
object->getRegistrationAccessCode());
1530 $link->setHTML(
'<span class="small">' . $val .
'</span>');
1531 $reg_code->addSubItem($link);
1535 $this->
lng->loadLanguageModule(
'dateplaner');
1538 $dur->setStart($this->
object->getRegistrationStart());
1539 $dur->setEnd($this->
object->getRegistrationEnd());
1544 $cancel->
setInfo($this->
lng->txt(
'grp_cancellation_end_info'));
1545 $cancel->setDate($this->
object->getCancellationEnd());
1549 $lim =
new ilCheckboxInputGUI($this->
lng->txt(
'reg_grp_max_members_short'),
'registration_membership_limited');
1552 $lim->setChecked($this->
object->isMembershipLimited());
1554 $min =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_min_members'),
'registration_min_members');
1556 $min->setMaxLength(4);
1557 $min->setValue($this->
object->getMinMembers() ?:
'');
1558 $min->setInfo($this->
lng->txt(
'grp_subscription_min_members_info'));
1559 $lim->addSubItem($min);
1561 $max =
new ilTextInputGUI($this->
lng->txt(
'reg_grp_max_members'),
'registration_max_members');
1562 $max->setValue($this->
object->getMaxMembers() ?:
'');
1565 $max->setMaxLength(4);
1566 $max->setInfo($this->
lng->txt(
'grp_reg_max_members_info'));
1567 $lim->addSubItem($max);
1582 $wait->addOption($option);
1584 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_no_autofill'),
'1');
1585 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_info'));
1586 $wait->addOption($option);
1588 $option =
new ilRadioOption($this->
lng->txt(
'grp_waiting_list_autofill'),
'2');
1589 $option->
setInfo($this->
lng->txt(
'grp_waiting_list_autofill_info'));
1590 $wait->addOption($option);
1592 if ($this->
object->hasWaitingListAutoFill()) {
1593 $wait->setValue(
'2');
1594 } elseif ($this->
object->isWaitingListEnabled()) {
1595 $wait->setValue(
'1');
1597 $wait->setValue(
'0');
1600 $lim->addSubItem($wait);
1606 $parent_membership_ref_id = 0;
1607 $hasParentMembership =
1609 $parent_membership_ref_id = $this->tree->checkForParentType($this->
object->getRefId(),
'crs',
true)
1613 $pres->setTitle($this->
lng->txt(
'grp_setting_header_presentation'));
1617 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTitleIconVisibility();
1620 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTopActionsVisibility();
1623 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addIcon();
1626 $form = $obj_service->commonSettings()->legacyForm(
$form, $this->
object)->addTileImage();
1634 if ($hasParentMembership) {
1636 $course_view_mode =
'';
1637 switch ($parent_view_mode) {
1639 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_sessions');
1643 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_simple');
1647 $course_view_mode =
': ' . $this->
lng->txt(
'cntr_view_by_type');
1650 if ($course_view_mode) {
1652 $opt->setInfo($this->
lng->txt(
'grp_view_inherit_info'));
1653 $view_type->addOption($opt);
1664 $opt->setInfo($this->
lng->txt(
'cntr_view_info_sessions'));
1665 $view_type->addOption($opt);
1668 $this->
lng->loadLanguageModule(
'crs');
1671 $sess->setChecked($this->
object->isSessionLimitEnabled());
1672 $sess->setInfo($this->
lng->txt(
'sess_limit_info'));
1676 $prev->setValue((
string) (
1677 $this->
object->getNumberOfPreviousSessions() == -1 ?
1679 $this->
object->getNumberOfPreviousSessions()
1682 $prev->setMaxLength(3);
1683 $sess->addSubItem($prev);
1687 $next->setValue((
string) (
1688 $this->
object->getNumberOfNextSessions() == -1 ?
1690 $this->
object->getNumberOfNextSessions()
1693 $next->setMaxLength(3);
1694 $sess->addSubItem($next);
1695 $opt->addSubItem($sess);
1698 $opt->setInfo($this->
lng->txt(
'grp_view_info_simple'));
1699 $view_type->addOption($opt);
1702 $opt->setInfo($this->
lng->txt(
'grp_view_info_by_type'));
1703 $view_type->addOption($opt);
1708 $sorting_settings = array();
1709 if ($hasParentMembership) {
1719 $feat->setTitle($this->
lng->txt(
'obj_features'));
1731 $mem->setInfo($this->
lng->txt(
'grp_show_members_info'));
1736 $mail_type->
setValue((
string) $this->
object->getMailToMembersType());
1739 $this->
lng->txt(
'grp_mail_tutors_only'),
1741 $this->
lng->txt(
'grp_mail_tutors_only_info')
1743 $mail_type->addOption($mail_tutors);
1746 $this->
lng->txt(
'grp_mail_all'),
1748 $this->
lng->txt(
'grp_mail_all_info')
1750 $mail_type->addOption($mail_all);
1756 $not->setInfo($this->
lng->txt(
'grp_auto_notification_info'));
1757 $not->setChecked($this->
object->getAutoNotification());
1776 $ecs->addSettingsToForm(
$form,
'grp');
1790 $this->tabs_gui->addSubTabTarget(
1792 $this->
ctrl->getLinkTarget($this,
'edit'),
1797 $this->tabs_gui->addSubTabTarget(
1798 "grp_info_settings",
1799 $this->
ctrl->getLinkTarget($this,
'editInfo'),
1805 $this->tabs_gui->addSubTabTarget(
1807 $this->
ctrl->getLinkTarget($this,
'editMapSettings'),
1813 $this->tabs_gui->addSubTabTarget(
1815 $this->
ctrl->getLinkTargetByClass(
'ilobjcoursegroupinggui',
'listGroupings'),
1822 $this->tabs_gui->addSubTabTarget(
1823 'grp_custom_user_fields',
1824 $this->
ctrl->getLinkTargetByClass(
'ilobjectcustomuserfieldsgui'),
1826 'ilobjectcustomuserfieldsgui' 1831 if ($this->
object->getUseNews()) {
1832 $this->tabs_gui->addSubTab(
1833 'obj_news_settings',
1834 $this->
lng->txt(
"cont_news_settings"),
1835 $this->
ctrl->getLinkTargetByClass(
'ilcontainernewssettingsgui')
1840 if ($lti_settings->hasSettingsAccess()) {
1841 $this->tabs_gui->addSubTabTarget(
1843 $this->
ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1847 $this->tabs_gui->addSubTabTarget(
1848 "obj_multilinguality",
1849 $this->
ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
""),
1851 "ilobjecttranslationgui" 1861 if ($this->
access->checkAccess(
'write',
'', $this->object->getRefId())) {
1866 if (!$this->
object->members_obj->isAssigned($this->user->getId())) {
1893 return parent::prepareOutput($show_subobjects);
1898 $link = chr(13) . chr(10) . chr(13) . chr(10);
1899 $link .= $this->
lng->txt(
'grp_mail_permanent_link');
1900 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1902 return rawurlencode(base64_encode($link));
1915 $lg = parent::initHeaderAction($sub_type, $sub_id);
1920 if (!$noti->isCurrentUserActive()) {
1924 $this->
lng->txt(
"grp_notification_deactivated")
1927 $this->
ctrl->setParameter($this,
"grp_ntf", 1);
1928 $caption =
"grp_activate_notification";
1933 $this->
lng->txt(
"grp_notification_activated")
1936 $this->
ctrl->setParameter($this,
"grp_ntf", 0);
1937 $caption =
"grp_deactivate_notification";
1940 if ($noti->canCurrentUserEdit()) {
1941 $lg->addCustomCommand(
1942 $this->
ctrl->getLinkTarget($this,
"saveNotification"),
1947 $this->
ctrl->setParameter($this,
"grp_ntf",
"");
1960 $res_data = array();
1961 foreach ($a_data as $usr_id => $user_data) {
1962 $res_data[$usr_id] = $user_data;
1966 foreach ($udf_data->getAll() as $field => $value) {
1967 list(
$f, $field_id) = explode(
'_', $field);
1968 $res_data[$usr_id][
'udf_' . $field_id] = (string) $value;
1971 foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1972 $res_data[$usr_id][
'cdf_' . $cdf_field] = (string) $cdf_value;
1981 $local_roles = $this->
object->getLocalGroupRoles();
1982 $grp_member = $this->
object->getDefaultMemberRole();
1983 $grp_roles = array();
1986 if (in_array($grp_member, $local_roles)) {
1988 unset($local_roles[$grp_roles[$grp_member]]);
1991 foreach ($local_roles as $title => $role_id) {
1999 $this->
ctrl->redirectByClass(
'ilUsersGalleryGUI');
2007 $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)
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="")
static _goto(int $a_target, string $a_add="")
static _fillHTMLMetaTags(int $a_rbac_id, int $a_obj_id, string $a_type)
editMapSettingsObject()
Edit Map Settings.
Class ilMailMemberSearchGUI.
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.
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
const EXTERNAL_MAIL_PREFIX
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _enabledUserRelatedData()
static _checkRequired(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 _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.
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
jump2UsersGalleryObject()
const TYPE_UNSUBSCRIBE_MEMBER
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
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.
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)
__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
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CALENDAR_CONFIGURATION
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
addCustomData(array $a_data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
prepareOutput(bool $show_subobjects=true)