ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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
 
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
 
ilObjectCustomIconFactory $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 ()
 

Private Attributes

GlobalHttpState $http
 

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

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

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

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

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

1378  : void
1379  {
1380  global $DIC;
1381  $main_tpl = $DIC->ui()->mainTemplate();
1382  $a_target = (int) $a_target;
1383 
1384  $ilUser = $DIC->user();
1385  $ilAccess = $DIC->access();
1386  $lng = $DIC->language();
1387  $ilErr = $DIC['ilErr'];
1388  $http = $DIC->http();
1389  $refinery = $DIC->refinery();
1390 
1391  $target = '';
1392  if ($http->wrapper()->query()->has('target')) {
1393  $target = $http->wrapper()->query()->retrieve(
1394  'target',
1395  $refinery->kindlyTo()->string()
1396  );
1397  }
1398  if (substr($a_add, 0, 5) == 'rcode') {
1399  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1400  // Redirect to login for anonymous
1402  "login.php?target=" . $target . "&cmd=force_login&lang=" .
1403  $ilUser->getCurrentLanguage()
1404  );
1405  }
1406 
1407  // Redirects to target location after assigning user to group
1409  $a_target,
1411  substr($a_add, 5)
1412  );
1413  }
1414 
1415  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1416  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1417  }
1418 
1419  if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1420  ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1421  }
1422 
1423  if ($ilAccess->checkAccess("read", "", $a_target)) {
1425  } else {
1426  // to do: force flat view
1427  if ($ilAccess->checkAccess("visible", "", $a_target)) {
1428  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1429  } else {
1430  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1431  $main_tpl->setOnScreenMessage('failure', sprintf(
1432  $lng->txt("msg_no_perm_read_item"),
1434  ), true);
1436  }
1437  }
1438  }
1439  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1440  }
static handleCode(int $a_ref_id, string $a_type, string $a_code)
const ANONYMOUS_USER_ID
Definition: constants.php:27
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _gotoRepositoryNode(int $ref_id, string $cmd="")
$ilErr
Definition: raiseError.php:33
static _lookupObjId(int $ref_id)
ilLanguage $lng
GlobalHttpState $http
static _lookupTitle(int $obj_id)
global $DIC
Definition: shib_login.php:22
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 1027 of file class.ilObjGroupGUI.php.

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

Referenced by getTabs().

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

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

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

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

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

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

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

◆ disableAdministrationPanelObject()

ilObjGroupGUI::disableAdministrationPanelObject ( )

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

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

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

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

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

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

Referenced by updateInfoObject().

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

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

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

531  : void
532  {
533  $this->checkPermission("write");
534 
535  $this->setSubTabs('settings');
536  $this->tabs_gui->setTabActive('settings');
537  $this->tabs_gui->setSubTabActive('general');
538 
539  if (!$a_form) {
540  $a_form = $this->initForm('edit');
541  }
542  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
543  }
setSubTabs(string $a_tab)
initForm(string $a_mode='edit', bool $a_omit_form_action=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ enableAdministrationPanelObject()

ilObjGroupGUI::enableAdministrationPanelObject ( )

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

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

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

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

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

References $DIC, $GLOBALS, ilContainerGUI\$gui, ilObjectGUI\$html, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, $service, $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(), 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(), and ILIAS\Repository\user().

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

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

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

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

Referenced by executeCommand().

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

744  : array
745  {
746  $subs = array(
755  );
756  if ($this->news->isGloballyActivated()) {
758  }
759 
760  return $subs;
761  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )
protected

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

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

References $c, $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().

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

References ILIAS\Repository\ctrl().

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

◆ initForm()

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

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

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

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

1921  : ?ilObjectListGUI
1922  {
1923  global $DIC;
1924 
1925  $ilSetting = $DIC['ilSetting'];
1926  $ilUser = $DIC['ilUser'];
1927 
1928  $lg = parent::initHeaderAction($sub_type, $sub_id);
1929 
1930  if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1931  if (ilMembershipNotifications::isActiveForRefId($this->ref_id)) {
1932  $noti = new ilMembershipNotifications($this->ref_id);
1933  if (!$noti->isCurrentUserActive()) {
1934  $lg->addHeaderIcon(
1935  "not_icon",
1936  ilUtil::getImagePath("object/notification_off.svg"),
1937  $this->lng->txt("grp_notification_deactivated")
1938  );
1939 
1940  $this->ctrl->setParameter($this, "grp_ntf", 1);
1941  $caption = "grp_activate_notification";
1942  } else {
1943  $lg->addHeaderIcon(
1944  "not_icon",
1945  ilUtil::getImagePath("object/notification_on.svg"),
1946  $this->lng->txt("grp_notification_activated")
1947  );
1948 
1949  $this->ctrl->setParameter($this, "grp_ntf", 0);
1950  $caption = "grp_deactivate_notification";
1951  }
1952 
1953  if ($noti->canCurrentUserEdit()) {
1954  $lg->addCustomCommand(
1955  $this->ctrl->getLinkTarget($this, "saveNotification"),
1956  $caption
1957  );
1958  }
1959 
1960  $this->ctrl->setParameter($this, "grp_ntf", "");
1961  }
1962  }
1963 
1964  return $lg;
1965  }
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:22
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 866 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().

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

◆ initRefIdFromQuery()

ilObjGroupGUI::initRefIdFromQuery ( )
protected

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

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

Referenced by executeCommand().

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

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

References ILIAS\Repository\ctrl().

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

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

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

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

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

References ILIAS\Repository\ctrl().

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

◆ modifyItemGUI()

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

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

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

471  : void
472  {
473  // if folder is in a course, modify item list gui according to course requirements
474  if ($course_ref_id = $this->tree->checkForParentType($this->object->getRefId(), 'crs')) {
475  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
477  $a_item_list_gui,
478  'ilcoursecontentgui',
479  $a_item_data,
480  ilObjCourse::_lookupAboStatus($course_obj_id),
481  $course_ref_id,
482  $course_obj_id,
483  $this->object->getRefId()
484  );
485  }
486  }
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 1904 of file class.ilObjGroupGUI.php.

Referenced by executeCommand().

1904  : bool
1905  {
1906  return parent::prepareOutput($show_subobjects);
1907  }
+ 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 901 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().

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

References ILIAS\Repository\tabs().

Referenced by executeCommand(), and viewObject().

462  : void
463  {
464  $this->tabs->activateTab("view_content");
465  parent::renderObject();
466  }
+ 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 822 of file class.ilObjGroupGUI.php.

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

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

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

1349  : void
1350  {
1351  $noti = new ilMembershipNotifications($this->ref_id);
1352 
1353  $grp_notification = false;
1354  if ($this->http->wrapper()->query()->has('grp_ntf')) {
1355  $grp_notification = $this->http->wrapper()->query()->retrieve(
1356  'grp_ntf',
1357  $this->refinery->kindlyTo()->bool()
1358  );
1359  }
1360 
1361  if ($noti->canCurrentUserEdit()) {
1362  if ($grp_notification) {
1363  $noti->activateUser();
1364  } else {
1365  $noti->deactivateUser();
1366  }
1367  }
1368  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
1369  $this->ctrl->redirect($this, "");
1370  }
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 2018 of file class.ilObjGroupGUI.php.

References ILIAS\Repository\ctrl().

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

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

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

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

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

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

545  : void
546  {
548  $this->object->getRefId(),
549  (int) $_REQUEST['grp_type']
550  );
551 
552  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
553  $this->ctrl->redirect($this, 'edit');
554  }
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 884 of file class.ilObjGroupGUI.php.

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

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

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

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

Referenced by leaveObject().

439  : void
440  {
442  $this->user->getId(),
443  $this->object->getId(),
444  $this->object->getRefId(),
445  'grp'
446  );
447 
448  if ($this->isActiveAdministrationPanel()) {
449  parent::renderObject();
451  return;
452  }
453 
454  if (!$this->checkAgreement()) {
455  $this->ctrl->redirectByClass(ilMemberAgreementGUI::class);
456  }
457 
458  $this->tabs_gui->setTabActive('view_content');
459  $this->renderObject();
460  }
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

GlobalHttpState ilObjGroupGUI::$http
private

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

◆ $news

News ilObjGroupGUI::$news
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGroupGUI::$rbacsystem
protected

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

◆ $refinery

Factory ilObjGroupGUI::$refinery
protected

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

◆ $show_tracking

bool ilObjGroupGUI::$show_tracking = false
protected

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


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