ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ilObjGroupGUI Class Reference

Class ilObjGroupGUI. More...

+ Inheritance diagram for ilObjGroupGUI:
+ Collaboration diagram for ilObjGroupGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=false)
 @inheritDoc More...
 
 executeCommand ()
 @inheritDoc More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 viewObject ()
 @inheritDoc More...
 
 renderObject ()
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 @inheritDoc More...
 
 afterSave (ilObject $new_object, bool $redirect=true)
 @inheritDoc @access public More...
 
 editObject (?ilPropertyFormGUI $a_form=null)
 @inheritDoc More...
 
 updateGroupTypeObject ()
 
 updateObject ()
 updates object entry in object_data More...
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 editInfoObject ()
 
 updateInfoObject ()
 
 readMemberData (array $ids, ?array $selected_columns=null)
 
 leaveObject ()
 
 unsubscribeObject ()
 
 addContentTab ()
 
 infoScreenObject ()
 
 infoScreen ()
 
 saveNotificationObject ()
 
 initForm (string $a_mode='edit', bool $a_omit_form_action=false)
 
 prepareOutput (bool $show_subobjects=true)
 @inheritDoc More...
 
 createMailSignature ()
 
 addCustomData (array $a_data)
 
 getLocalRoles ()
 
 setSideColumnReturn ()
 @inheritDoc More...
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard @access public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 competencesObject ()
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 
 removeFromDeskObject ()
 

Static Public Member Functions

static _goto (string $a_target, string $a_add="")
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath (int $a_ref_id, int $a_course_ref_id)
 build path More...
 

Protected Member Functions

 initRefIdFromQuery ()
 
 getSubServices ()
 
 initInfoEditor ()
 
 getTabs ()
 @inheritDoc More...
 
 membersObject ()
 
 setSubTabs (string $a_tab)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 @inheritDoc More...
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 getDidacticTemplateIdFromQuery ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (?ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 

Protected Attributes

bool $show_tracking = false
 
Factory $refinery
 
ilRbacSystem $rbacsystem
 
News $news
 
Profile $profile
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 

Private Member Functions

 checkAgreement ()
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 
- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjGroupGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference,
bool  $a_prepare_output = false 
)

@inheritDoc

Definition at line 60 of file class.ilObjGroupGUI.php.

61 {
62 global $DIC;
63
64 $this->type = "grp";
65 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
66
67 $this->lng->loadLanguageModule('grp');
68 $this->lng->loadLanguageModule('obj');
69 $this->refinery = $DIC->refinery();
70 $this->rbacsystem = $DIC->rbac()->system();
71 $this->news = $DIC->news();
72 $this->profile = $DIC['user']->getProfile();
73 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), ILIAS\Repository\profile(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjGroupGUI::_goto ( string  $a_target,
string  $a_add = "" 
)
static

Definition at line 1384 of file class.ilObjGroupGUI.php.

1384 : void
1385 {
1386 global $DIC;
1387 $main_tpl = $DIC->ui()->mainTemplate();
1388 $a_target = (int) $a_target;
1389
1390 $ilUser = $DIC->user();
1391 $ilAccess = $DIC->access();
1392 $lng = $DIC->language();
1393 $ilErr = $DIC['ilErr'];
1394 $http = $DIC->http();
1395 $refinery = $DIC->refinery();
1396
1397 $target = '';
1398 if ($http->wrapper()->query()->has('target')) {
1399 $target = $http->wrapper()->query()->retrieve(
1400 'target',
1401 $refinery->kindlyTo()->string()
1402 );
1403 }
1404 if (substr($a_add, 0, 5) == 'rcode') {
1405 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1406 // Redirect to login for anonymous
1408 "login.php?target=" . $target . "&cmd=force_login&lang=" .
1409 $ilUser->getCurrentLanguage()
1410 );
1411 }
1412
1413 // Redirects to target location after assigning user to group
1415 $a_target,
1417 substr($a_add, 5)
1418 );
1419 }
1420
1421 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1422 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1423 }
1424
1425 if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1426 ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1427 }
1428
1429 if ($ilAccess->checkAccess("read", "", $a_target)) {
1431 } else {
1432 // to do: force flat view
1433 if ($ilAccess->checkAccess("visible", "", $a_target)) {
1434 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1435 } else {
1436 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1437 $main_tpl->setOnScreenMessage('failure', sprintf(
1438 $lng->txt("msg_no_perm_read_item"),
1440 ), true);
1442 }
1443 }
1444 }
1445 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1446 }
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
Definition: Factory.php:55
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...
static handleCode(int $a_ref_id, string $a_type, string $a_code)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
GlobalHttpState $http
static _gotoRepositoryNode(int $ref_id, string $cmd="")
ilLanguage $lng
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static redirect(string $a_script)
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32
$ilErr
Definition: raiseError.php:33

References $DIC, ilObjectGUI\$http, $ilErr, ilObjectGUI\$lng, $refinery, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ANONYMOUS_USER_ID, ilMembershipRegistrationCodeUtils\handleCode(), ILIAS\Repository\int(), ilContSkillPresentationGUI\isAccessible(), ILIAS\Refinery\Factory\kindlyTo(), ilUtil\redirect(), ROOT_FOLDER_ID, and ilLanguage\txt().

Referenced by ilObjGroupReferenceGUI\_goto(), and ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContentTab()

ilObjGroupGUI::addContentTab ( )

Definition at line 1033 of file class.ilObjGroupGUI.php.

1033 : void
1034 {
1035 $this->tabs_gui->addTab(
1036 "view_content",
1037 $this->lng->txt("content"),
1038 $this->ctrl->getLinkTarget($this, "view")
1039 );
1040 }

References ILIAS\Repository\lng().

Referenced by getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCustomData()

ilObjGroupGUI::addCustomData ( array  $a_data)

Definition at line 1974 of file class.ilObjGroupGUI.php.

1974 : array
1975 {
1976 // object defined fields
1977 $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1978 $udfs = $this->profile->getAllUserDefinedFields();
1979
1980 return array_reduce(
1981 iterator_to_array($this->profile->getDataForMultiple(array_keys($a_data))),
1982 function (array $c, ProfileData $v) use ($a_data, $udfs, $odfs): array {
1983 $c[$v->getId()] = $a_data[$v->getId()];
1984
1985 foreach ($udfs as $field) {
1986 $field_id = $field->getIdentifier();
1987 $c[$v->getId()]['udf_' . $field_id] = implode(', ', $v->getAdditionalFieldByIdentifier($field_id) ?? []);
1988 }
1989
1990 foreach ((array) ($odfs[$v->getId()] ?? []) as $cdf_field => $cdf_value) {
1991 $c[$v->getId()]['cdf_' . $cdf_field] = (string) $cdf_value;
1992 }
1993 return $c;
1994 },
1995 []
1996 );
1997 }
static _getValuesByObjId(int $a_obj_id)
$c
Definition: deliver.php:25

References $c, ilCourseUserData\_getValuesByObjId(), ILIAS\Repository\object(), and ILIAS\Repository\profile().

+ Here is the call graph for this function:

◆ afterSave()

ilObjGroupGUI::afterSave ( ilObject  $new_object,
bool  $redirect = true 
)

@inheritDoc @access public

See also
ilGroupAddToGroupActionGUI

Definition at line 508 of file class.ilObjGroupGUI.php.

508 : void
509 {
510 $new_object->setRegistrationType(
512 );
513 $new_object->update();
514
515 // check for parent group or course => SORT_INHERIT
516 $sort_mode = ilContainer::SORT_TITLE;
517 if (
518 $this->tree->checkForParentType($new_object->getRefId(), 'crs', true) ||
519 $this->tree->checkForParentType($new_object->getRefId(), 'grp', true)
520 ) {
521 $sort_mode = ilContainer::SORT_INHERIT;
522 }
523
524 // Save sorting
525 $sort = new ilContainerSortingSettings($new_object->getId());
526 $sort->setSortMode($sort_mode);
527 $sort->update();
528
529
530 // Add user as admin and enable notification
531 $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
532 $members_obj->add($this->user->getId(), ilParticipants::IL_GRP_ADMIN);
533 $members_obj->updateNotification($this->user->getId(), (bool) $this->settings->get('mail_grp_admin_notification', '1'));
534 $members_obj->updateContact($this->user->getId(), true);
535
536 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
537 if ($redirect) {
538 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
539 $this->ctrl->redirect($this, 'edit');
540 }
541 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.

References ilGroupParticipants\_getInstanceByObjId(), ILIAS\Repository\ctrl(), ilObject\getId(), ilObject\getRefId(), ilGroupConstants\GRP_REGISTRATION_DIRECT, ilParticipants\IL_GRP_ADMIN, ILIAS\Repository\lng(), ilContainer\SORT_INHERIT, ilContainer\SORT_TITLE, ilObject\update(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

Definition at line 1878 of file class.ilObjGroupGUI.php.

1878 : bool
1879 {
1880 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1881 return true;
1882 }
1883
1884 // Disable aggrement if is not member of group
1885 if (!$this->object->members_obj->isAssigned($this->user->getId())) {
1886 return true;
1887 }
1888
1889 if (ilMemberViewSettings::getInstance()->isActive()) {
1890 return true;
1891 }
1892
1893 $privacy = ilPrivacySettings::getInstance();
1894
1895 // Check agreement
1896 if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1897 and !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())) {
1898 return false;
1899 }
1900 // Check required fields
1901 if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
1902 return false;
1903 }
1904 return true;
1905 }
static _hasFields(int $a_container_id)
Check if there are any define fields.
static _checkRequired(int $a_usr_id, int $a_obj_id)
static _hasAccepted(int $a_usr_id, int $a_obj_id)
Check if user has accepted agreement.

References ilCourseUserData\_checkRequired(), ilMemberAgreement\_hasAccepted(), ilCourseDefinedFieldDefinition\_hasFields(), ILIAS\Repository\access(), ilMemberViewSettings\getInstance(), ilPrivacySettings\getInstance(), ILIAS\Repository\object(), and ILIAS\Repository\user().

Referenced by viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )

Definition at line 1915 of file class.ilObjGroupGUI.php.

1915 : string
1916 {
1917 $link = chr(13) . chr(10) . chr(13) . chr(10);
1918 $link .= $this->lng->txt('grp_mail_permanent_link');
1919 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1920 $link .= ilLink::_getLink($this->object->getRefId());
1921 return rawurlencode(base64_encode($link));
1922 }

References ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ disableAdministrationPanelObject()

ilObjGroupGUI::disableAdministrationPanelObject ( )

Reimplemented from ilContainerGUI.

Definition at line 445 of file class.ilObjGroupGUI.php.

445 : void
446 {
447 $this->getModeManager()->setContentMode();
448 $this->ctrl->redirect($this, "");
449 }

References ILIAS\Repository\ctrl(), and ilContainerGUI\getModeManager().

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

Definition at line 861 of file class.ilObjGroupGUI.php.

861 : void
862 {
863 $this->checkPermission('write');
864
865 $this->setSubTabs('settings');
866 $this->tabs_gui->setTabActive('settings');
867 $this->tabs_gui->setSubTabActive('grp_info_settings');
868
869 $form = $this->initInfoEditor();
870 $this->tpl->setContent($form->getHTML());
871 }
ilPropertyFormGUI $form
setSubTabs(string $a_tab)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ilContainerGUI\$form, ilObjectGUI\checkPermission(), ilPropertyFormGUI\getHTML(), initInfoEditor(), and setSubTabs().

Referenced by updateInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editMapSettingsObject()

ilObjGroupGUI::editMapSettingsObject ( )

Edit Map Settings.

Definition at line 773 of file class.ilObjGroupGUI.php.

773 : void
774 {
775 $this->setSubTabs("settings");
776 $this->tabs_gui->setTabActive('settings');
777 $this->tabs_gui->setSubTabActive('grp_map_settings');
778
779 if (!ilMapUtil::isActivated() ||
780 !$this->access->checkAccess("write", "", $this->object->getRefId())) {
781 return;
782 }
783
784 $latitude = $this->object->getLatitude();
785 $longitude = $this->object->getLongitude();
786 $zoom = $this->object->getLocationZoom();
787
788 // Get Default settings, when nothing is set
789 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
791 $latitude = $def["latitude"];
792 $longitude = $def["longitude"];
793 $zoom = $def["zoom"];
794 }
795
796
797 $form = new ilPropertyFormGUI();
798 $form->setFormAction($this->ctrl->getFormAction($this));
799
800 $form->setTitle($this->lng->txt("grp_map_settings"));
801
802 // enable map
803 $public = new ilCheckboxInputGUI(
804 $this->lng->txt("grp_enable_map"),
805 "enable_map"
806 );
807 $public->setValue("1");
808 $public->setChecked($this->object->getEnableGroupMap());
809 $form->addItem($public);
810
811 // map location
812 $loc_prop = new ilLocationInputGUI(
813 $this->lng->txt("grp_map_location"),
814 "location"
815 );
816 $loc_prop->setLatitude((float) $latitude);
817 $loc_prop->setLongitude((float) $longitude);
818 $loc_prop->setZoom((int) $zoom);
819 $form->addItem($loc_prop);
820
821 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
822
823 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
824 }
This class represents a checkbox property in a property form.
setFormAction(string $a_formaction)
This class represents a location property in a property form.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

References ilContainerGUI\$form, ILIAS\Repository\access(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilMapUtil\getDefaultSettings(), ilPropertyFormGUI\getHTML(), ilMapUtil\isActivated(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilFormGUI\setFormAction(), setSubTabs(), and ilPropertyFormGUI\setTitle().

+ Here is the call graph for this function:

◆ editObject()

ilObjGroupGUI::editObject ( ?ilPropertyFormGUI  $a_form = null)

@inheritDoc

Definition at line 546 of file class.ilObjGroupGUI.php.

546 : void
547 {
548 $this->checkPermission("write");
549
550 $this->setSubTabs('settings');
551 $this->tabs_gui->setTabActive('settings');
552 $this->tabs_gui->setSubTabActive('general');
553
554 if (!$a_form) {
555 $a_form = $this->initForm('edit');
556 }
557 $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
558 }
initForm(string $a_mode='edit', bool $a_omit_form_action=false)

References ilObjectGUI\checkPermission(), initForm(), and setSubTabs().

+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilObjGroupGUI::enableAdministrationPanelObject ( )

Reimplemented from ilContainerGUI.

Definition at line 439 of file class.ilObjGroupGUI.php.

439 : void
440 {
441 $this->getModeManager()->setAdminMode();
442 $this->ctrl->redirect($this, "");
443 }

References ILIAS\Repository\ctrl(), and ilContainerGUI\getModeManager().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 89 of file class.ilObjGroupGUI.php.

89 : void
90 {
91 global $DIC;
92
93 $ilNavigationHistory = $DIC['ilNavigationHistory'];
94
95 $ref_id = $this->initRefIdFromQuery();
96
97 $next_class = $this->ctrl->getNextClass($this);
98 $cmd = $this->ctrl->getCmd();
99 $this->prepareOutput();
100
101 // add entry to navigation history
102 if (!$this->getCreationMode() && $this->access->checkAccess("read", "", $ref_id)) {
103 $ilNavigationHistory->addItem(
104 $ref_id,
105 ilLink::_getLink($ref_id, "grp"),
106 "grp"
107 );
108 }
109
110 // if news timeline is landing page, redirect if necessary
111 if ($next_class == "" && $cmd == "" && $this->object->isNewsTimelineLandingPageEffective()
112 && $this->access->checkAccess("read", "", $ref_id)) {
113 $this->ctrl->redirectByClass(ilNewsTimelineGUI::class);
114 }
115
116 $header_action = true;
117 switch ($next_class) {
118 case strtolower(ilRepositoryTrashGUI::class):
119 $ru = new \ilRepositoryTrashGUI($this);
120 $this->ctrl->setReturn($this, 'trash');
121 $this->ctrl->forwardCommand($ru);
122 break;
123
124 case 'illtiproviderobjectsettinggui':
125 $this->setSubTabs('settings');
126 $this->tabs_gui->activateTab('settings');
127 $this->tabs_gui->activateSubTab('lti_provider');
128 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
129 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
130 $lti_gui->offerLTIRolesForSelection(false);
131 $this->ctrl->forwardCommand($lti_gui);
132 break;
133
134
135 case 'ilgroupmembershipgui':
136
137 $this->tabs_gui->activateTab('members');
138
139 $mem_gui = new ilGroupMembershipGUI($this, $this->object);
140 $this->ctrl->forwardCommand($mem_gui);
141 break;
142
143
144 case 'ilgroupregistrationgui':
145 $this->ctrl->setReturn($this, '');
146 $this->tabs_gui->setTabActive('join');
147 $registration = new ilGroupRegistrationGUI($this->object);
148 $this->ctrl->forwardCommand($registration);
149 break;
150
151 case 'ilpermissiongui':
152 $this->tabs_gui->activateTab('perm_settings');
153 $perm_gui = new ilPermissionGUI($this);
154 $this->ctrl->forwardCommand($perm_gui);
155 break;
156
157 case "ilinfoscreengui":
158 $this->infoScreen();
159 break;
160
161 case "illearningprogressgui":
162 $user_id = $this->user->getId();
163 if ($this->http->wrapper()->query()->has('user_id')) {
164 $user_id = $this->http->wrapper()->query()->retrieve(
165 'user_id',
166 $this->refinery->kindlyTo()->int()
167 );
168 }
169 $new_gui = new ilLearningProgressGUI(
171 $this->object->getRefId(),
173 );
174 $this->ctrl->forwardCommand($new_gui);
175 $this->tabs_gui->setTabActive('learning_progress');
176 break;
177
178 case 'ilobjcoursegroupinggui':
179 $this->setSubTabs('settings');
180 $this->ctrl->setReturn($this, 'edit');
181 $obj_id = 0;
182 if ($this->http->wrapper()->query()->has('obj_id')) {
183 $obj_id = $this->http->wrapper()->query()->retrieve(
184 'obj_id',
185 $this->refinery->kindlyTo()->int()
186 );
187 }
188 $crs_grp_gui = new ilObjCourseGroupingGUI($this->object, $obj_id);
189 $this->ctrl->forwardCommand($crs_grp_gui);
190 $this->tabs_gui->setTabActive('settings');
191 $this->tabs_gui->setSubTabActive('groupings');
192 break;
193
194 case 'ilcoursecontentgui':
195 $course_content_obj = new ilCourseContentGUI($this);
196 $this->ctrl->forwardCommand($course_content_obj);
197 break;
198
199 case strtolower(PublicProfileGUI::class):
200 $this->setSubTabs('members');
201 $this->tabs_gui->setTabActive('group_members');
202 $this->tabs_gui->setSubTabActive('grp_members_gallery');
203 $usr_id = 0;
204 if ($this->http->wrapper()->query()->has('user')) {
205 $usr_id = $this->http->wrapper()->query()->retrieve(
206 'user',
207 $this->refinery->kindlyTo()->int()
208 );
209 }
210 $profile_gui = new PublicProfileGUI($usr_id);
211 $back_url = '';
212 if ($this->http->wrapper()->query()->has('back_url')) {
213 $back_url = $this->http->wrapper()->query()->retrieve(
214 'back_url',
215 $this->refinery->kindlyTo()->string()
216 );
217 }
218 if ($back_url == '') {
219 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilGroupMembershipGUI", "ilUsersGalleryGUI"], 'view'));
220 }
221 $html = $this->ctrl->forwardCommand($profile_gui);
222 $this->tpl->setVariable("ADM_CONTENT", $html);
223 break;
224
225 case "ilcolumngui":
226 $this->tabs_gui->setTabActive('none');
227 $this->checkPermission("read");
228 $this->tpl->setVariable(
229 "LOCATION_CONTENT_STYLESHEET",
230 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
231 );
232 $this->renderObject();
233 break;
234
235 // container page editing
236 case "ilcontainerpagegui":
237 $ret = $this->forwardToPageObject();
238 if ($ret != "") {
239 $this->tpl->setContent($ret);
240 }
241 $header_action = false;
242 break;
243
244 case 'ilobjectcopygui':
245 $cp = new ilObjectCopyGUI($this);
246 $cp->setType('grp');
247 $this->ctrl->forwardCommand($cp);
248 break;
249
250 case "ilobjectcontentstylesettingsgui":
251 global $DIC;
252
253 $this->checkPermission("write");
254 $this->setTitleAndDescription();
255 $this->showContainerPageTabs();
256 $settings_gui = $DIC->contentStyle()->gui()
257 ->objectSettingsGUIForRefId(
258 null,
259 $this->object->getRefId()
260 );
261 $this->ctrl->forwardCommand($settings_gui);
262 break;
263
264 case 'ilobjectcustomuserfieldsgui':
265 $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
266 $this->setSubTabs('settings');
267 $this->tabs_gui->setTabActive('settings');
268 $this->tabs_gui->activateSubTab('grp_custom_user_fields');
269 $this->ctrl->forwardCommand($cdf_gui);
270 break;
271
272 case 'ilmemberagreementgui':
273 $this->ctrl->setReturn($this, '');
274 $this->tabs_gui->setTabActive('view_content');
275 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
276 $this->ctrl->forwardCommand($agreement);
277 break;
278
279 case 'ilexportgui':
280 $this->tabs_gui->setTabActive('export');
281 $exp = new ilExportGUI($this);
282 $exp->addFormat('xml');
283 $this->ctrl->forwardCommand($exp);
284 break;
285
286 case "ilcommonactiondispatchergui":
288 $this->ctrl->forwardCommand($gui);
289 break;
290
291 case 'ilobjectservicesettingsgui':
292 $this->ctrl->setReturn($this, 'edit');
293 $this->setSubTabs("settings");
294 $this->tabs_gui->activateTab('settings');
295 $this->tabs_gui->activateSubTab('tool_settings');
296
298 $this,
299 $this->object->getId(),
300 array(
302 )
303 );
304 $this->ctrl->forwardCommand($service);
305 break;
306
307 case 'ilmailmembersearchgui':
308 $mail = new ilMail($this->user->getId());
309
310 if (!($this->access->checkAccess('manage_members', '', $this->object->getRefId()) ||
311 $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) &&
312 $this->rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
313 $this->error->raiseError($this->lng->txt("msg_no_perm_read"), $this->error->MESSAGE);
314 }
315
316 $this->tabs_gui->setTabActive('members');
317
318
319 $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberGroupRoles());
320 $mail_search->setObjParticipants(ilCourseParticipants::_getInstanceByObjId($this->object->getId()));
321 $this->ctrl->forwardCommand($mail_search);
322 break;
323
324 case 'ilbadgemanagementgui':
325 $this->tabs_gui->setTabActive('obj_tool_setting_badges');
326 $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'grp');
327 $this->ctrl->forwardCommand($bgui);
328 break;
329
330 case "ilcontainernewssettingsgui":
331 $this->setSubTabs("settings");
332 $this->tabs_gui->setTabActive('settings');
333 $this->tabs_gui->activateSubTab('obj_news_settings');
334 $news_set_gui = new ilContainerNewsSettingsGUI($this);
335 $news_set_gui->setTimeline(true);
336 $news_set_gui->setCronNotifications(true);
337 $news_set_gui->setHideByDate(true);
338 $this->ctrl->forwardCommand($news_set_gui);
339 break;
340
341 case strtolower(ilNewsTimelineGUI::class):
342 $this->checkPermission("read");
343 $this->tabs_gui->setTabActive('news_timeline');
344 $t = ilNewsTimelineGUI::getInstance($this->object->getRefId(), $this->object->getNewsTimelineAutoENtries());
345 $t->setUserEditAll($this->access->checkAccess('write', '', $this->object->getRefId(), 'grp'));
346 $this->showPermanentLink();
347 $this->ctrl->forwardCommand($t);
349 $this->user->getId(),
350 $this->object->getId(),
351 $this->object->getRefId(),
352 'grp'
353 );
354 break;
355
356 case "ilcontainerskillgui":
357 $this->tabs_gui->activateTab('obj_tool_setting_skills');
358 $gui = new ilContainerSkillGUI($this);
359 $this->ctrl->forwardCommand($gui);
360 break;
361
362 case 'ilcalendarpresentationgui':
363 $cal = new ilCalendarPresentationGUI($this->object->getRefId());
364 $this->ctrl->forwardCommand($cal);
365 break;
366
367 case 'ilobjectmetadatagui':
368 if (!$this->access->checkAccess('write', '', $this->object->getRefId())) {
369 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->WARNING);
370 }
371 $this->tabs_gui->activateTab('meta_data');
372 $this->ctrl->forwardCommand(new ilObjectMetaDataGUI($this->object));
373 break;
374
375
376 case strtolower(TranslationGUI::class):
377 $this->checkPermissionBool("write");
378 $this->setSubTabs("settings");
379 $this->tabs->activateTab("settings");
380 $transgui = new TranslationGUI(
381 $this->getObject(),
382 $this->lng,
383 $this->access,
384 $this->user,
385 $this->ctrl,
386 $this->tpl,
387 $this->ui_factory,
388 $this->ui_renderer,
389 $this->http,
390 $this->refinery,
391 $this->toolbar
392 );
393 $this->ctrl->forwardCommand($transgui);
394 break;
395
396 default:
397
398 // check visible permission
399 if (!$this->getCreationMode() and
400 !$this->access->checkAccess('visible', '', $this->object->getRefId(), 'grp') and
401 !$this->access->checkAccess('read', '', $this->object->getRefId(), 'grp')) {
402 $this->error->raiseError($this->lng->txt("msg_no_perm_read"), $this->error->MESSAGE);
403 }
404
405 // #9401 - see also ilStartupGUI::_checkGoto()
406 if ($cmd == 'infoScreenGoto') {
407 if ($this->object->isRegistrationEnabled()) {
408 $cmd = 'join';
409 } else {
410 $cmd = 'infoScreen';
411 }
412 }
413
414 // check read permission
415 if ((!$this->getCreationMode()
416 && !$this->rbacsystem->checkAccess('read', $this->object->getRefId()) && $cmd != 'infoScreen')
417 || $cmd == 'join'
418 || $cmd === 'leaveWaitList') {
419 // no join permission -> redirect to info screen
420 if (!$this->rbacsystem->checkAccess('join', $this->object->getRefId())) {
421 $this->ctrl->redirect($this, "infoScreen");
422 } else { // no read -> show registration
423 $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
424 }
425 }
426 if (!$cmd) {
427 $cmd = 'view';
428 }
429 $cmd .= 'Object';
430 $this->$cmd();
431 break;
432 }
433
434 if ($header_action) {
435 $this->addHeaderAction();
436 }
437 }
GUI class for public user profile presentation.
error(string $a_errmsg)
@ilCtrl_Calls ilBadgeManagementGUI: ilPropertyFormGUI
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
ILIAS Container InternalGUIService $gui
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Skills for container (course/group) (top gui class)
Class ilCourseContentGUI.
static _getInstanceByObjId(int $a_obj_id)
Export User Interface Class.
GUI class for membership features.
GUI class for group registrations.
GUI class for LTI provider object settings.
Class ilObjUserTrackingGUI.
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
Class ilMailMemberCourseRoles.
static getInstance(int $a_ref_id, bool $a_include_auto_entries)
Class ilObjCourseGroupingGUI.
prepareOutput(bool $show_subobjects=true)
@inheritDoc
const MAIL_ALLOWED_ALL
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
GUI class for the workflow of copying objects.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
GUI class for service settings (calendar, notes, comments)
Repository GUI Utilities.
$service
Definition: ltiresult.php:36
static http()
Fetches the global http state from ILIAS.
$GLOBALS["DIC"]
Definition: wac.php:54

References $DIC, $GLOBALS, ilContainerGUI\$gui, ilObjectGUI\$html, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, $service, $user_id, ilCourseParticipants\_getInstanceByObjId(), ilLearningProgress\_tracProgress(), ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), error(), ilContainerGUI\forwardToPageObject(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), ilObjectGUI\getObject(), ILIAS\FileDelivery\http(), infoScreen(), initRefIdFromQuery(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, ILIAS\Repository\object(), prepareOutput(), ILIAS\Repository\rbac(), ILIAS\Repository\refinery(), renderObject(), setSubTabs(), ilContainerGUI\setTitleAndDescription(), ilContainerGUI\showContainerPageTabs(), ilContainerGUI\showPermanentLink(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

Definition at line 1999 of file class.ilObjGroupGUI.php.

1999 : array
2000 {
2001 $local_roles = $this->object->getLocalGroupRoles();
2002 $grp_member = $this->object->getDefaultMemberRole();
2003 $grp_roles = array();
2004
2005 //put the group member role to the top of the crs_roles array
2006 if (in_array($grp_member, $local_roles)) {
2007 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2008 unset($local_roles[$grp_roles[$grp_member]]);
2009 }
2010
2011 foreach ($local_roles as $title => $role_id) {
2012 $grp_roles[(int) $role_id] = ilObjRole::_getTranslation($title);
2013 }
2014 return $grp_roles;
2015 }
static _getTranslation(string $a_role_title)

References ilObjRole\_getTranslation(), and ILIAS\Repository\int().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubServices()

ilObjGroupGUI::getSubServices ( )
protected

Definition at line 751 of file class.ilObjGroupGUI.php.

References ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\EXTERNAL_MAIL_PREFIX, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjectServiceSettingsGUI\SKILLS, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\USE_NEWS.

◆ getTabs()

ilObjGroupGUI::getTabs ( )
protected

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 1045 of file class.ilObjGroupGUI.php.

1045 : void
1046 {
1047 global $DIC;
1048
1049 $ilHelp = $DIC['ilHelp'];
1050 $ilHelp->setScreenIdComponent("grp");
1051
1052 if ($this->access->checkAccess('read', '', $this->ref_id)) {
1053 if ($this->object->isNewsTimelineEffective()) {
1054 if (!$this->object->isNewsTimelineLandingPageEffective()) {
1055 $this->addContentTab();
1056 }
1057 $this->tabs_gui->addTab(
1058 "news_timeline",
1059 $this->lng->txt("cont_news_timeline_tab"),
1060 $this->ctrl->getLinkTargetByClass(ilNewsTimelineGUI::class, "show")
1061 );
1062 if ($this->object->isNewsTimelineLandingPageEffective()) {
1063 $this->addContentTab();
1064 }
1065 } else {
1066 $this->addContentTab();
1067 }
1068 }
1069 if (
1070 $this->access->checkAccess('visible', '', $this->ref_id) ||
1071 $this->access->checkAccess('join', '', $this->ref_id) ||
1072 $this->access->checkAccess('read', '', $this->ref_id)
1073 ) {
1074 $this->tabs_gui->addTarget(
1075 "info_short",
1076 $this->ctrl->getLinkTargetByClass(
1077 array("ilobjgroupgui", "ilinfoscreengui"),
1078 "showSummary"
1079 ),
1080 "infoScreen",
1081 "",
1082 "",
1083 false
1084 );
1085 }
1086
1087
1088 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1089 $this->tabs_gui->addTarget(
1090 "settings",
1091 $this->ctrl->getLinkTarget($this, "edit"),
1092 array("edit", "editMapSettings"),
1093 get_class($this),
1094 ""
1095 );
1096 }
1097
1098 $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $this->user->getId());
1099
1100 // Members
1101 $membership_gui = new ilGroupMembershipGUI($this, $this->object);
1102 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1103
1104
1105 // badges
1106 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1107 if (ilBadgeHandler::getInstance()->isObjectActive($this->object->getId())) {
1108 $this->tabs_gui->addTarget(
1109 "obj_tool_setting_badges",
1110 $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1111 "",
1112 "ilbadgemanagementgui"
1113 );
1114 }
1115 }
1116
1117 // skills
1118 if ($this->access->checkAccess('read', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
1119 $this->object->getId(),
1121 ''
1122 )) {
1123 $this->tabs_gui->addTarget(
1124 "obj_tool_setting_skills",
1125 $this->ctrl->getLinkTargetByClass(array("ilcontainerskillgui", "ilcontskillpresentationgui"), ""),
1126 "",
1127 array("ilcontainerskillgui", "ilcontskillpresentationgui", "ilcontskilladmingui")
1128 );
1129 }
1130
1131 // learning progress
1132 if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
1133 $this->tabs_gui->addTarget(
1134 'learning_progress',
1135 $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'), ''),
1136 '',
1137 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui')
1138 );
1139 }
1140
1141 // meta data
1142 if ($this->access->checkAccess('write', '', $this->ref_id)) {
1143 $md_gui = new ilObjectMetaDataGUI($this->object);
1144 $tab_link = $md_gui->getTab();
1145 if ($tab_link !== null) {
1146 $this->tabs_gui->addTab(
1147 'meta_data',
1148 $this->lng->txt('meta_data'),
1149 $tab_link,
1150 ''
1151 );
1152 }
1153 }
1154
1155
1156 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1157 $this->tabs_gui->addTarget(
1158 'export',
1159 $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
1160 'export',
1161 'ilexportgui'
1162 );
1163 }
1164
1165 // parent tabs (all container: edit_permission, clipboard, trash
1166 parent::getTabs();
1167
1168 if ($this->access->checkAccess('join', '', $this->object->getRefId()) and
1169 !$this->object->members_obj->isAssigned($this->user->getId())) {
1170 if (ilGroupWaitingList::_isOnList($this->user->getId(), $this->object->getId())) {
1171 $this->tabs_gui->addTab(
1172 'leave',
1173 $this->lng->txt('membership_leave'),
1174 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', 'show', '')
1175 );
1176 } else {
1177 $this->tabs_gui->addTarget(
1178 "join",
1179 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1180 'show',
1181 ""
1182 );
1183 }
1184 }
1185 if ($this->access->checkAccess('leave', '', $this->object->getRefId()) and
1186 $this->object->members_obj->isMember($this->user->getId())) {
1187 $this->tabs_gui->addTarget(
1188 "grp_btn_unsubscribe",
1189 $this->ctrl->getLinkTarget($this, "leave"),
1190 '',
1191 ""
1192 );
1193 }
1194 }
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
static _isOnList(int $a_usr_id, int $a_obj_id)

References $DIC, ilWaitingList\_isOnList(), ilGroupParticipants\_isParticipant(), ilContainer\_lookupContainerSetting(), ILIAS\Repository\access(), addContentTab(), ilLearningProgressAccess\checkAccess(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectServiceSettingsGUI\SKILLS, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

Definition at line 1201 of file class.ilObjGroupGUI.php.

1201 : void
1202 {
1203 $this->tabs_gui->setTabActive('info_short');
1204
1205 if (!$this->checkPermissionBool('read')) {
1206 $this->checkPermission('visible');
1207 }
1208
1209 $info = new ilInfoScreenGUI($this);
1210
1211 if (strlen($this->object->getInformation())) {
1212 $info->addSection($this->lng->txt('grp_general_informations'));
1213 $info->addProperty($this->lng->txt('grp_information'), nl2br(
1214 ilUtil::makeClickable($this->object->getInformation(), true)
1215 ));
1216 }
1217
1218 $info->enablePrivateNotes();
1219 $info->enableLearningProgress(true);
1220
1221 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'grp', $this->object->getId());
1222 $record_gui->setInfoObject($info);
1223 $record_gui->parse();
1224
1225 // meta data
1226 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1227
1228
1229 // support contacts
1230 $parts = ilParticipants::getInstance($this->object->getRefId());
1231 $contacts = $parts->getContacts();
1232 if (count($contacts) > 0) {
1233 $info->addSection($this->lng->txt("grp_mem_contacts"));
1234 foreach ($contacts as $c) {
1235 $pgui = new PublicProfileGUI($c);
1236 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
1237 $pgui->setEmbedded(true);
1238 $info->addProperty("", $pgui->getHTML());
1239 }
1240 }
1241
1242
1243 $info->addSection($this->lng->txt('group_registration'));
1244 $info->showLDAPRoleGroupMappingInfo();
1245
1246 if (!$this->object->isRegistrationEnabled()) {
1247 $info->addProperty(
1248 $this->lng->txt('group_registration_mode'),
1249 $this->lng->txt('grp_reg_deac_info_screen')
1250 );
1251 } else {
1252 switch ($this->object->getRegistrationType()) {
1254 $info->addProperty(
1255 $this->lng->txt('group_registration_mode'),
1256 $this->lng->txt('grp_reg_direct_info_screen')
1257 );
1258 break;
1259
1261 $info->addProperty(
1262 $this->lng->txt('group_registration_mode'),
1263 $this->lng->txt('grp_reg_req_info_screen')
1264 );
1265 break;
1266
1268 $info->addProperty(
1269 $this->lng->txt('group_registration_mode'),
1270 $this->lng->txt('grp_reg_passwd_info_screen')
1271 );
1272 break;
1273 }
1274 /*
1275 $info->addProperty($this->lng->txt('group_registration_time'),
1276 ilDatePresentation::formatPeriod(
1277 $this->object->getRegistrationStart(),
1278 $this->object->getRegistrationEnd()));
1279 */
1280 if ($this->object->isRegistrationUnlimited()) {
1281 $info->addProperty(
1282 $this->lng->txt('group_registration_time'),
1283 $this->lng->txt('grp_registration_unlimited')
1284 );
1285 } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
1286 $info->addProperty(
1287 $this->lng->txt("group_registration_time"),
1288 $this->lng->txt('cal_until') . ' ' .
1289 ilDatePresentation::formatDate($this->object->getRegistrationEnd())
1290 );
1291 } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
1292 $info->addProperty(
1293 $this->lng->txt("group_registration_time"),
1294 $this->lng->txt('cal_from') . ' ' .
1295 ilDatePresentation::formatDate($this->object->getRegistrationStart())
1296 );
1297 }
1298 if ($this->object->isMembershipLimited()) {
1299 if ($this->object->getMinMembers()) {
1300 $info->addProperty(
1301 $this->lng->txt("mem_min_users"),
1302 (string) $this->object->getMinMembers()
1303 );
1304 }
1305 if ($this->object->getMaxMembers()) {
1306 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1307
1308 $info->addProperty(
1309 $this->lng->txt('mem_free_places'),
1310 (string) ($reg_info['reg_info_free_places'] ?? '0')
1311 );
1312 }
1313 }
1314
1315 if ($this->object->getCancellationEnd()) {
1316 $info->addProperty(
1317 $this->lng->txt('grp_cancellation_end'),
1318 ilDatePresentation::formatDate($this->object->getCancellationEnd())
1319 );
1320 }
1321 }
1322
1323 if ($this->object->getStart() instanceof ilDateTime &&
1324 !$this->object->getStart()->isNull()
1325 ) {
1326 $info->addProperty(
1327 $this->lng->txt('grp_period'),
1329 $this->object->getStart(),
1330 $this->object->getEnd()
1331 )
1332 );
1333 }
1334
1335 // Confirmation
1336 $privacy = ilPrivacySettings::getInstance();
1337
1338 if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
1339 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1340
1341 $this->lng->loadLanguageModule('ps');
1342 $info->addSection($this->lng->txt('grp_user_agreement_info'));
1343 $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
1344
1345 if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
1346 $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
1347 }
1348 }
1349
1350
1351 // forward the command
1352 $this->ctrl->forwardCommand($info);
1353 }
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
@classDescription Date and time handling
isNull()
Check if a date is null (Datetime == '0000-00-00 00:00:00', unixtime == 0,...)
static _getInstanceByType(string $a_type)
Get Singleton Instance.
Class ilInfoScreenGUI.
static lookupRegistrationInfo(int $a_obj_id)
static getInstance(int $a_ref_id)
static makeClickable(string $a_text, bool $detectGotoLinks=false, ?string $ilias_http_path=null)
$info
Definition: entry_point.php:21
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $c, $info, $parts, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilCourseDefinedFieldDefinition\_getFields(), ilExportFieldsInfo\_getInstanceByType(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), ilPrivacySettings\getInstance(), ilParticipants\getInstance(), ilGroupConstants\GRP_REGISTRATION_DIRECT, ilGroupConstants\GRP_REGISTRATION_PASSWORD, ilGroupConstants\GRP_REGISTRATION_REQUEST, ilDateTime\isNull(), ILIAS\Repository\lng(), ilObjGroupAccess\lookupRegistrationInfo(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, and ILIAS\Repository\object().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

Definition at line 1196 of file class.ilObjGroupGUI.php.

1196 : void
1197 {
1198 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
1199 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initForm()

ilObjGroupGUI::initForm ( string  $a_mode = 'edit',
bool  $a_omit_form_action = false 
)

Definition at line 1449 of file class.ilObjGroupGUI.php.

1450 {
1451 $obj_service = $this->getObjectService();
1452 $form = new ilPropertyFormGUI();
1453
1454 if (!$a_omit_form_action) {
1455 switch ($a_mode) {
1456 case 'edit':
1457 $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1458 break;
1459
1460 default:
1461 $form->setTableWidth('600px');
1462 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
1463 break;
1464 }
1465 }
1466
1467 // title/description
1468 $this->initFormTitleDescription($form);
1469
1471
1472 if ($a_mode == 'edit') {
1473 // group period
1474 $cdur = new ilDateDurationInputGUI($this->lng->txt('grp_period'), 'period');
1475 $this->lng->loadLanguageModule('mem');
1476 $cdur->enableToggleFullTime(
1477 $this->lng->txt('mem_period_without_time'),
1478 !$this->object->getStartTimeIndication()
1479 );
1480 $cdur->setShowTime(true);
1481 $cdur->setInfo($this->lng->txt('grp_period_info'));
1482 $cdur->setStart($this->object->getStart());
1483 $cdur->setEnd($this->object->getEnd());
1484 $form->addItem($cdur);
1485
1486 // activation
1487 $this->lng->loadLanguageModule('rep');
1488
1489 $section = new ilFormSectionHeaderGUI();
1490 $section->setTitle($this->lng->txt('rep_activation_availability'));
1491 $form->addItem($section);
1492
1493 $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
1494 $online->setChecked(!$this->object->getOfflineStatus());
1495 $online->setInfo($this->lng->txt('grp_activation_online_info'));
1496 $form->addItem($online);
1497
1498
1499 // Group registration ############################################################
1500 $pres = new ilFormSectionHeaderGUI();
1501 $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1502 $form->addItem($pres);
1503
1504 // Registration type
1505 $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
1506 $reg_type->setValue((string) $this->object->getRegistrationType());
1507
1508 $opt_dir = new ilRadioOption(
1509 $this->lng->txt('grp_reg_direct'),
1511 );#$this->lng->txt('grp_reg_direct_info'));
1512 $reg_type->addOption($opt_dir);
1513
1514 $opt_pass = new ilRadioOption(
1515 $this->lng->txt('grp_pass_request'),
1517 );
1518 $pass = new ilTextInputGUI($this->lng->txt("password"), 'password');
1519 $pass->setRequired(true);
1520 $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1521 $pass->setValue($this->object->getPassword());
1522 $pass->setSize(32);
1523 $pass->setMaxLength(32);
1524 $opt_pass->addSubItem($pass);
1525 $reg_type->addOption($opt_pass);
1526
1527 $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), (string) ilGroupConstants::GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
1528 $reg_type->addOption($opt_req);
1529
1530 $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'), (string) ilGroupConstants::GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
1531 $reg_type->addOption($opt_deact);
1532
1533 // Registration codes
1534 $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
1535 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1536 $reg_code->setValue('1');
1537 $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1538 $form->addItem($reg_type);
1539
1540 // Registration codes
1541 if (!$this->object->getRegistrationAccessCode()) {
1542 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1543 }
1544 $reg_link = new ilHiddenInputGUI('reg_code');
1545 $reg_link->setValue($this->object->getRegistrationAccessCode());
1546 $form->addItem($reg_link);
1547
1548 $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1549 $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), 'rcode' . $this->object->getRegistrationAccessCode());
1550 $link->setHTML('<span class="small">' . $val . '</span>');
1551 $reg_code->addSubItem($link);
1552 $form->addItem($reg_code);
1553
1554 // time limit
1555 $this->lng->loadLanguageModule('dateplaner');
1556 $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'), 'reg');
1557 $dur->setShowTime(true);
1558 $dur->setStart($this->object->getRegistrationStart());
1559 $dur->setEnd($this->object->getRegistrationEnd());
1560 $form->addItem($dur);
1561
1562 // cancellation limit
1563 $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1564 $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1565 $cancel->setDate($this->object->getCancellationEnd());
1566 $form->addItem($cancel);
1567
1568 // max member
1569 $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'), 'registration_membership_limited');
1570 $lim->setValue('1');
1571 // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1572 $lim->setChecked($this->object->isMembershipLimited());
1573
1574 $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'), 'registration_min_members');
1575 $min->setSize(3);
1576 $min->setMaxLength(4);
1577 $min->setValue($this->object->getMinMembers() ?: '');
1578 $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1579 $lim->addSubItem($min);
1580
1581 $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'), 'registration_max_members');
1582 $max->setValue($this->object->getMaxMembers() ?: '');
1583 //$max->setTitle($this->lng->txt('members'));
1584 $max->setSize(3);
1585 $max->setMaxLength(4);
1586 $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1587 $lim->addSubItem($max);
1588
1589 /*
1590 $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1591 $wait->setValue(1);
1592 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1593 $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1594 $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1595 $lim->addSubItem($wait);
1596 $form->addItem($lim);
1597 */
1598
1599 $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1600
1601 $option = new ilRadioOption($this->lng->txt('none'), '0');
1602 $wait->addOption($option);
1603
1604 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), '1');
1605 $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1606 $wait->addOption($option);
1607
1608 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), '2');
1609 $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1610 $wait->addOption($option);
1611
1612 if ($this->object->hasWaitingListAutoFill()) {
1613 $wait->setValue('2');
1614 } elseif ($this->object->isWaitingListEnabled()) {
1615 $wait->setValue('1');
1616 } else {
1617 $wait->setValue('0');
1618 }
1619
1620 $lim->addSubItem($wait);
1621
1622 $form->addItem($lim);
1623
1624
1625 // Group presentation
1626 $parent_membership_ref_id = 0;
1627 $hasParentMembership =
1628 (
1629 $parent_membership_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs', true)
1630 );
1631
1632 $pres = new ilFormSectionHeaderGUI();
1633 $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1634 $form->addItem($pres);
1635
1636 // title and icon visibility
1637 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
1638
1639 // top actions visibility
1640 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
1641
1642 // custom icon
1643 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
1644
1645 // tile image
1646 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
1647
1648 // list presentation
1650
1651
1652 // presentation type
1653 $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'), 'view_mode');
1654 if ($hasParentMembership) {
1655 $parent_view_mode = ilObjCourseAccess::_lookupViewMode(ilObject::_lookupObjId($parent_membership_ref_id));
1656 $course_view_mode = '';
1657 switch ($parent_view_mode) {
1659 $course_view_mode = ': ' . $this->lng->txt('cntr_view_sessions');
1660 break;
1661
1663 $course_view_mode = ': ' . $this->lng->txt('cntr_view_simple');
1664 break;
1665
1667 $course_view_mode = ': ' . $this->lng->txt('cntr_view_by_type');
1668 break;
1669 }
1670 if ($course_view_mode) {
1671 $opt = new ilRadioOption($this->lng->txt('grp_view_inherit') . $course_view_mode, (string) ilContainer::VIEW_INHERIT);
1672 $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1673 $view_type->addOption($opt);
1674 }
1675 }
1676
1677 if ($hasParentMembership && ilObjGroup::lookupViewMode($this->object->getId()) == ilContainer::VIEW_INHERIT) {
1678 $view_type->setValue((string) ilContainer::VIEW_INHERIT);
1679 } else {
1680 $view_type->setValue((string) ilObjGroup::lookupViewMode($this->object->getId()));
1681 }
1682
1683 $opt = new ilRadioOption($this->lng->txt('cntr_view_sessions'), (string) ilContainer::VIEW_SESSIONS);
1684 $opt->setInfo($this->lng->txt('cntr_view_info_sessions'));
1685 $view_type->addOption($opt);
1686
1687 // Limited sessions
1688 $this->lng->loadLanguageModule('crs');
1689 $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl');
1690 $sess->setValue('1');
1691 $sess->setChecked($this->object->isSessionLimitEnabled());
1692 $sess->setInfo($this->lng->txt('sess_limit_info'));
1693
1694 $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp');
1695 $prev->setMinValue(0);
1696 $prev->setValue((string) (
1697 $this->object->getNumberOfPreviousSessions() == -1 ?
1698 '' :
1699 $this->object->getNumberOfPreviousSessions()
1700 ));
1701 $prev->setSize(2);
1702 $prev->setMaxLength(3);
1703 $sess->addSubItem($prev);
1704
1705 $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn');
1706 $next->setMinValue(0);
1707 $next->setValue((string) (
1708 $this->object->getNumberOfNextSessions() == -1 ?
1709 '' :
1710 $this->object->getNumberOfNextSessions()
1711 ));
1712 $next->setSize(2);
1713 $next->setMaxLength(3);
1714 $sess->addSubItem($next);
1715 $opt->addSubItem($sess);
1716
1717 $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'), (string) ilContainer::VIEW_SIMPLE);
1718 $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1719 $view_type->addOption($opt);
1720
1721 $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), (string) ilContainer::VIEW_BY_TYPE);
1722 $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1723 $view_type->addOption($opt);
1724 $form->addItem($view_type);
1725
1726
1727 // Sorting
1728 $sorting_settings = array();
1729 if ($hasParentMembership) {
1730 $sorting_settings[] = ilContainer::SORT_INHERIT;
1731 }
1732 $sorting_settings[] = ilContainer::SORT_TITLE;
1733 $sorting_settings[] = ilContainer::SORT_CREATION;
1734 $sorting_settings[] = ilContainer::SORT_MANUAL;
1735 $this->initSortingForm($form, $sorting_settings);
1736
1737 // additional features
1738 $feat = new ilFormSectionHeaderGUI();
1739 $feat->setTitle($this->lng->txt('obj_features'));
1740 $form->addItem($feat);
1741
1743 $this->object->getId(),
1744 $form,
1745 $this->getSubServices()
1746 );
1747
1748
1749 $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'), 'show_members');
1750 $mem->setChecked($this->object->getShowMembers());
1751 $mem->setInfo($this->lng->txt('grp_show_members_info'));
1752 $form->addItem($mem);
1753
1754 // Show members type
1755 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1756 $mail_type->setValue((string) $this->object->getMailToMembersType());
1757
1758 $mail_tutors = new ilRadioOption(
1759 $this->lng->txt('grp_mail_tutors_only'),
1761 $this->lng->txt('grp_mail_tutors_only_info')
1762 );
1763 $mail_type->addOption($mail_tutors);
1764
1765 $mail_all = new ilRadioOption(
1766 $this->lng->txt('grp_mail_all'),
1768 $this->lng->txt('grp_mail_all_info')
1769 );
1770 $mail_type->addOption($mail_all);
1771 $form->addItem($mail_type);
1772
1773 // Self notification
1774 $not = new ilCheckboxInputGUI($this->lng->txt('grp_auto_notification'), 'auto_notification');
1775 $not->setValue('1');
1776 $not->setInfo($this->lng->txt('grp_auto_notification_info'));
1777 $not->setChecked($this->object->getAutoNotification());
1778 $form->addItem($not);
1779 }
1780
1781 switch ($a_mode) {
1782 case 'create':
1783 $form->setTitle($this->lng->txt('grp_new'));
1784 $form->setTitleIcon(ilUtil::getImagePath('standard/icon_grp.svg'));
1785
1786 $form->addCommandButton('save', $this->lng->txt('grp_new'));
1787 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1788 break;
1789
1790 case 'edit':
1791 $form->setTitle($this->lng->txt('grp_edit'));
1792 $form->setTitleIcon(ilUtil::getImagePath('standard/icon_grp.svg'));
1793
1794 // Edit ecs export settings
1795 $ecs = new ilECSGroupSettings($this->object);
1796 $ecs->addSettingsToForm($form, 'grp');
1797
1798 $form->addCommandButton('update', $this->lng->txt('save'));
1799 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1800 break;
1801 }
1802 return $form;
1803 }
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
This class represents a custom property in a property form.
input GUI for a time span (start and end date)
This class represents a date/time property in a property form.
Class ilECSGroupSettings.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
static generateCode()
Generate new registration key.
This class represents a number property in a property form.
static _lookupViewMode(int $a_id)
static lookupViewMode($a_obj_id)
const MAIL_ALLOWED_TUTORS
initDidacticTemplate(ilPropertyFormGUI $form)
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
setTableWidth(string $a_width)
setTitleIcon(string $a_titleicon)
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text property in a property form.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References ilContainerGUI\$form, ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), ilObjectGUI\getObjectService(), ilGroupConstants\GRP_REGISTRATION_DEACTIVATED, ilGroupConstants\GRP_REGISTRATION_DIRECT, ilGroupConstants\GRP_REGISTRATION_PASSWORD, ilGroupConstants\GRP_REGISTRATION_REQUEST, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ILIAS\Repository\lng(), ilObjGroup\lookupViewMode(), ilObjGroup\MAIL_ALLOWED_ALL, ilObjGroup\MAIL_ALLOWED_TUTORS, ILIAS\Repository\object(), ilFormGUI\setFormAction(), ilPropertyFormGUI\setTableWidth(), ilPropertyFormGUI\setTitle(), ilPropertyFormGUI\setTitleIcon(), ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by editObject(), and updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

ilObjGroupGUI::initHeaderAction ( ?string  $sub_type = null,
?int  $sub_id = null 
)
protected

@inheritDoc

Reimplemented from ilObjectGUI.

Definition at line 1927 of file class.ilObjGroupGUI.php.

1928 {
1929 global $DIC;
1930
1931 $ilSetting = $DIC['ilSetting'];
1932 $ilUser = $DIC['ilUser'];
1933
1934 $lg = parent::initHeaderAction($sub_type, $sub_id);
1935
1936 if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1938 $noti = new ilMembershipNotifications($this->ref_id);
1939 if (!$noti->isCurrentUserActive()) {
1940 $lg->addHeaderIcon(
1941 "not_icon",
1942 ilUtil::getImagePath("object/notification_off.svg"),
1943 $this->lng->txt("grp_notification_deactivated")
1944 );
1945
1946 $this->ctrl->setParameter($this, "grp_ntf", 1);
1947 $caption = "grp_activate_notification";
1948 } else {
1949 $lg->addHeaderIcon(
1950 "not_icon",
1951 ilUtil::getImagePath("object/notification_on.svg"),
1952 $this->lng->txt("grp_notification_activated")
1953 );
1954
1955 $this->ctrl->setParameter($this, "grp_ntf", 0);
1956 $caption = "grp_deactivate_notification";
1957 }
1958
1959 if ($noti->canCurrentUserEdit()) {
1960 $lg->addCustomCommand(
1961 $this->ctrl->getLinkTarget($this, "saveNotification"),
1962 $caption
1963 );
1964 }
1965
1966 $this->ctrl->setParameter($this, "grp_ntf", "");
1967 }
1968 }
1969
1970 return $lg;
1971 }
Membership notification settings.
global $ilSetting
Definition: privfeed.php:31

References $DIC, $ilSetting, ilGroupParticipants\_isParticipant(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ilMembershipNotifications\isActiveForRefId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

Definition at line 873 of file class.ilObjGroupGUI.php.

874 {
875 $form = new ilPropertyFormGUI();
876 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
877 $form->setTitle($this->lng->txt('grp_general_informations'));
878 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
879 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
880
881 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
882 $area->setInfo($this->lng->txt('grp_information_info'));
883 $area->setValue($this->object->getInformation());
884 $area->setRows(8);
885 $area->setCols(80);
886 $form->addItem($area);
887
888 return $form;
889 }
This class represents a text area property in a property form.

References ilContainerGUI\$form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by editInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRefIdFromQuery()

ilObjGroupGUI::initRefIdFromQuery ( )
protected

Definition at line 75 of file class.ilObjGroupGUI.php.

75 : int
76 {
77 if ($this->http->wrapper()->query()->has('ref_id')) {
78 return $this->http->wrapper()->query()->retrieve(
79 'ref_id',
80 $this->refinery->kindlyTo()->int()
81 );
82 }
83 return 0;
84 }

References ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

Definition at line 2017 of file class.ilObjGroupGUI.php.

2017 : void
2018 {
2019 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2020 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

Definition at line 990 of file class.ilObjGroupGUI.php.

990 : void
991 {
992 $this->checkPermission('leave');
993
994 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
995 if ($part->isLastAdmin($this->user->getId())) {
996 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('grp_err_administrator_required'));
997 $this->viewObject();
998 return;
999 }
1000
1001 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
1002
1003 $cgui = new ilConfirmationGUI();
1004 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1005 $cgui->setFormAction($this->ctrl->getFormAction($this));
1006 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1007 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1008 $this->tpl->setContent($cgui->getHTML());
1009 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
viewObject()
@inheritDoc

References ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and viewObject().

+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )
protected

Definition at line 1378 of file class.ilObjGroupGUI.php.

1378 : void
1379 {
1380 $this->ctrl->redirectByClass('ilgroupmembershipgui');
1381 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ modifyItemGUI()

ilObjGroupGUI::modifyItemGUI ( ilObjectListGUI  $a_item_list_gui,
array  $a_item_data 
)

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 486 of file class.ilObjGroupGUI.php.

486 : void
487 {
488 // if folder is in a course, modify item list gui according to course requirements
489 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs')) {
490 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
492 $a_item_list_gui,
493 'ilcoursecontentgui',
494 $a_item_data,
495 ilObjCourse::_lookupAboStatus($course_obj_id),
496 $course_ref_id,
497 $course_obj_id,
498 $this->object->getRefId()
499 );
500 }
501 }
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 _lookupAboStatus(int $a_id)

References ilObjCourse\_lookupAboStatus(), ilObject\_lookupObjId(), ilObjCourseGUI\_modifyItemGUI(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput ( bool  $show_subobjects = true)

@inheritDoc

Reimplemented from ilObjectGUI.

Definition at line 1910 of file class.ilObjGroupGUI.php.

1910 : bool
1911 {
1912 return parent::prepareOutput($show_subobjects);
1913 }

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ readMemberData()

ilObjGroupGUI::readMemberData ( array  $ids,
?array  $selected_columns = null 
)

This reads out all fields in usr_data, including usr_id, firstname, lastname, and login, so should never be necessary here to call ilObjUser a second time (#31394).

Definition at line 908 of file class.ilObjGroupGUI.php.

908 : array
909 {
911
912 $this->show_tracking =
913 (
915 );
916
917 $completed = $in_progress = $failed = [];
918 if ($this->show_tracking) {
919 $olp = ilObjectLP::getInstance($this->object->getId());
920 $this->show_tracking = $olp->isActive();
921 }
922
923 if ($this->show_tracking) {
924 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
925 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
926 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
927 }
928
929 if ($privacy->enabledGroupAccessTimes()) {
930 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
931 }
932
933 $do_prtf = (is_array($selected_columns) &&
934 in_array('prtf', $selected_columns) &&
935 is_array($ids));
936 if ($do_prtf) {
938 $ids
939 );
940 }
941
947 $profile_data = ilObjUser::_readUsersProfileData($ids);
948 $members = [];
949 foreach ($ids as $usr_id) {
950 $tmp_data['notification'] = (bool) $this->object->members_obj->isNotificationEnabled((int) $usr_id) ? 1 : 0;
951 $tmp_data['contact'] = (bool) $this->object->members_obj->isContact((int) $usr_id) ? 1 : 0;
952
953 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
954 $tmp_data[$field] = $value;
955 }
956
957 if ($this->show_tracking) {
958 $tmp_data['progress'] = '';
959 if (in_array($usr_id, $completed)) {
960 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
961 } elseif (in_array($usr_id, $in_progress)) {
962 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
963 } elseif (in_array($usr_id, $failed)) {
964 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
965 } else {
966 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
967 }
968 }
969
970 if ($privacy->enabledGroupAccessTimes()) {
971 if (isset($progress[$usr_id]['ts']) && ($progress[$usr_id]['ts'] ?? false)) {
972 $tmp_data['access_time'] = ilDatePresentation::formatDate(
973 $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
974 );
975 $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
976 } else {
977 $tmp_data['access_time'] = $this->lng->txt('no_date');
978 $tmp_data['access_time_unix'] = 0;
979 }
980 }
981 $tmp_data['prtf'] = [];
982 if ($do_prtf) {
983 $tmp_data['prtf'] = ($all_prtf[$usr_id] ?? []);
984 }
985 $members[$usr_id] = $tmp_data;
986 }
987 return $members;
988 }
const IL_CAL_UNIX
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids)
static _readUsersProfileData(array $a_user_ids)
static getInstance(int $obj_id)

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilLearningProgress\_lookupProgressByObjId(), ilObjUser\_readUsersProfileData(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilPrivacySettings\getInstance(), ilObjectLP\getInstance(), IL_CAL_UNIX, ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

Reimplemented from ilContainerGUI.

Definition at line 477 of file class.ilObjGroupGUI.php.

477 : void
478 {
479 $this->tabs->activateTab("view_content");
480 parent::renderObject();
481 }

References ILIAS\Repository\tabs().

Referenced by executeCommand(), and viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )
Todo:
use $form->getInput()

Definition at line 829 of file class.ilObjGroupGUI.php.

829 : void
830 {
831 $location = [];
832 if ($this->http->wrapper()->post()->has('location')) {
833 $custom_transformer = $this->refinery->custom()->transformation(
834 function ($array) {
835 return $array;
836 }
837 );
838 $location = $this->http->wrapper()->post()->retrieve(
839 'location',
840 $custom_transformer
841 );
842 }
843 $enable_map = false;
844 if ($this->http->wrapper()->post()->has('enable_map')) {
845 $enable_map = $this->http->wrapper()->post()->retrieve(
846 'enable_map',
847 $this->refinery->kindlyTo()->bool()
848 );
849 }
850
851 $this->object->setLatitude((string) $location['latitude']);
852 $this->object->setLongitude((string) $location['longitude']);
853 $this->object->setLocationZoom((int) $location['zoom']);
854 $this->object->setEnableGroupMap($enable_map);
855 $this->object->update();
856 $this->ctrl->redirect($this, "editMapSettings");
857 }
$location
Definition: buildRTE.php:22

References $location, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

Definition at line 1355 of file class.ilObjGroupGUI.php.

1355 : void
1356 {
1357 $noti = new ilMembershipNotifications($this->ref_id);
1358
1359 $grp_notification = false;
1360 if ($this->http->wrapper()->query()->has('grp_ntf')) {
1361 $grp_notification = $this->http->wrapper()->query()->retrieve(
1362 'grp_ntf',
1363 $this->refinery->kindlyTo()->bool()
1364 );
1365 }
1366
1367 if ($noti->canCurrentUserEdit()) {
1368 if ($grp_notification) {
1369 $noti->activateUser();
1370 } else {
1371 $noti->deactivateUser();
1372 }
1373 }
1374 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1375 $this->ctrl->redirect($this, "");
1376 }

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

@inheritDoc

Reimplemented from ilContainerGUI.

Definition at line 2025 of file class.ilObjGroupGUI.php.

2025 : void
2026 {
2027 $this->ctrl->setReturn($this, "view");
2028 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

Definition at line 1805 of file class.ilObjGroupGUI.php.

1805 : void
1806 {
1807 switch ($a_tab) {
1808 case 'settings':
1809 $this->tabs_gui->addSubTabTarget(
1810 "grp_settings",
1811 $this->ctrl->getLinkTarget($this, 'edit'),
1812 "edit",
1813 get_class($this)
1814 );
1815
1816 $this->tabs_gui->addSubTabTarget(
1817 "grp_info_settings",
1818 $this->ctrl->getLinkTarget($this, 'editInfo'),
1819 "editInfo",
1820 get_class($this)
1821 );
1822
1823 if (ilMapUtil::isActivated()) {
1824 $this->tabs_gui->addSubTabTarget(
1825 "grp_map_settings",
1826 $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1827 "editMapSettings",
1828 get_class($this)
1829 );
1830 }
1831
1832 $this->tabs_gui->addSubTabTarget(
1833 'groupings',
1834 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1835 'listGroupings',
1836 get_class($this)
1837 );
1838
1839 // only show if export permission is granted
1840 if (ilPrivacySettings::getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1841 $this->tabs_gui->addSubTabTarget(
1842 'grp_custom_user_fields',
1843 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1844 '',
1845 'ilobjectcustomuserfieldsgui'
1846 );
1847 }
1848
1849 // news settings
1850 if ($this->object->getUseNews()) {
1851 $this->tabs_gui->addSubTab(
1852 'obj_news_settings',
1853 $this->lng->txt("cont_news_settings"),
1854 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1855 );
1856 }
1857
1858 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1859 if ($lti_settings->hasSettingsAccess()) {
1860 $this->tabs_gui->addSubTabTarget(
1861 'lti_provider',
1862 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1863 );
1864 }
1865
1866 $this->tabs_gui->addSubTabTarget(
1867 "obj_multilinguality",
1868 $this->ctrl->getLinkTargetByClass(TranslationGUI::class, ""),
1869 "",
1870 TranslationGUI::class
1871 );
1872
1873
1874 break;
1875 }
1876 }

References ilCourseDefinedFieldDefinition\_hasFields(), ILIAS\Repository\ctrl(), ilPrivacySettings\getInstance(), ilMapUtil\isActivated(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by editInfoObject(), editMapSettingsObject(), editObject(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsubscribeObject()

ilObjGroupGUI::unsubscribeObject ( )

Definition at line 1011 of file class.ilObjGroupGUI.php.

1011 : void
1012 {
1013 $this->checkPermission('leave');
1014 $this->object->members_obj->delete($this->user->getId());
1015 $this->object->members_obj->sendNotification(
1017 $this->user->getId()
1018 );
1019 $this->object->members_obj->sendNotification(
1021 $this->user->getId()
1022 );
1023
1024 $this->tpl->setOnScreenMessage('success', $this->lng->txt('grp_msg_membership_annulled'), true);
1025 $this->ctrl->setParameterByClass(
1026 "ilrepositorygui",
1027 "ref_id",
1028 $this->tree->getParentId($this->object->getRefId())
1029 );
1030 $this->ctrl->redirectByClass("ilrepositorygui", "");
1031 }

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

Definition at line 560 of file class.ilObjGroupGUI.php.

560 : void
561 {
563 $this->object->getRefId(),
564 (int) $_REQUEST['grp_type']
565 );
566
567 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
568 $this->ctrl->redirect($this, 'edit');
569 }
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilDidacticTemplateUtils\switchTemplate().

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

Definition at line 891 of file class.ilObjGroupGUI.php.

891 : void
892 {
893 $this->checkPermission('manage_members');
894
895 $important = '';
896 if ($this->http->wrapper()->post()->has('important')) {
897 $important = $this->http->wrapper()->post()->retrieve(
898 'important',
899 $this->refinery->kindlyTo()->string()
900 );
901 }
902 $this->object->setInformation($important);
903 $this->object->update();
904 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
905 $this->editInfoObject();
906 }

References ilObjectGUI\checkPermission(), editInfoObject(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

+ Here is the call graph for this function:

◆ updateObject()

ilObjGroupGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

Definition at line 572 of file class.ilObjGroupGUI.php.

572 : void
573 {
574 $obj_service = $this->getObjectService();
575 $this->checkPermission('write');
576
577 $form = $this->initForm();
578 $new_type = 0;
579 if ($form->checkInput()) {
580 // handle group type settings
581 $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
582
583 $modified = false;
584 $new_type_info = $form->getInput('didactic_type');
585 if ($new_type_info) {
586 $new_type = explode('_', $form->getInput('didactic_type'));
587 $new_type = (int) $new_type[1];
588
589 $modified = ($new_type !== $old_type);
590 ilLoggerFactory::getLogger('grp')->info('Switched group type from ' . $old_type . ' to ' . $new_type);
591 }
592
593 // Additional checks: both tile and session limitation activated (not supported)
594 if (
595 $form->getInput('sl') == "1" &&
596 $form->getInput('list_presentation') == "tile") {
598 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_tile_and_session_limit_not_supported'));
599 $this->editObject($form);
600 return;
601 }
602
603 $this->object->setTitle($form->getInput('title'));
604 $this->object->setDescription($form->getInput('desc'));
605 $this->object->setGroupType((int) $form->getInput('grp_type'));
606 $this->object->setRegistrationType((int) $form->getInput('registration_type'));
607 $this->object->setPassword($form->getInput('password'));
608 $this->object->enableUnlimitedRegistration(!$form->getInput('reg_limit_time'));
609 $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
610 $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
611 $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
612 $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
613 $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
614 $this->object->setViewMode((int) $form->getInput('view_mode'));
615 $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
616 $this->object->setShowMembers((bool) $form->getInput('show_members'));
617 $this->object->setAutoNotification((bool) $form->getInput('auto_notification'));
618
619 // session limit
620 $this->object->enableSessionLimit((bool) $form->getInput('sl'));
621 $session_sp = $form->getInput('sp');
622 $this->object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (int) $session_sp : -1);
623 $session_sn = $form->getInput('sn');
624 $this->object->setNumberOfnextSessions(is_numeric($session_sn) ? (int) $session_sn : -1);
625
626 // period
627 $grp_period = $form->getItemByPostVar("period");
628 $this->object->setPeriod(
629 $grp_period->getStart(),
630 $grp_period->getEnd()
631 );
632
633 $reg = $form->getItemByPostVar("reg");
634 if ($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime) {
635 $this->object->enableUnlimitedRegistration(false);
636 } else {
637 $this->object->enableUnlimitedRegistration(true);
638 }
639
640 $this->object->setRegistrationStart($reg->getStart());
641 $this->object->setRegistrationEnd($reg->getEnd());
642
643 $cancel_end = $form->getItemByPostVar("cancel_end");
644 $this->object->setCancellationEnd($cancel_end->getDate());
645
646 $waiting_list = 0;
647 if ($this->http->wrapper()->post()->has('waiting_list')) {
648 $waiting_list = $this->http->wrapper()->post()->retrieve(
649 'waiting_list',
650 $this->refinery->kindlyTo()->int()
651 );
652 }
653 switch ($waiting_list) {
654 case 2:
655 $this->object->enableWaitingList(true);
656 $this->object->setWaitingListAutoFill(true);
657 break;
658
659 case 1:
660 $this->object->enableWaitingList(true);
661 $this->object->setWaitingListAutoFill(false);
662 break;
663
664 default:
665 $this->object->enableWaitingList(false);
666 $this->object->setWaitingListAutoFill(false);
667 break;
668 }
669 $this->object->handleAutoFill();
670
671 // activation
672 $property_online = $this->object->getObjectProperties()->getPropertyIsOnline();
673 $online = $form->getInput('activation_online') ?
674 $property_online->withOnline() :
675 $property_online->withOffline();
676 $this->object->getObjectProperties()->storePropertyIsOnline($online);
677
678 // update object settings
679 $this->object->update();
680
681 // title icon visibility
682 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
683
684 // top actions visibility
685 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
686
687 // custom icon
688 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
689
690 // tile image
691 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
692
693 // list presentation
695
697 $this->object->getId(),
698 $form,
699 $this->getSubServices()
700 );
701
702 // Save sorting
704
705 // BEGIN ChangeEvents: Record update Object.
707 $this->object->getId(),
708 $this->user->getId(),
709 'update'
710 );
711 // END PATCH ChangeEvents: Record update Object.
712 // Update ecs export settings
713 $ecs = new ilECSGroupSettings($this->object);
714 $ecs->handleSettingsUpdate($form);
715 } else {
716 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
717
719 $this->editObject($form);
720 return;
721 }
722
723 // group type modified
724 if ($modified) {
725 if ($new_type == 0) {
726 $new_type_txt = $GLOBALS['DIC']['lng']->txt('il_grp_status_open');
727 } else {
728 $dtpl = new ilDidacticTemplateSetting($new_type);
729 $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['DIC']['lng']->getLangKey());
730 }
731
732
733 $confirm = new ilConfirmationGUI();
734 $confirm->setHeaderText($this->lng->txt('grp_warn_grp_type_changed'));
735 $confirm->setFormAction($this->ctrl->getFormAction($this));
736 $confirm->addItem(
737 'grp_type',
738 (string) $new_type,
739 $this->lng->txt('grp_info_new_grp_type') . ': ' . $new_type_txt
740 );
741 $confirm->setConfirm($this->lng->txt('grp_change_type'), 'updateGroupType');
742 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
743
744 $this->tpl->setContent($confirm->getHTML());
745 } else {
746 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
747 $this->ctrl->redirect($this, 'edit');
748 }
749 }
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
saveListPresentation(ilPropertyFormGUI $form)
saveSortingSettings(ilPropertyFormGUI $form)
static getLogger(string $a_component_id)
Get component logger.
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getItemByPostVar(string $a_post_var)

References ilContainerGUI\$form, $GLOBALS, ilChangeEvent\_recordWriteEvent(), ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\editObject(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilLoggerFactory\getLogger(), ilObjectGUI\getObjectService(), ILIAS\FileDelivery\http(), initForm(), ILIAS\Repository\int(), ILIAS\UI\examples\Symbol\Glyph\Language\language(), ILIAS\Repository\lng(), ilDidacticTemplateObjSettings\lookupTemplateId(), ILIAS\Repository\object(), ILIAS\Repository\refinery(), ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), ilPropertyFormGUI\setValuesByPost(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ viewObject()

ilObjGroupGUI::viewObject ( )

@inheritDoc

Reimplemented from ilObjectGUI.

Definition at line 454 of file class.ilObjGroupGUI.php.

454 : void
455 {
457 $this->user->getId(),
458 $this->object->getId(),
459 $this->object->getRefId(),
460 'grp'
461 );
462
463 if ($this->isActiveAdministrationPanel()) {
464 parent::renderObject();
466 return;
467 }
468
469 if (!$this->checkAgreement()) {
470 $this->ctrl->redirectByClass(ilMemberAgreementGUI::class);
471 }
472
473 $this->tabs_gui->setTabActive('view_content');
474 $this->renderObject();
475 }

References ilLearningProgress\_tracProgress(), ilObjectGUI\addAdoptContentLinkToToolbar(), checkAgreement(), ILIAS\Repository\ctrl(), ilContainerGUI\isActiveAdministrationPanel(), renderObject(), and ILIAS\Repository\user().

Referenced by leaveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $news

News ilObjGroupGUI::$news
protected

Definition at line 54 of file class.ilObjGroupGUI.php.

◆ $profile

Profile ilObjGroupGUI::$profile
protected

Definition at line 55 of file class.ilObjGroupGUI.php.

◆ $rbacsystem

ilRbacSystem ilObjGroupGUI::$rbacsystem
protected

Definition at line 53 of file class.ilObjGroupGUI.php.

◆ $refinery

Factory ilObjGroupGUI::$refinery
protected

Definition at line 52 of file class.ilObjGroupGUI.php.

Referenced by _goto().

◆ $show_tracking

bool ilObjGroupGUI::$show_tracking = false
protected

Definition at line 50 of file class.ilObjGroupGUI.php.


The documentation for this class was generated from the following file: