ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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 ()
 
 undelete (array $trash_ids)
 
 restoreToNewLocation (array $trash_ids)
 
 confirmRemoveFromSystem (array $trash_ids)
 
 removeFromSystemObject (?int $trash_id=null)
 
 restoreToNewLocationObject (?int $trash_id=null)
 
 undeleteObject (?int $trash_id=null)
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject (?int $trash_id=null)
 
 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)
 
 checkTrashAccess ()
 
 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 ()
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 getListPresentationForRedraw (int $parent_ref_id)
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 buildLabelForSortMode (int $sort_mode)
 
 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)
 
 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
 
ILIAS Repository InternalGUIService $repository_gui
 

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 1399 of file class.ilObjGroupGUI.php.

1399 : void
1400 {
1401 global $DIC;
1402 $main_tpl = $DIC->ui()->mainTemplate();
1403 $a_target = (int) $a_target;
1404
1405 $ilUser = $DIC->user();
1406 $ilAccess = $DIC->access();
1407 $lng = $DIC->language();
1408 $ilErr = $DIC['ilErr'];
1409 $http = $DIC->http();
1410 $refinery = $DIC->refinery();
1411
1412 if (substr($a_add, 0, 5) == 'rcode') {
1413 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1414 // Redirect to login for anonymous
1416 "login.php?target=grp_" . $a_target . "_" . $a_add . "&cmd=force_login&lang=" .
1417 $ilUser->getCurrentLanguage()
1418 );
1419 }
1420
1421 // Redirects to target location after assigning user to group
1423 $a_target,
1425 substr($a_add, 5)
1426 );
1427 }
1428
1429 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1430 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1431 }
1432
1433 if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1434 ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1435 }
1436
1437 if ($ilAccess->checkAccess("read", "", $a_target)) {
1439 } else {
1440 // to do: force flat view
1441 if ($ilAccess->checkAccess("visible", "", $a_target)) {
1442 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1443 } else {
1444 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1445 $main_tpl->setOnScreenMessage('failure', sprintf(
1446 $lng->txt("msg_no_perm_read_item"),
1448 ), true);
1450 }
1451 }
1452 }
1453 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1454 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
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

References $DIC, ilObjectGUI\$http, ilObjectGUI\$lng, $refinery, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ANONYMOUS_USER_ID, ilMembershipRegistrationCodeUtils\handleCode(), ILIAS\Repository\int(), ilContSkillPresentationGUI\isAccessible(), 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 1048 of file class.ilObjGroupGUI.php.

1048 : void
1049 {
1050 $this->tabs_gui->addTab(
1051 "view_content",
1052 $this->lng->txt("content"),
1053 $this->ctrl->getLinkTarget($this, "view")
1054 );
1055 }

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 1982 of file class.ilObjGroupGUI.php.

1982 : array
1983 {
1984 // object defined fields
1985 $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1986 $udfs = $this->profile->getAllUserDefinedFields();
1987
1988 return array_reduce(
1989 iterator_to_array($this->profile->getDataForMultiple(array_keys($a_data))),
1990 function (array $c, ProfileData $v) use ($a_data, $udfs, $odfs): array {
1991 $c[$v->getId()] = $a_data[$v->getId()];
1992
1993 foreach ($udfs as $field) {
1994 $field_id = $field->getIdentifier();
1995 $c[$v->getId()]['udf_' . $field_id] = implode(', ', $v->getAdditionalFieldByIdentifier($field_id) ?? []);
1996 }
1997
1998 foreach ((array) ($odfs[$v->getId()] ?? []) as $cdf_field => $cdf_value) {
1999 $c[$v->getId()]['cdf_' . $cdf_field] = (string) $cdf_value;
2000 }
2001 return $c;
2002 },
2003 []
2004 );
2005 }
static _getValuesByObjId(int $a_obj_id)
foreach( $report as $row)

References Vendor\Package\$c, ilCourseUserData\_getValuesByObjId(), foreach, 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 512 of file class.ilObjGroupGUI.php.

512 : void
513 {
514 $new_object->setRegistrationType(
516 );
517 $new_object->update();
518
519 // check for parent group or course => SORT_INHERIT
520 $sort_mode = ilContainer::SORT_TITLE;
521 if (
522 $this->tree->checkForParentType($new_object->getRefId(), 'crs', true) ||
523 $this->tree->checkForParentType($new_object->getRefId(), 'grp', true)
524 ) {
525 $sort_mode = ilContainer::SORT_INHERIT;
526 }
527
528 // Save sorting
529 $sort = new ilContainerSortingSettings($new_object->getId());
530 $sort->setSortMode($sort_mode);
531 $sort->update();
532
533
534 // Add user as admin and enable notification
535 $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
536 $members_obj->add($this->user->getId(), ilParticipants::IL_GRP_ADMIN);
537 $members_obj->updateNotification($this->user->getId(), (bool) $this->settings->get('mail_grp_admin_notification', '1'));
538 $members_obj->updateContact($this->user->getId(), true);
539
540 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
541 if ($redirect) {
542 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
543 $this->ctrl->redirect($this, 'edit');
544 }
545 }
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 1886 of file class.ilObjGroupGUI.php.

1886 : bool
1887 {
1888 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1889 return true;
1890 }
1891
1892 // Disable aggrement if is not member of group
1893 if (!$this->object->members_obj->isAssigned($this->user->getId())) {
1894 return true;
1895 }
1896
1897 if (ilMemberViewSettings::getInstance()->isActive()) {
1898 return true;
1899 }
1900
1901 $privacy = ilPrivacySettings::getInstance();
1902
1903 // Check agreement
1904 if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1905 and !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())) {
1906 return false;
1907 }
1908 // Check required fields
1909 if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
1910 return false;
1911 }
1912 return true;
1913 }
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 1923 of file class.ilObjGroupGUI.php.

1923 : string
1924 {
1925 $link = chr(13) . chr(10) . chr(13) . chr(10);
1926 $link .= $this->lng->txt('grp_mail_permanent_link');
1927 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1928 $link .= ilLink::_getLink($this->object->getRefId());
1929 return rawurlencode(base64_encode($link));
1930 }

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 874 of file class.ilObjGroupGUI.php.

874 : void
875 {
876 $this->checkPermission('write');
877
878 $this->setSubTabs('settings');
879 $this->tabs_gui->setTabActive('settings');
880 $this->tabs_gui->setSubTabActive('grp_info_settings');
881
882 $form = $this->initInfoEditor();
883 $this->tpl->setContent($form->getHTML());
884 }
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 779 of file class.ilObjGroupGUI.php.

779 : void
780 {
781 $this->setSubTabs("settings");
782 $this->tabs_gui->setTabActive('settings');
783 $this->tabs_gui->setSubTabActive('grp_map_settings');
784
785 if (!ilMapUtil::isActivated() ||
786 !$this->access->checkAccess("write", "", $this->object->getRefId())) {
787 return;
788 }
789
790 $latitude = $this->object->getLatitude();
791 $longitude = $this->object->getLongitude();
792 $zoom = $this->object->getLocationZoom();
793
794 // Get Default settings, when nothing is set
795 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
797 $latitude = $def["latitude"];
798 $longitude = $def["longitude"];
799 $zoom = $def["zoom"];
800 }
801
802
803 $form = new ilPropertyFormGUI();
804 $form->setFormAction($this->ctrl->getFormAction($this));
805
806 $form->setTitle($this->lng->txt("grp_map_settings"));
807
808 // enable map
809 $public = new ilCheckboxInputGUI(
810 $this->lng->txt("grp_enable_map"),
811 "enable_map"
812 );
813 $public->setValue("1");
814 $public->setChecked($this->object->getEnableGroupMap());
815 $form->addItem($public);
816
817 // map location
818 $loc_prop = new ilLocationInputGUI(
819 $this->lng->txt("grp_map_location"),
820 "location"
821 );
822 $loc_prop->setLatitude((float) $latitude);
823 $loc_prop->setLongitude((float) $longitude);
824 $loc_prop->setZoom((int) $zoom);
825 $form->addItem($loc_prop);
826
827 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
828
829 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
830 }
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 550 of file class.ilObjGroupGUI.php.

550 : void
551 {
552 $this->checkPermission("write");
553
554 $this->setSubTabs('settings');
555 $this->tabs_gui->setTabActive('settings');
556 $this->tabs_gui->setSubTabActive('general');
557
558 if (!$a_form) {
559 $a_form = $this->initForm('edit');
560 }
561 $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
562 }
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.
@ilCtrl_Calls ilBadgeManagementGUI: ilPropertyFormGUI
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
ILIAS Container InternalGUIService $gui
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.
The tab of an ILIAS object that releases it to the platforms allowed for its type,...
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:44
static http()
Fetches the global http state from ILIAS.
$GLOBALS["DIC"]
Definition: wac.php:66

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(), 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 2007 of file class.ilObjGroupGUI.php.

2007 : array
2008 {
2009 $local_roles = $this->object->getLocalGroupRoles();
2010 $grp_member = $this->object->getDefaultMemberRole();
2011 $grp_roles = array();
2012
2013 //put the group member role to the top of the crs_roles array
2014 if (in_array($grp_member, $local_roles)) {
2015 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2016 unset($local_roles[$grp_roles[$grp_member]]);
2017 }
2018
2019 foreach ($local_roles as $title => $role_id) {
2020 $grp_roles[(int) $role_id] = ilObjRole::_getTranslation($title);
2021 }
2022 return $grp_roles;
2023 }
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 757 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 1060 of file class.ilObjGroupGUI.php.

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

1216 : void
1217 {
1218 $this->tabs_gui->setTabActive('info_short');
1219
1220 if (!$this->checkPermissionBool('read')) {
1221 $this->checkPermission('visible');
1222 }
1223
1224 $info = new ilInfoScreenGUI($this);
1225
1226 if (strlen($this->object->getInformation())) {
1227 $info->addSection($this->lng->txt('grp_general_informations'));
1228 $info->addProperty($this->lng->txt('grp_information'), nl2br(
1229 ilUtil::makeClickable($this->object->getInformation(), true)
1230 ));
1231 }
1232
1233 $info->enablePrivateNotes();
1234 $info->enableLearningProgress(true);
1235
1236 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'grp', $this->object->getId());
1237 $record_gui->setInfoObject($info);
1238 $record_gui->parse();
1239
1240 // meta data
1241 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1242
1243
1244 // support contacts
1245 $parts = ilParticipants::getInstance($this->object->getRefId());
1246 $contacts = $parts->getContacts();
1247 if (count($contacts) > 0) {
1248 $info->addSection($this->lng->txt("grp_mem_contacts"));
1249 foreach ($contacts as $c) {
1250 $pgui = new PublicProfileGUI($c);
1251 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
1252 $pgui->setEmbedded(true);
1253 $info->addProperty("", $pgui->getHTML());
1254 }
1255 }
1256
1257
1258 $info->addSection($this->lng->txt('group_registration'));
1259 $info->showLDAPRoleGroupMappingInfo();
1260
1261 if (!$this->object->isRegistrationEnabled()) {
1262 $info->addProperty(
1263 $this->lng->txt('group_registration_mode'),
1264 $this->lng->txt('grp_reg_deac_info_screen')
1265 );
1266 } else {
1267 switch ($this->object->getRegistrationType()) {
1269 $info->addProperty(
1270 $this->lng->txt('group_registration_mode'),
1271 $this->lng->txt('grp_reg_direct_info_screen')
1272 );
1273 break;
1274
1276 $info->addProperty(
1277 $this->lng->txt('group_registration_mode'),
1278 $this->lng->txt('grp_reg_req_info_screen')
1279 );
1280 break;
1281
1283 $info->addProperty(
1284 $this->lng->txt('group_registration_mode'),
1285 $this->lng->txt('grp_reg_passwd_info_screen')
1286 );
1287 break;
1288 }
1289 /*
1290 $info->addProperty($this->lng->txt('group_registration_time'),
1291 ilDatePresentation::formatPeriod(
1292 $this->object->getRegistrationStart(),
1293 $this->object->getRegistrationEnd()));
1294 */
1295 if ($this->object->isRegistrationUnlimited()) {
1296 $info->addProperty(
1297 $this->lng->txt('group_registration_time'),
1298 $this->lng->txt('grp_registration_unlimited')
1299 );
1300 } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
1301 $info->addProperty(
1302 $this->lng->txt("group_registration_time"),
1303 $this->lng->txt('cal_until') . ' ' .
1304 ilDatePresentation::formatDate($this->object->getRegistrationEnd())
1305 );
1306 } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
1307 $info->addProperty(
1308 $this->lng->txt("group_registration_time"),
1309 $this->lng->txt('cal_from') . ' ' .
1310 ilDatePresentation::formatDate($this->object->getRegistrationStart())
1311 );
1312 }
1313 if ($this->object->isMembershipLimited()) {
1314 if ($this->object->getMinMembers()) {
1315 $info->addProperty(
1316 $this->lng->txt("mem_min_users"),
1317 (string) $this->object->getMinMembers()
1318 );
1319 }
1320 if ($this->object->getMaxMembers()) {
1321 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1322
1323 $info->addProperty(
1324 $this->lng->txt('mem_free_places'),
1325 (string) ($reg_info['reg_info_free_places'] ?? '0')
1326 );
1327 }
1328 }
1329
1330 if ($this->object->getCancellationEnd()) {
1331 $info->addProperty(
1332 $this->lng->txt('grp_cancellation_end'),
1333 ilDatePresentation::formatDate($this->object->getCancellationEnd())
1334 );
1335 }
1336 }
1337
1338 if ($this->object->getStart() instanceof ilDateTime &&
1339 !$this->object->getStart()->isNull()
1340 ) {
1341 $info->addProperty(
1342 $this->lng->txt('grp_period'),
1344 $this->object->getStart(),
1345 $this->object->getEnd()
1346 )
1347 );
1348 }
1349
1350 // Confirmation
1351 $privacy = ilPrivacySettings::getInstance();
1352
1353 if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
1354 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1355
1356 $this->lng->loadLanguageModule('ps');
1357 $info->addSection($this->lng->txt('grp_user_agreement_info'));
1358 $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
1359
1360 if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
1361 $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
1362 }
1363 }
1364
1365
1366 // forward the command
1367 $this->ctrl->forwardCommand($info);
1368 }
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

References Vendor\Package\$c, $info, 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 1211 of file class.ilObjGroupGUI.php.

1211 : void
1212 {
1213 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
1214 }

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 1457 of file class.ilObjGroupGUI.php.

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

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

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 886 of file class.ilObjGroupGUI.php.

887 {
888 $form = new ilPropertyFormGUI();
889 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
890 $form->setTitle($this->lng->txt('grp_general_informations'));
891 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
892 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
893
894 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
895 $area->setInfo($this->lng->txt('grp_information_info'));
896 $area->setValue($this->object->getInformation());
897 $area->setRows(8);
898 $area->setCols(80);
899 $form->addItem($area);
900
901 return $form;
902 }
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 2025 of file class.ilObjGroupGUI.php.

2025 : void
2026 {
2027 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2028 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

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

1005 : void
1006 {
1007 $this->checkPermission('leave');
1008
1009 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1010 if ($part->isLastAdmin($this->user->getId())) {
1011 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('grp_err_administrator_required'));
1012 $this->viewObject();
1013 return;
1014 }
1015
1016 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
1017
1018 $cgui = new ilConfirmationGUI();
1019 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1020 $cgui->setFormAction($this->ctrl->getFormAction($this));
1021 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1022 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1023 $this->tpl->setContent($cgui->getHTML());
1024 }
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 1393 of file class.ilObjGroupGUI.php.

1393 : void
1394 {
1395 $this->ctrl->redirectByClass('ilgroupmembershipgui');
1396 }

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 490 of file class.ilObjGroupGUI.php.

490 : void
491 {
492 // if folder is in a course, modify item list gui according to course requirements
493 if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs')) {
494 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
496 $a_item_list_gui,
497 'ilcoursecontentgui',
498 $a_item_data,
499 ilObjCourse::_lookupAboStatus($course_obj_id),
500 $course_ref_id,
501 $course_obj_id,
502 $this->object->getRefId()
503 );
504 }
505 }
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 1918 of file class.ilObjGroupGUI.php.

1918 : bool
1919 {
1920 return parent::prepareOutput($show_subobjects);
1921 }

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 921 of file class.ilObjGroupGUI.php.

921 : array
922 {
924
925 $this->show_tracking =
926 (
928 );
929
930 $completed = $in_progress = $failed = [];
931 if ($this->show_tracking) {
932 $olp = ilObjectLP::getInstance($this->object->getId());
933 $this->show_tracking = $olp->isActive();
934 }
935
936 if ($this->show_tracking) {
937 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
938 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
939 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
940 }
941
942 if ($privacy->enabledGroupAccessTimes()) {
943 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
944 }
945
946 $do_prtf = (is_array($selected_columns) &&
947 in_array('prtf', $selected_columns) &&
948 is_array($ids));
949 if ($do_prtf) {
951 $ids
952 );
953 }
954
960 $profile_data = ilObjUser::_readUsersProfileData($ids);
961 $members = [];
962 foreach ($ids as $usr_id) {
963 $tmp_data['notification'] = (bool) $this->object->members_obj->isNotificationEnabled((int) $usr_id) ? 1 : 0;
964 $tmp_data['contact'] = (bool) $this->object->members_obj->isContact((int) $usr_id) ? 1 : 0;
965
966 foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
967 $tmp_data[$field] = $value;
968 }
969
970 if ($this->show_tracking) {
971 $tmp_data['progress'] = '';
972 if (in_array($usr_id, $completed)) {
973 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
974 } elseif (in_array($usr_id, $in_progress)) {
975 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
976 } elseif (in_array($usr_id, $failed)) {
977 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
978 } else {
979 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
980 }
981 }
982
983 if ($privacy->enabledGroupAccessTimes()) {
984 if (isset($progress[$usr_id]['ts']) && ($progress[$usr_id]['ts'] ?? false)) {
985 $tmp_data['access_time'] = ilDatePresentation::formatDate(
986 $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
987 );
988 $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
989 } else {
990 $tmp_data['access_time'] = $this->lng->txt('no_date');
991 $tmp_data['access_time_unix'] = 0;
992 }
993 }
994 $tmp_data['prtf_data'] = [];
995 $tmp_data['prtf'] = '';
996 if ($do_prtf) {
997 $tmp_data['prtf_data'] = ($all_prtf[$usr_id] ?? []);
998 $tmp_data['prtf'] = implode(', ', $all_prtf[$usr_id] ?? []); // just for sorting
999 }
1000 $members[$usr_id] = $tmp_data;
1001 }
1002 return $members;
1003 }
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 string LP_STATUS_COMPLETED
const string LP_STATUS_IN_PROGRESS
const string LP_STATUS_NOT_ATTEMPTED
const string LP_STATUS_FAILED
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 481 of file class.ilObjGroupGUI.php.

481 : void
482 {
483 $this->tabs->activateTab("view_content");
484 parent::renderObject();
485 }

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 835 of file class.ilObjGroupGUI.php.

835 : void
836 {
837 if (
839 !$this->access->checkAccess("write", "", $this->object->getRefId())
840 ) {
841 return;
842 }
843
844 $location = [];
845 if ($this->http->wrapper()->post()->has('location')) {
846 $custom_transformer = $this->refinery->custom()->transformation(
847 function ($array) {
848 return $array;
849 }
850 );
851 $location = $this->http->wrapper()->post()->retrieve(
852 'location',
853 $custom_transformer
854 );
855 }
856 $enable_map = false;
857 if ($this->http->wrapper()->post()->has('enable_map')) {
858 $enable_map = $this->http->wrapper()->post()->retrieve(
859 'enable_map',
860 $this->refinery->kindlyTo()->bool()
861 );
862 }
863
864 $this->object->setLatitude((string) $location['latitude']);
865 $this->object->setLongitude((string) $location['longitude']);
866 $this->object->setLocationZoom((int) $location['zoom']);
867 $this->object->setEnableGroupMap($enable_map);
868 $this->object->update();
869 $this->ctrl->redirect($this, "editMapSettings");
870 }
$location
Definition: buildRTE.php:22

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

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

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

1370 : void
1371 {
1372 $noti = new ilMembershipNotifications($this->ref_id);
1373
1374 $grp_notification = false;
1375 if ($this->http->wrapper()->query()->has('grp_ntf')) {
1376 $grp_notification = $this->http->wrapper()->query()->retrieve(
1377 'grp_ntf',
1378 $this->refinery->kindlyTo()->bool()
1379 );
1380 }
1381
1382 if ($noti->canCurrentUserEdit()) {
1383 if ($grp_notification) {
1384 $noti->activateUser();
1385 } else {
1386 $noti->deactivateUser();
1387 }
1388 }
1389 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1390 $this->ctrl->redirect($this, "");
1391 }

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 2033 of file class.ilObjGroupGUI.php.

2033 : void
2034 {
2035 $this->ctrl->setReturn($this, "view");
2036 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

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

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

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 1026 of file class.ilObjGroupGUI.php.

1026 : void
1027 {
1028 $this->checkPermission('leave');
1029 $this->object->members_obj->delete($this->user->getId());
1030 $this->object->members_obj->sendNotification(
1032 $this->user->getId()
1033 );
1034 $this->object->members_obj->sendNotification(
1036 $this->user->getId()
1037 );
1038
1039 $this->tpl->setOnScreenMessage('success', $this->lng->txt('grp_msg_membership_annulled'), true);
1040 $this->ctrl->setParameterByClass(
1041 "ilrepositorygui",
1042 "ref_id",
1043 $this->tree->getParentId($this->object->getRefId())
1044 );
1045 $this->ctrl->redirectByClass("ilrepositorygui", "");
1046 }

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 564 of file class.ilObjGroupGUI.php.

564 : void
565 {
566 $this->checkPermission("write");
567
569 $this->object->getRefId(),
570 (int) $_REQUEST['grp_type']
571 );
572
573 $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
574 $this->ctrl->redirect($this, 'edit');
575 }
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)

References ilObjectGUI\checkPermission(), 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 904 of file class.ilObjGroupGUI.php.

904 : void
905 {
906 $this->checkPermission('manage_members');
907
908 $important = '';
909 if ($this->http->wrapper()->post()->has('important')) {
910 $important = $this->http->wrapper()->post()->retrieve(
911 'important',
912 $this->refinery->kindlyTo()->string()
913 );
914 }
915 $this->object->setInformation($important);
916 $this->object->update();
917 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
918 $this->editInfoObject();
919 }

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 578 of file class.ilObjGroupGUI.php.

578 : void
579 {
580 $obj_service = $this->getObjectService();
581 $this->checkPermission('write');
582
583 $form = $this->initForm();
584 $new_type = 0;
585 if ($form->checkInput()) {
586 // handle group type settings
587 $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
588
589 $modified = false;
590 $new_type_info = $form->getInput('didactic_type');
591 if ($new_type_info) {
592 $new_type = explode('_', $form->getInput('didactic_type'));
593 $new_type = (int) $new_type[1];
594
595 $modified = ($new_type !== $old_type);
596 ilLoggerFactory::getLogger('grp')->info('Switched group type from ' . $old_type . ' to ' . $new_type);
597 }
598
599 // Additional checks: both tile and session limitation activated (not supported)
600 if (
601 $form->getInput('sl') == "1" &&
602 $form->getInput('list_presentation') == "tile") {
604 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('crs_tile_and_session_limit_not_supported'));
605 $this->editObject($form);
606 return;
607 }
608
609 $this->object->setTitle($form->getInput('title'));
610 $this->object->setDescription($form->getInput('desc'));
611 $this->object->setGroupType((int) $form->getInput('grp_type'));
612 $this->object->setRegistrationType((int) $form->getInput('registration_type'));
613 $this->object->setPassword($form->getInput('password'));
614 $this->object->enableUnlimitedRegistration(!$form->getInput('reg_limit_time'));
615 $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
616 $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
617 $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
618 $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
619 $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
620 $this->object->setViewMode((int) $form->getInput('view_mode'));
621 $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
622 $this->object->setShowMembers((bool) $form->getInput('show_members'));
623 $this->object->setAutoNotification((bool) $form->getInput('auto_notification'));
624
625 // session limit
626 $this->object->enableSessionLimit((bool) $form->getInput('sl'));
627 $session_sp = $form->getInput('sp');
628 $this->object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (int) $session_sp : -1);
629 $session_sn = $form->getInput('sn');
630 $this->object->setNumberOfnextSessions(is_numeric($session_sn) ? (int) $session_sn : -1);
631
632 // period
633 $grp_period = $form->getItemByPostVar("period");
634 $this->object->setPeriod(
635 $grp_period->getStart(),
636 $grp_period->getEnd()
637 );
638
639 $reg = $form->getItemByPostVar("reg");
640 if ($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime) {
641 $this->object->enableUnlimitedRegistration(false);
642 } else {
643 $this->object->enableUnlimitedRegistration(true);
644 }
645
646 $this->object->setRegistrationStart($reg->getStart());
647 $this->object->setRegistrationEnd($reg->getEnd());
648
649 $cancel_end = $form->getItemByPostVar("cancel_end");
650 $this->object->setCancellationEnd($cancel_end->getDate());
651
652 $waiting_list = 0;
653 if ($this->http->wrapper()->post()->has('waiting_list')) {
654 $waiting_list = $this->http->wrapper()->post()->retrieve(
655 'waiting_list',
656 $this->refinery->kindlyTo()->int()
657 );
658 }
659 switch ($waiting_list) {
660 case 2:
661 $this->object->enableWaitingList(true);
662 $this->object->setWaitingListAutoFill(true);
663 break;
664
665 case 1:
666 $this->object->enableWaitingList(true);
667 $this->object->setWaitingListAutoFill(false);
668 break;
669
670 default:
671 $this->object->enableWaitingList(false);
672 $this->object->setWaitingListAutoFill(false);
673 break;
674 }
675 $this->object->handleAutoFill();
676
677 // activation
678 $property_online = $this->object->getObjectProperties()->getPropertyIsOnline();
679 $online = $form->getInput('activation_online') ?
680 $property_online->withOnline() :
681 $property_online->withOffline();
682 $this->object->getObjectProperties()->storePropertyIsOnline($online);
683
684 // update object settings
685 $this->object->update();
686
687 // title icon visibility
688 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
689
690 // top actions visibility
691 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
692
693 // custom icon
694 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
695
696 // tile image
697 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
698
699 // list presentation
701
703 $this->object->getId(),
704 $form,
705 $this->getSubServices()
706 );
707
708 // Save sorting
710
711 // BEGIN ChangeEvents: Record update Object.
713 $this->object->getId(),
714 $this->user->getId(),
715 'update'
716 );
717 // END PATCH ChangeEvents: Record update Object.
718 // Update ecs export settings
719 $ecs = new ilECSGroupSettings($this->object);
720 $ecs->handleSettingsUpdate($form);
721 } else {
722 $this->tpl->setOnScreenMessage('failure', $GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
723
725 $this->editObject($form);
726 return;
727 }
728
729 // group type modified
730 if ($modified) {
731 if ($new_type == 0) {
732 $new_type_txt = $GLOBALS['DIC']['lng']->txt('il_grp_status_open');
733 } else {
734 $dtpl = new ilDidacticTemplateSetting($new_type);
735 $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['DIC']['lng']->getLangKey());
736 }
737
738
739 $confirm = new ilConfirmationGUI();
740 $confirm->setHeaderText($this->lng->txt('grp_warn_grp_type_changed'));
741 $confirm->setFormAction($this->ctrl->getFormAction($this));
742 $confirm->addItem(
743 'grp_type',
744 (string) $new_type,
745 $this->lng->txt('grp_info_new_grp_type') . ': ' . $new_type_txt
746 );
747 $confirm->setConfirm($this->lng->txt('grp_change_type'), 'updateGroupType');
748 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
749
750 $this->tpl->setContent($confirm->getHTML());
751 } else {
752 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
753 $this->ctrl->redirect($this, 'edit');
754 }
755 }
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 {
456 if (strtolower($this->std_request->getBaseClass()) === "iladministrationgui") {
457 parent::viewObject();
458 return;
459 }
460
462 $this->user->getId(),
463 $this->object->getId(),
464 $this->object->getRefId(),
465 'grp'
466 );
467
468 if ($this->isActiveAdministrationPanel()) {
469 $this->renderObject();
471 return;
472 }
473
474 if (!$this->checkAgreement()) {
475 $this->ctrl->redirectByClass(ilMemberAgreementGUI::class);
476 }
477
478 $this->renderObject();
479 }

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: