ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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)
 
 executeCommand ()
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 viewObject ()
 
 renderObject ()
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 afterSave (ilObject $new_object, bool $redirect=true)
 public More...
 
 editObject (?ilPropertyFormGUI $a_form=null)
 
 updateGroupTypeObject ()
 
 updateObject ()
 
 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)
 
 createMailSignature ()
 
 addCustomData (array $a_data)
 
 getLocalRoles ()
 
 setSideColumnReturn ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 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)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 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 ()
 
 prepareOutput (bool $show_subobjects=true)
 
 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 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 ()
 
 getAsynchItemListObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 
 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 ()
 
 membersObject ()
 
 setSubTabs (string $a_tab)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 
 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...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 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 ()
 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...
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 gotItems ()
 
 getTabs ()
 
 showContainerPageTabs ()
 
 showPasswordInstructionObject (bool $a_init=true)
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 
 initEditForm ()
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI (string $cmd)
 
 initFilter ()
 
 showContainerFilter ()
 

Protected Attributes

bool $show_tracking = false
 
Factory $refinery
 
ilRbacSystem $rbacsystem
 
News $news
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
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
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 

Private Member Functions

 checkAgreement ()
 

Private Attributes

GlobalHttpState $http
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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
 
- 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 
)

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

References $DIC, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().

58  {
59  global $DIC;
60 
61  $this->type = "grp";
62  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
63 
64  $this->lng->loadLanguageModule('grp');
65  $this->lng->loadLanguageModule('obj');
66  $this->http = $DIC->http();
67  $this->refinery = $DIC->refinery();
68  $this->rbacsystem = $DIC->rbac()->system();
69  $this->news = $DIC->news();
70  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
+ 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 1383 of file class.ilObjGroupGUI.php.

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

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

1383  : void
1384  {
1385  global $DIC;
1386  $main_tpl = $DIC->ui()->mainTemplate();
1387  $a_target = (int) $a_target;
1388 
1389  $ilUser = $DIC->user();
1390  $ilAccess = $DIC->access();
1391  $lng = $DIC->language();
1392  $ilErr = $DIC['ilErr'];
1393  $http = $DIC->http();
1394  $refinery = $DIC->refinery();
1395 
1396  $target = '';
1397  if ($http->wrapper()->query()->has('target')) {
1398  $target = $http->wrapper()->query()->retrieve(
1399  'target',
1400  $refinery->kindlyTo()->string()
1401  );
1402  }
1403  if (substr($a_add, 0, 5) == 'rcode') {
1404  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1405  // Redirect to login for anonymous
1407  "login.php?target=" . $target . "&cmd=force_login&lang=" .
1408  $ilUser->getCurrentLanguage()
1409  );
1410  }
1411 
1412  // Redirects to target location after assigning user to group
1414  $a_target,
1416  substr($a_add, 5)
1417  );
1418  }
1419 
1420  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1421  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1422  }
1423 
1424  if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1425  ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1426  }
1427 
1428  if ($ilAccess->checkAccess("read", "", $a_target)) {
1430  } else {
1431  // to do: force flat view
1432  if ($ilAccess->checkAccess("visible", "", $a_target)) {
1433  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1434  } else {
1435  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1436  $main_tpl->setOnScreenMessage('failure', sprintf(
1437  $lng->txt("msg_no_perm_read_item"),
1439  ), true);
1441  }
1442  }
1443  }
1444  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1445  }
static handleCode(int $a_ref_id, string $a_type, string $a_code)
const ANONYMOUS_USER_ID
Definition: constants.php:27
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _gotoRepositoryNode(int $ref_id, string $cmd="")
$ilErr
Definition: raiseError.php:17
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
GlobalHttpState $http
static _lookupTitle(int $obj_id)
static redirect(string $a_script)
static _lookupType(int $id, bool $reference=false)
kindlyTo()
Combined validations and transformations for primitive data types that establish a baseline for furth...
Definition: Factory.php:59
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContentTab()

ilObjGroupGUI::addContentTab ( )

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

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

Referenced by getTabs().

1024  : void
1025  {
1026  $this->tabs_gui->addTab(
1027  "view_content",
1028  $this->lng->txt("content"),
1029  $this->ctrl->getLinkTarget($this, "view")
1030  );
1031  }
+ 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 1960 of file class.ilObjGroupGUI.php.

References Vendor\Package\$f, ilCourseUserData\_getValuesByObjId(), and ILIAS\Repository\object().

1960  : array
1961  {
1962  // object defined fields
1963  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1964 
1965  $res_data = array();
1966  foreach ($a_data as $usr_id => $user_data) {
1967  $res_data[$usr_id] = $user_data;
1968 
1969  // udf
1970  $udf_data = new ilUserDefinedData($usr_id);
1971  foreach ($udf_data->getAll() as $field => $value) {
1972  list($f, $field_id) = explode('_', $field);
1973  $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
1974  }
1975 
1976  foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1977  $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
1978  }
1979  }
1980 
1981  return $res_data;
1982  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getValuesByObjId(int $a_obj_id)
+ Here is the call graph for this function:

◆ afterSave()

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

public

See also
ilGroupAddToGroupActionGUI

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

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

504  : void
505  {
506  $new_object->setRegistrationType(
508  );
509  $new_object->update();
510 
511  // check for parent group or course => SORT_INHERIT
512  $sort_mode = ilContainer::SORT_TITLE;
513  if (
514  $this->tree->checkForParentType($new_object->getRefId(), 'crs', true) ||
515  $this->tree->checkForParentType($new_object->getRefId(), 'grp', true)
516  ) {
517  $sort_mode = ilContainer::SORT_INHERIT;
518  }
519 
520  // Save sorting
521  $sort = new ilContainerSortingSettings($new_object->getId());
522  $sort->setSortMode($sort_mode);
523  $sort->update();
524 
525 
526  // Add user as admin and enable notification
527  $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
528  $members_obj->add($this->user->getId(), ilParticipants::IL_GRP_ADMIN);
529  $members_obj->updateNotification($this->user->getId(), (bool) $this->settings->get('mail_grp_admin_notification', '1'));
530  $members_obj->updateContact($this->user->getId(), true);
531 
532  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
533  if ($redirect) {
534  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
535  $this->ctrl->redirect($this, 'edit');
536  }
537  }
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.
+ Here is the call graph for this function:

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

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

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

Referenced by viewObject().

1864  : bool
1865  {
1866  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1867  return true;
1868  }
1869 
1870  // Disable aggrement if is not member of group
1871  if (!$this->object->members_obj->isAssigned($this->user->getId())) {
1872  return true;
1873  }
1874 
1875  if (ilMemberViewSettings::getInstance()->isActive()) {
1876  return true;
1877  }
1878 
1879  $privacy = ilPrivacySettings::getInstance();
1880 
1881  // Check agreement
1882  if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1883  and !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())) {
1884  return false;
1885  }
1886  // Check required fields
1887  if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
1888  return false;
1889  }
1890  return true;
1891  }
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.
static _hasFields(int $a_container_id)
Check if there are any define fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )

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

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

1901  : string
1902  {
1903  $link = chr(13) . chr(10) . chr(13) . chr(10);
1904  $link .= $this->lng->txt('grp_mail_permanent_link');
1905  $link .= chr(13) . chr(10) . chr(13) . chr(10);
1906  $link .= ilLink::_getLink($this->object->getRefId());
1907  return rawurlencode(base64_encode($link));
1908  }
+ Here is the call graph for this function:

◆ disableAdministrationPanelObject()

ilObjGroupGUI::disableAdministrationPanelObject ( )

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

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

430  : void
431  {
432  $this->getModeManager()->setContentMode();
433  $this->ctrl->redirect($this, "");
434  }
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

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

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

Referenced by updateInfoObject().

851  : void
852  {
853  $this->checkPermission('write');
854 
855  $this->setSubTabs('settings');
856  $this->tabs_gui->setTabActive('settings');
857  $this->tabs_gui->setSubTabActive('grp_info_settings');
858 
859  $form = $this->initInfoEditor();
860  $this->tpl->setContent($form->getHTML());
861  }
setSubTabs(string $a_tab)
ilPropertyFormGUI $form
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ 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 763 of file class.ilObjGroupGUI.php.

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(), ilLocationInputGUI\setLatitude(), setSubTabs(), and ilPropertyFormGUI\setTitle().

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

◆ editObject()

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

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

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

542  : void
543  {
544  $this->checkPermission("write");
545 
546  $this->setSubTabs('settings');
547  $this->tabs_gui->setTabActive('settings');
548  $this->tabs_gui->setSubTabActive('grp_settings');
549 
550  if (!$a_form) {
551  $a_form = $this->initForm('edit');
552  }
553  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
554  }
setSubTabs(string $a_tab)
initForm(string $a_mode='edit', bool $a_omit_form_action=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilObjGroupGUI::enableAdministrationPanelObject ( )

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

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

424  : void
425  {
426  $this->getModeManager()->setAdminMode();
427  $this->ctrl->redirect($this, "");
428  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

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

References $DIC, $GLOBALS, ilContainerGUI\$gui, ilObjectGUI\$html, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, $service, 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(), 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(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), ilMailMemberSearchGUI\setObjParticipants(), setSubTabs(), ilContainerGUI\setTitleAndDescription(), ilContainerGUI\showContainerPageTabs(), ilContainerGUI\showPermanentLink(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

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

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

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

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

Referenced by executeCommand().

1984  : array
1985  {
1986  $local_roles = $this->object->getLocalGroupRoles();
1987  $grp_member = $this->object->getDefaultMemberRole();
1988  $grp_roles = array();
1989 
1990  //put the group member role to the top of the crs_roles array
1991  if (in_array($grp_member, $local_roles)) {
1992  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
1993  unset($local_roles[$grp_roles[$grp_member]]);
1994  }
1995 
1996  foreach ($local_roles as $title => $role_id) {
1997  $grp_roles[(int) $role_id] = ilObjRole::_getTranslation($title);
1998  }
1999  return $grp_roles;
2000  }
static _getTranslation(string $a_role_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubServices()

ilObjGroupGUI::getSubServices ( )
protected

Definition at line 741 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.

Referenced by initForm(), and updateObject().

741  : array
742  {
743  $subs = array(
752  );
753  if ($this->news->isGloballyActivated()) {
755  }
756 
757  return $subs;
758  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )
protected

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

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().

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

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

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

References Vendor\Package\$c, $parts, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilMDUtils\_fillHTMLMetaTags(), 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, ILIAS\Repository\lng(), ilObjGroupAccess\lookupRegistrationInfo(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, ILIAS\Repository\object(), and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

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

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

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

References ILIAS\Repository\ctrl(), and infoScreen().

1187  : void
1188  {
1189  $this->ctrl->setCmd("showSummary");
1190  $this->ctrl->setCmdClass("ilinfoscreengui");
1191  $this->infoScreen();
1192  }
+ Here is the call graph for this function:

◆ initForm()

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

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

References ilContainerGUI\$form, ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), ilObjectGUI\getObjectService(), getSubServices(), 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(), ilFormPropertyGUI\setInfo(), ilPropertyFormGUI\setTableWidth(), ilPropertyFormGUI\setTitle(), ilPropertyFormGUI\setTitleIcon(), ilRadioGroupInputGUI\setValue(), 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().

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

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

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

1913  : ?ilObjectListGUI
1914  {
1915  global $DIC;
1916 
1917  $ilSetting = $DIC['ilSetting'];
1918  $ilUser = $DIC['ilUser'];
1919 
1920  $lg = parent::initHeaderAction($sub_type, $sub_id);
1921 
1922  if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1923  if (ilMembershipNotifications::isActiveForRefId($this->ref_id)) {
1924  $noti = new ilMembershipNotifications($this->ref_id);
1925  if (!$noti->isCurrentUserActive()) {
1926  $lg->addHeaderIcon(
1927  "not_icon",
1928  ilUtil::getImagePath("object/notification_off.svg"),
1929  $this->lng->txt("grp_notification_deactivated")
1930  );
1931 
1932  $this->ctrl->setParameter($this, "grp_ntf", 1);
1933  $caption = "grp_activate_notification";
1934  } else {
1935  $lg->addHeaderIcon(
1936  "not_icon",
1937  ilUtil::getImagePath("object/notification_on.svg"),
1938  $this->lng->txt("grp_notification_activated")
1939  );
1940 
1941  $this->ctrl->setParameter($this, "grp_ntf", 0);
1942  $caption = "grp_deactivate_notification";
1943  }
1944 
1945  if ($noti->canCurrentUserEdit()) {
1946  $lg->addCustomCommand(
1947  $this->ctrl->getLinkTarget($this, "saveNotification"),
1948  $caption
1949  );
1950  }
1951 
1952  $this->ctrl->setParameter($this, "grp_ntf", "");
1953  }
1954  }
1955 
1956  return $lg;
1957  }
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:18
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

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

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

Referenced by editInfoObject().

864  {
865  $form = new ilPropertyFormGUI();
866  $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
867  $form->setTitle($this->lng->txt('grp_general_informations'));
868  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
869  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
870 
871  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
872  $area->setInfo($this->lng->txt('grp_information_info'));
873  $area->setValue($this->object->getInformation());
874  $area->setRows(8);
875  $area->setCols(80);
876  $form->addItem($area);
877 
878  return $form;
879  }
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initRefIdFromQuery()

ilObjGroupGUI::initRefIdFromQuery ( )
protected

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

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

Referenced by executeCommand().

72  : int
73  {
74  if ($this->http->wrapper()->query()->has('ref_id')) {
75  return $this->http->wrapper()->query()->retrieve(
76  'ref_id',
77  $this->refinery->kindlyTo()->int()
78  );
79  }
80  return 0;
81  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

References ILIAS\Repository\ctrl().

2002  : void
2003  {
2004  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2005  }
+ Here is the call graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

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

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

981  : void
982  {
983  $this->checkPermission('leave');
984 
985  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
986  if ($part->isLastAdmin($this->user->getId())) {
987  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('grp_err_administrator_required'));
988  $this->viewObject();
989  return;
990  }
991 
992  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
993 
994  $cgui = new ilConfirmationGUI();
995  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
996  $cgui->setFormAction($this->ctrl->getFormAction($this));
997  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
998  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
999  $this->tpl->setContent($cgui->getHTML());
1000  }
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )
protected

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

References ILIAS\Repository\ctrl().

1377  : void
1378  {
1379  $this->ctrl->redirectByClass('ilgroupmembershipgui');
1380  }
+ Here is the call graph for this function:

◆ modifyItemGUI()

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

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

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

482  : void
483  {
484  // if folder is in a course, modify item list gui according to course requirements
485  if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs')) {
486  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
488  $a_item_list_gui,
489  'ilcoursecontentgui',
490  $a_item_data,
491  ilObjCourse::_lookupAboStatus($course_obj_id),
492  $course_ref_id,
493  $course_obj_id,
494  $this->object->getRefId()
495  );
496  }
497  }
static _lookupObjId(int $ref_id)
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)
+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput ( bool  $show_subobjects = true)

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

Referenced by executeCommand().

1896  : bool
1897  {
1898  return parent::prepareOutput($show_subobjects);
1899  }
+ 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 898 of file class.ilObjGroupGUI.php.

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilLearningProgress\_lookupProgressByObjId(), ilObjUser\_readUsersProfileData(), ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjectLP\getInstance(), ilPrivacySettings\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().

898  : array
899  {
900  $privacy = ilPrivacySettings::getInstance();
901 
902  $this->show_tracking =
903  (
905  );
906 
907  $completed = $in_progress = $failed = [];
908  if ($this->show_tracking) {
909  $olp = ilObjectLP::getInstance($this->object->getId());
910  $this->show_tracking = $olp->isActive();
911  }
912 
913  if ($this->show_tracking) {
914  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
915  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
916  $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
917  }
918 
919  if ($privacy->enabledGroupAccessTimes()) {
920  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
921  }
922 
923  $do_prtf = (is_array($selected_columns) &&
924  in_array('prtf', $selected_columns) &&
925  is_array($ids));
926  if ($do_prtf) {
928  $ids,
929  $this->ctrl->getLinkTarget($this, "members")
930  );
931  }
932 
938  $profile_data = ilObjUser::_readUsersProfileData($ids);
939  $members = [];
940  foreach ($ids as $usr_id) {
941  $tmp_data['notification'] = (bool) $this->object->members_obj->isNotificationEnabled((int) $usr_id) ? 1 : 0;
942  $tmp_data['contact'] = (bool) $this->object->members_obj->isContact((int) $usr_id) ? 1 : 0;
943 
944  foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
945  $tmp_data[$field] = $value;
946  }
947 
948  if ($this->show_tracking) {
949  $tmp_data['progress'] = '';
950  if (in_array($usr_id, $completed)) {
951  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
952  } elseif (in_array($usr_id, $in_progress)) {
953  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
954  } elseif (in_array($usr_id, $failed)) {
955  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
956  } else {
957  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
958  }
959  }
960 
961  if ($privacy->enabledGroupAccessTimes()) {
962  if (isset($progress[$usr_id]['ts']) && ($progress[$usr_id]['ts'] ?? false)) {
963  $tmp_data['access_time'] = ilDatePresentation::formatDate(
964  $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
965  );
966  $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
967  } else {
968  $tmp_data['access_time'] = $this->lng->txt('no_date');
969  $tmp_data['access_time_unix'] = 0;
970  }
971  }
972  $tmp_data['prtf'] = [];
973  if ($do_prtf) {
974  $tmp_data['prtf'] = ($all_prtf[$usr_id] ?? []);
975  }
976  $members[$usr_id] = $tmp_data;
977  }
978  return $members;
979  }
const LP_STATUS_NOT_ATTEMPTED
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
const LP_STATUS_IN_PROGRESS
static _lookupCompletedForObject(int $a_obj_id, ?array $a_user_ids=null)
const LP_STATUS_FAILED
static _readUsersProfileData(array $a_user_ids)
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, ?string $a_back_url=null)
static _lookupFailedForObject(int $a_obj_id, ?array $a_user_ids=null)
const LP_STATUS_COMPLETED
static getInstance(int $obj_id)
+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

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

References ILIAS\Repository\tabs().

Referenced by executeCommand(), and viewObject().

473  : void
474  {
475  $this->tabs->activateTab("view_content");
476  parent::renderObject();
477  }
+ 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 819 of file class.ilObjGroupGUI.php.

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

819  : void
820  {
821  $location = [];
822  if ($this->http->wrapper()->post()->has('location')) {
823  $custom_transformer = $this->refinery->custom()->transformation(
824  function ($array) {
825  return $array;
826  }
827  );
828  $location = $this->http->wrapper()->post()->retrieve(
829  'location',
830  $custom_transformer
831  );
832  }
833  $enable_map = false;
834  if ($this->http->wrapper()->post()->has('enable_map')) {
835  $enable_map = $this->http->wrapper()->post()->retrieve(
836  'enable_map',
837  $this->refinery->kindlyTo()->bool()
838  );
839  }
840 
841  $this->object->setLatitude((string) $location['latitude']);
842  $this->object->setLongitude((string) $location['longitude']);
843  $this->object->setLocationZoom((int) $location['zoom']);
844  $this->object->setEnableGroupMap($enable_map);
845  $this->object->update();
846  $this->ctrl->redirect($this, "editMapSettings");
847  }
$location
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: buildRTE.php:22
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

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

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

1354  : void
1355  {
1356  $noti = new ilMembershipNotifications($this->ref_id);
1357 
1358  $grp_notification = false;
1359  if ($this->http->wrapper()->query()->has('grp_ntf')) {
1360  $grp_notification = $this->http->wrapper()->query()->retrieve(
1361  'grp_ntf',
1362  $this->refinery->kindlyTo()->bool()
1363  );
1364  }
1365 
1366  if ($noti->canCurrentUserEdit()) {
1367  if ($grp_notification) {
1368  $noti->activateUser();
1369  } else {
1370  $noti->deactivateUser();
1371  }
1372  }
1373  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1374  $this->ctrl->redirect($this, "");
1375  }
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

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

References ILIAS\Repository\ctrl().

2010  : void
2011  {
2012  $this->ctrl->setReturn($this, "view");
2013  }
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

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

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

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

1791  : void
1792  {
1793  switch ($a_tab) {
1794  case 'settings':
1795  $this->tabs_gui->addSubTabTarget(
1796  "grp_settings",
1797  $this->ctrl->getLinkTarget($this, 'edit'),
1798  "edit",
1799  get_class($this)
1800  );
1801 
1802  $this->tabs_gui->addSubTabTarget(
1803  "grp_info_settings",
1804  $this->ctrl->getLinkTarget($this, 'editInfo'),
1805  "editInfo",
1806  get_class($this)
1807  );
1808 
1809  if (ilMapUtil::isActivated()) {
1810  $this->tabs_gui->addSubTabTarget(
1811  "grp_map_settings",
1812  $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1813  "editMapSettings",
1814  get_class($this)
1815  );
1816  }
1817 
1818  $this->tabs_gui->addSubTabTarget(
1819  'groupings',
1820  $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1821  'listGroupings',
1822  get_class($this)
1823  );
1824 
1825  // only show if export permission is granted
1826  if (ilPrivacySettings::getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1827  $this->tabs_gui->addSubTabTarget(
1828  'grp_custom_user_fields',
1829  $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1830  '',
1831  'ilobjectcustomuserfieldsgui'
1832  );
1833  }
1834 
1835  // news settings
1836  if ($this->object->getUseNews()) {
1837  $this->tabs_gui->addSubTab(
1838  'obj_news_settings',
1839  $this->lng->txt("cont_news_settings"),
1840  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1841  );
1842  }
1843 
1844  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1845  if ($lti_settings->hasSettingsAccess()) {
1846  $this->tabs_gui->addSubTabTarget(
1847  'lti_provider',
1848  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1849  );
1850  }
1851 
1852  $this->tabs_gui->addSubTabTarget(
1853  "obj_multilinguality",
1854  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""),
1855  "",
1856  "ilobjecttranslationgui"
1857  );
1858 
1859 
1860  break;
1861  }
1862  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isActivated()
Checks whether Map feature is activated.
static _hasFields(int $a_container_id)
Check if there are any define fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsubscribeObject()

ilObjGroupGUI::unsubscribeObject ( )

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

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

1002  : void
1003  {
1004  $this->checkPermission('leave');
1005  $this->object->members_obj->delete($this->user->getId());
1006  $this->object->members_obj->sendNotification(
1008  $this->user->getId()
1009  );
1010  $this->object->members_obj->sendNotification(
1012  $this->user->getId()
1013  );
1014 
1015  $this->tpl->setOnScreenMessage('success', $this->lng->txt('grp_msg_membership_annulled'), true);
1016  $this->ctrl->setParameterByClass(
1017  "ilrepositorygui",
1018  "ref_id",
1019  $this->tree->getParentId($this->object->getRefId())
1020  );
1021  $this->ctrl->redirectByClass("ilrepositorygui", "");
1022  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

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

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

556  : void
557  {
559  $this->object->getRefId(),
560  (int) $_REQUEST['grp_type']
561  );
562 
563  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
564  $this->ctrl->redirect($this, 'edit');
565  }
static switchTemplate(int $a_ref_id, int $a_new_tpl_id)
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

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

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

881  : void
882  {
883  $this->checkPermission('manage_members');
884 
885  $important = '';
886  if ($this->http->wrapper()->post()->has('important')) {
887  $important = $this->http->wrapper()->post()->retrieve(
888  'important',
889  $this->refinery->kindlyTo()->string()
890  );
891  }
892  $this->object->setInformation($important);
893  $this->object->update();
894  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
895  $this->editInfoObject();
896  }
static http()
Fetches the global http state from ILIAS.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ updateObject()

ilObjGroupGUI::updateObject ( )

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

References ilContainerGUI\$form, $GLOBALS, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilObjectGUI\editObject(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ilLoggerFactory\getLogger(), ilObjectGUI\getObjectService(), getSubServices(), 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(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ILIAS\Repository\user().

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

◆ viewObject()

ilObjGroupGUI::viewObject ( )

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

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

Referenced by leaveObject().

439  : void
440  {
442  $this->user->getId(),
443  $this->object->getId(),
444  $this->object->getRefId(),
445  'grp'
446  );
447 
449  $this->object->getId(),
450  $this->object->getId(),
451  'grp'
452  );
453 
454  if ($this->isActiveAdministrationPanel()) {
455  parent::renderObject();
457  return;
458  }
459 
460  if (!$this->checkAgreement()) {
461  $this->tabs_gui->setTabActive('view_content');
462  $this->ctrl->setReturn($this, 'view');
463  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
464  $this->ctrl->setCmdClass(get_class($agreement));
465  $this->ctrl->forwardCommand($agreement);
466  return;
467  }
468 
469  $this->tabs_gui->setTabActive('view_content');
470  $this->renderObject();
471  }
static _fillHTMLMetaTags(int $a_rbac_id, int $a_obj_id, string $a_type)
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

GlobalHttpState ilObjGroupGUI::$http
private

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

◆ $news

News ilObjGroupGUI::$news
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGroupGUI::$rbacsystem
protected

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

◆ $refinery

Factory ilObjGroupGUI::$refinery
protected

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

◆ $show_tracking

bool ilObjGroupGUI::$show_tracking = false
protected

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


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