ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- Public Member Functions inherited from ilContainerGUI
 executeCommand ()
 
 forwardToPageObject ()
 
 addPageTabs ()
 
 getContainerPageHTML ()
 
 getContentGUI ()
 
 renderObject ()
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 
 showAdministrationPanel ()
 
 showPermanentLink ()
 
 editPageFrameObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
 
 addMessageRow (ilTemplate $a_tpl, string $a_message, string $a_type)
 
 setPageEditorTabs ()
 
 addStandardContainerSubTabs (bool $a_include_view=true)
 Add standard container subtabs for view, manage, oderdering and text/media editor link. More...
 
 enableAdministrationPanelObject ()
 
 disableAdministrationPanelObject ()
 
 editOrderObject ()
 
 isActiveOrdering ()
 
 isActiveItemOrdering ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard public More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 
 cloneNodes (int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (ilObjectListGUI $a_item_list_gui, array $a_item_data)
 
 editStylePropertiesObject ()
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 
 trashResetFilterObject ()
 
 removeFromSystemObject ()
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 
 setSideColumnReturn ()
 
 getAdminTabs ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 
- Protected Member Functions inherited from ilContainerGUI
 getModeManager ()
 
 getItemPresentation ( $include_empty_blocks=true, ?string $lang=null)
 
 getEditFormValues ()
 
 afterUpdate ()
 
 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
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 
- Protected Attributes inherited from ilContainerGUI
ILIAS Container InternalGUIService $gui
 
ILIAS Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
ILIAS Container Content ItemPresentationManager $item_presentation = null
 
ILIAS Container InternalDomainService $domain
 
ilTabsGUI $tabs
 
ilErrorHandling $error
 
ilObjectDefinition $obj_definition
 
ilRbacAdmin $rbacadmin
 
ilPropertyFormGUI $form
 
ilLogger $log
 
ilObjectDataCache $obj_data_cache
 
Services $global_screen
 
ilAppEventHandler $app_event_handler
 
UIServices $ui
 
ilContainerFilterService $container_filter_service
 
ilContainerUserFilter $container_user_filter = null
 
Standard $ui_filter = null
 
bool $edit_order = false
 
bool $adminCommands = false
 
string $requested_redirectSource = ""
 
int $current_position = 0
 
ClipboardManager $clipboard
 
StandardGUIRequest $std_request
 
ModeManager $mode_manager = null
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 

Private Member Functions

 checkAgreement ()
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

57  {
58  global $DIC;
59 
60  $this->type = "grp";
61  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
62 
63  $this->lng->loadLanguageModule('grp');
64  $this->lng->loadLanguageModule('obj');
65  $this->refinery = $DIC->refinery();
66  $this->rbacsystem = $DIC->rbac()->system();
67  $this->news = $DIC->news();
68  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ 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 1381 of file class.ilObjGroupGUI.php.

References $DIC, ilObjectGUI\$http, $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, and ilLanguage\txt().

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

1381  : void
1382  {
1383  global $DIC;
1384  $main_tpl = $DIC->ui()->mainTemplate();
1385  $a_target = (int) $a_target;
1386 
1387  $ilUser = $DIC->user();
1388  $ilAccess = $DIC->access();
1389  $lng = $DIC->language();
1390  $ilErr = $DIC['ilErr'];
1391  $http = $DIC->http();
1392  $refinery = $DIC->refinery();
1393 
1394  $target = '';
1395  if ($http->wrapper()->query()->has('target')) {
1396  $target = $http->wrapper()->query()->retrieve(
1397  'target',
1398  $refinery->kindlyTo()->string()
1399  );
1400  }
1401  if (substr($a_add, 0, 5) == 'rcode') {
1402  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1403  // Redirect to login for anonymous
1405  "login.php?target=" . $target . "&cmd=force_login&lang=" .
1406  $ilUser->getCurrentLanguage()
1407  );
1408  }
1409 
1410  // Redirects to target location after assigning user to group
1412  $a_target,
1414  substr($a_add, 5)
1415  );
1416  }
1417 
1418  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1419  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1420  }
1421 
1422  if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1423  ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1424  }
1425 
1426  if ($ilAccess->checkAccess("read", "", $a_target)) {
1428  } else {
1429  // to do: force flat view
1430  if ($ilAccess->checkAccess("visible", "", $a_target)) {
1431  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1432  } else {
1433  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1434  $main_tpl->setOnScreenMessage('failure', sprintf(
1435  $lng->txt("msg_no_perm_read_item"),
1437  ), true);
1439  }
1440  }
1441  }
1442  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1443  }
static handleCode(int $a_ref_id, string $a_type, string $a_code)
GlobalHttpState $http
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:33
static _lookupObjId(int $ref_id)
ilLanguage $lng
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:26
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:55
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 1030 of file class.ilObjGroupGUI.php.

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

Referenced by getTabs().

1030  : void
1031  {
1032  $this->tabs_gui->addTab(
1033  "view_content",
1034  $this->lng->txt("content"),
1035  $this->ctrl->getLinkTarget($this, "view")
1036  );
1037  }
+ 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 1971 of file class.ilObjGroupGUI.php.

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

1971  : array
1972  {
1973  // object defined fields
1974  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1975 
1976  $res_data = array();
1977  foreach ($a_data as $usr_id => $user_data) {
1978  $res_data[$usr_id] = $user_data;
1979 
1980  // udf
1981  $udf_data = new ilUserDefinedData($usr_id);
1982  foreach ($udf_data->getAll() as $field => $value) {
1983  list($f, $field_id) = explode('_', $field);
1984  $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
1985  }
1986 
1987  foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1988  $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
1989  }
1990  }
1991 
1992  return $res_data;
1993  }
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 503 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().

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

1875  : bool
1876  {
1877  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1878  return true;
1879  }
1880 
1881  // Disable aggrement if is not member of group
1882  if (!$this->object->members_obj->isAssigned($this->user->getId())) {
1883  return true;
1884  }
1885 
1886  if (ilMemberViewSettings::getInstance()->isActive()) {
1887  return true;
1888  }
1889 
1890  $privacy = ilPrivacySettings::getInstance();
1891 
1892  // Check agreement
1893  if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1894  and !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())) {
1895  return false;
1896  }
1897  // Check required fields
1898  if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
1899  return false;
1900  }
1901  return true;
1902  }
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 1912 of file class.ilObjGroupGUI.php.

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

1912  : string
1913  {
1914  $link = chr(13) . chr(10) . chr(13) . chr(10);
1915  $link .= $this->lng->txt('grp_mail_permanent_link');
1916  $link .= chr(13) . chr(10) . chr(13) . chr(10);
1917  $link .= ilLink::_getLink($this->object->getRefId());
1918  return rawurlencode(base64_encode($link));
1919  }
+ Here is the call graph for this function:

◆ disableAdministrationPanelObject()

ilObjGroupGUI::disableAdministrationPanelObject ( )

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

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

440  : void
441  {
442  $this->getModeManager()->setContentMode();
443  $this->ctrl->redirect($this, "");
444  }
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

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

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

Referenced by updateInfoObject().

857  : void
858  {
859  $this->checkPermission('write');
860 
861  $this->setSubTabs('settings');
862  $this->tabs_gui->setTabActive('settings');
863  $this->tabs_gui->setSubTabActive('grp_info_settings');
864 
865  $form = $this->initInfoEditor();
866  $this->tpl->setContent($form->getHTML());
867  }
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 769 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().

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

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

541  : void
542  {
543  $this->checkPermission("write");
544 
545  $this->setSubTabs('settings');
546  $this->tabs_gui->setTabActive('settings');
547  $this->tabs_gui->setSubTabActive('general');
548 
549  if (!$a_form) {
550  $a_form = $this->initForm('edit');
551  }
552  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
553  }
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 434 of file class.ilObjGroupGUI.php.

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

434  : void
435  {
436  $this->getModeManager()->setAdminMode();
437  $this->ctrl->redirect($this, "");
438  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

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

References $DIC, $GLOBALS, ilContainerGUI\$gui, ilObjectGUI\$html, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, $service, $user_id, ilCourseParticipants\_getInstanceByObjId(), ilLearningProgress\_tracProgress(), ILIAS\Repository\access(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilContainerGUI\forwardToPageObject(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), ilObjectGUI\getObject(), ILIAS\FileDelivery\http(), infoScreen(), initRefIdFromQuery(), ILIAS\Repository\lng(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, null, 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(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

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

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

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

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

Referenced by executeCommand().

1995  : array
1996  {
1997  $local_roles = $this->object->getLocalGroupRoles();
1998  $grp_member = $this->object->getDefaultMemberRole();
1999  $grp_roles = array();
2000 
2001  //put the group member role to the top of the crs_roles array
2002  if (in_array($grp_member, $local_roles)) {
2003  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2004  unset($local_roles[$grp_roles[$grp_member]]);
2005  }
2006 
2007  foreach ($local_roles as $title => $role_id) {
2008  $grp_roles[(int) $role_id] = ilObjRole::_getTranslation($title);
2009  }
2010  return $grp_roles;
2011  }
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 747 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().

747  : array
748  {
749  $subs = array(
758  );
759  if ($this->news->isGloballyActivated()) {
761  }
762 
763  return $subs;
764  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )
protected

Definition at line 1042 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(), null, ILIAS\Repository\object(), ilObjectServiceSettingsGUI\SKILLS, and ILIAS\Repository\user().

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

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

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

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

Referenced by executeCommand().

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

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

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

References ILIAS\Repository\ctrl().

1193  : void
1194  {
1195  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
1196  }
+ Here is the call graph for this function:

◆ initForm()

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

Definition at line 1446 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(), ilNumberInputGUI\setMinValue(), 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().

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

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

1924  : ?ilObjectListGUI
1925  {
1926  global $DIC;
1927 
1928  $ilSetting = $DIC['ilSetting'];
1929  $ilUser = $DIC['ilUser'];
1930 
1931  $lg = parent::initHeaderAction($sub_type, $sub_id);
1932 
1933  if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1934  if (ilMembershipNotifications::isActiveForRefId($this->ref_id)) {
1935  $noti = new ilMembershipNotifications($this->ref_id);
1936  if (!$noti->isCurrentUserActive()) {
1937  $lg->addHeaderIcon(
1938  "not_icon",
1939  ilUtil::getImagePath("object/notification_off.svg"),
1940  $this->lng->txt("grp_notification_deactivated")
1941  );
1942 
1943  $this->ctrl->setParameter($this, "grp_ntf", 1);
1944  $caption = "grp_activate_notification";
1945  } else {
1946  $lg->addHeaderIcon(
1947  "not_icon",
1948  ilUtil::getImagePath("object/notification_on.svg"),
1949  $this->lng->txt("grp_notification_activated")
1950  );
1951 
1952  $this->ctrl->setParameter($this, "grp_ntf", 0);
1953  $caption = "grp_deactivate_notification";
1954  }
1955 
1956  if ($noti->canCurrentUserEdit()) {
1957  $lg->addCustomCommand(
1958  $this->ctrl->getLinkTarget($this, "saveNotification"),
1959  $caption
1960  );
1961  }
1962 
1963  $this->ctrl->setParameter($this, "grp_ntf", "");
1964  }
1965  }
1966 
1967  return $lg;
1968  }
static _isParticipant(int $a_ref_id, int $a_usr_id)
Static function to check if a user is a participant of the container object.
global $DIC
Definition: shib_login.php:26
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
global $ilSetting
Definition: privfeed.php:31
Membership notification settings.
+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

Definition at line 869 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().

870  {
871  $form = new ilPropertyFormGUI();
872  $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
873  $form->setTitle($this->lng->txt('grp_general_informations'));
874  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
875  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
876 
877  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
878  $area->setInfo($this->lng->txt('grp_information_info'));
879  $area->setValue($this->object->getInformation());
880  $area->setRows(8);
881  $area->setCols(80);
882  $form->addItem($area);
883 
884  return $form;
885  }
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 70 of file class.ilObjGroupGUI.php.

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

Referenced by executeCommand().

70  : int
71  {
72  if ($this->http->wrapper()->query()->has('ref_id')) {
73  return $this->http->wrapper()->query()->retrieve(
74  'ref_id',
75  $this->refinery->kindlyTo()->int()
76  );
77  }
78  return 0;
79  }
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 2013 of file class.ilObjGroupGUI.php.

References ILIAS\Repository\ctrl().

2013  : void
2014  {
2015  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2016  }
+ Here is the call graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

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

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

987  : void
988  {
989  $this->checkPermission('leave');
990 
991  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
992  if ($part->isLastAdmin($this->user->getId())) {
993  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('grp_err_administrator_required'));
994  $this->viewObject();
995  return;
996  }
997 
998  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
999 
1000  $cgui = new ilConfirmationGUI();
1001  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1002  $cgui->setFormAction($this->ctrl->getFormAction($this));
1003  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1004  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1005  $this->tpl->setContent($cgui->getHTML());
1006  }
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 1375 of file class.ilObjGroupGUI.php.

References ILIAS\Repository\ctrl().

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

◆ modifyItemGUI()

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

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

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

481  : void
482  {
483  // if folder is in a course, modify item list gui according to course requirements
484  if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs')) {
485  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
487  $a_item_list_gui,
488  'ilcoursecontentgui',
489  $a_item_data,
490  ilObjCourse::_lookupAboStatus($course_obj_id),
491  $course_ref_id,
492  $course_obj_id,
493  $this->object->getRefId()
494  );
495  }
496  }
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 1907 of file class.ilObjGroupGUI.php.

Referenced by executeCommand().

1907  : bool
1908  {
1909  return parent::prepareOutput($show_subobjects);
1910  }
+ 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 904 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().

904  : array
905  {
906  $privacy = ilPrivacySettings::getInstance();
907 
908  $this->show_tracking =
909  (
911  );
912 
913  $completed = $in_progress = $failed = [];
914  if ($this->show_tracking) {
915  $olp = ilObjectLP::getInstance($this->object->getId());
916  $this->show_tracking = $olp->isActive();
917  }
918 
919  if ($this->show_tracking) {
920  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
921  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
922  $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
923  }
924 
925  if ($privacy->enabledGroupAccessTimes()) {
926  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
927  }
928 
929  $do_prtf = (is_array($selected_columns) &&
930  in_array('prtf', $selected_columns) &&
931  is_array($ids));
932  if ($do_prtf) {
934  $ids,
935  $this->ctrl->getLinkTarget($this, "members")
936  );
937  }
938 
944  $profile_data = ilObjUser::_readUsersProfileData($ids);
945  $members = [];
946  foreach ($ids as $usr_id) {
947  $tmp_data['notification'] = (bool) $this->object->members_obj->isNotificationEnabled((int) $usr_id) ? 1 : 0;
948  $tmp_data['contact'] = (bool) $this->object->members_obj->isContact((int) $usr_id) ? 1 : 0;
949 
950  foreach ((array) ($profile_data[$usr_id] ?? []) as $field => $value) {
951  $tmp_data[$field] = $value;
952  }
953 
954  if ($this->show_tracking) {
955  $tmp_data['progress'] = '';
956  if (in_array($usr_id, $completed)) {
957  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
958  } elseif (in_array($usr_id, $in_progress)) {
959  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
960  } elseif (in_array($usr_id, $failed)) {
961  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
962  } else {
963  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
964  }
965  }
966 
967  if ($privacy->enabledGroupAccessTimes()) {
968  if (isset($progress[$usr_id]['ts']) && ($progress[$usr_id]['ts'] ?? false)) {
969  $tmp_data['access_time'] = ilDatePresentation::formatDate(
970  $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
971  );
972  $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
973  } else {
974  $tmp_data['access_time'] = $this->lng->txt('no_date');
975  $tmp_data['access_time_unix'] = 0;
976  }
977  }
978  $tmp_data['prtf'] = [];
979  if ($do_prtf) {
980  $tmp_data['prtf'] = ($all_prtf[$usr_id] ?? []);
981  }
982  $members[$usr_id] = $tmp_data;
983  }
984  return $members;
985  }
const LP_STATUS_NOT_ATTEMPTED
static _lookupInProgressForObject(int $a_obj_id, ?array $a_user_ids=null)
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 formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static _lookupProgressByObjId(int $a_obj_id)
lookup progress for a specific object
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 472 of file class.ilObjGroupGUI.php.

References ILIAS\Repository\tabs().

Referenced by executeCommand(), and viewObject().

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

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

825  : void
826  {
827  $location = [];
828  if ($this->http->wrapper()->post()->has('location')) {
829  $custom_transformer = $this->refinery->custom()->transformation(
830  function ($array) {
831  return $array;
832  }
833  );
834  $location = $this->http->wrapper()->post()->retrieve(
835  'location',
836  $custom_transformer
837  );
838  }
839  $enable_map = false;
840  if ($this->http->wrapper()->post()->has('enable_map')) {
841  $enable_map = $this->http->wrapper()->post()->retrieve(
842  'enable_map',
843  $this->refinery->kindlyTo()->bool()
844  );
845  }
846 
847  $this->object->setLatitude((string) $location['latitude']);
848  $this->object->setLongitude((string) $location['longitude']);
849  $this->object->setLocationZoom((int) $location['zoom']);
850  $this->object->setEnableGroupMap($enable_map);
851  $this->object->update();
852  $this->ctrl->redirect($this, "editMapSettings");
853  }
$location
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 1352 of file class.ilObjGroupGUI.php.

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

1352  : void
1353  {
1354  $noti = new ilMembershipNotifications($this->ref_id);
1355 
1356  $grp_notification = false;
1357  if ($this->http->wrapper()->query()->has('grp_ntf')) {
1358  $grp_notification = $this->http->wrapper()->query()->retrieve(
1359  'grp_ntf',
1360  $this->refinery->kindlyTo()->bool()
1361  );
1362  }
1363 
1364  if ($noti->canCurrentUserEdit()) {
1365  if ($grp_notification) {
1366  $noti->activateUser();
1367  } else {
1368  $noti->deactivateUser();
1369  }
1370  }
1371  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1372  $this->ctrl->redirect($this, "");
1373  }
static http()
Fetches the global http state from ILIAS.
Membership notification settings.
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

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

References ILIAS\Repository\ctrl().

2021  : void
2022  {
2023  $this->ctrl->setReturn($this, "view");
2024  }
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

Definition at line 1802 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().

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

1008  : void
1009  {
1010  $this->checkPermission('leave');
1011  $this->object->members_obj->delete($this->user->getId());
1012  $this->object->members_obj->sendNotification(
1014  $this->user->getId()
1015  );
1016  $this->object->members_obj->sendNotification(
1018  $this->user->getId()
1019  );
1020 
1021  $this->tpl->setOnScreenMessage('success', $this->lng->txt('grp_msg_membership_annulled'), true);
1022  $this->ctrl->setParameterByClass(
1023  "ilrepositorygui",
1024  "ref_id",
1025  $this->tree->getParentId($this->object->getRefId())
1026  );
1027  $this->ctrl->redirectByClass("ilrepositorygui", "");
1028  }
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 555 of file class.ilObjGroupGUI.php.

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

555  : void
556  {
558  $this->object->getRefId(),
559  (int) $_REQUEST['grp_type']
560  );
561 
562  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
563  $this->ctrl->redirect($this, 'edit');
564  }
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 887 of file class.ilObjGroupGUI.php.

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

887  : void
888  {
889  $this->checkPermission('manage_members');
890 
891  $important = '';
892  if ($this->http->wrapper()->post()->has('important')) {
893  $important = $this->http->wrapper()->post()->retrieve(
894  'important',
895  $this->refinery->kindlyTo()->string()
896  );
897  }
898  $this->object->setInformation($important);
899  $this->object->update();
900  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
901  $this->editInfoObject();
902  }
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 567 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().

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

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

Referenced by leaveObject().

449  : void
450  {
452  $this->user->getId(),
453  $this->object->getId(),
454  $this->object->getRefId(),
455  'grp'
456  );
457 
458  if ($this->isActiveAdministrationPanel()) {
459  parent::renderObject();
461  return;
462  }
463 
464  if (!$this->checkAgreement()) {
465  $this->ctrl->redirectByClass(ilMemberAgreementGUI::class);
466  }
467 
468  $this->tabs_gui->setTabActive('view_content');
469  $this->renderObject();
470  }
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

◆ $news

News ilObjGroupGUI::$news
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGroupGUI::$rbacsystem
protected

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

◆ $refinery

Factory ilObjGroupGUI::$refinery
protected

Definition at line 49 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: