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

Static Public Member Functions

static _goto (int $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 ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 
 afterUpdate ()
 
 setTitleAndDescription ()
 
 showPossibleSubObjects ()
 
 supportsPageEditor ()
 
 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
 
ilNewsService $news
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
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 Style Content GUIService $content_style_gui
 
ilRbacSystem $rbacsystem
 
ilRbacReview $rbacreview
 
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
 
ViewManager $view_manager
 
ilComponentFactory $component_factory
 
ILIAS Style Content DomainService $content_style_domain
 

Private Member Functions

 checkAgreement ()
 

Private Attributes

GlobalHttpState $http
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Data Fields inherited from ilContainerGUI
int $bl_cnt = 1
 
bool $multi_download_enabled = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

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

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

57  {
58  global $DIC;
59 
60  $this->type = "grp";
61  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
62 
63  $this->lng->loadLanguageModule('grp');
64  $this->lng->loadLanguageModule('obj');
65  $this->http = $DIC->http();
66  $this->refinery = $DIC->refinery();
67  $this->rbacsystem = $DIC->rbac()->system();
68  $this->news = $DIC->news();
69  }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

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

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

Referenced by ilObjGroupReferenceGUI\_goto().

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

◆ addContentTab()

ilObjGroupGUI::addContentTab ( )

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

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

Referenced by getTabs().

1018  : void
1019  {
1020  $this->tabs_gui->addTab(
1021  "view_content",
1022  $this->lng->txt("content"),
1023  $this->ctrl->getLinkTarget($this, "view")
1024  );
1025  }
+ 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 1955 of file class.ilObjGroupGUI.php.

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

1955  : array
1956  {
1957  // object defined fields
1958  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1959 
1960  $res_data = array();
1961  foreach ($a_data as $usr_id => $user_data) {
1962  $res_data[$usr_id] = $user_data;
1963 
1964  // udf
1965  $udf_data = new ilUserDefinedData($usr_id);
1966  foreach ($udf_data->getAll() as $field => $value) {
1967  list($f, $field_id) = explode('_', $field);
1968  $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
1969  }
1970 
1971  foreach ((array) ($odfs[$usr_id] ?? []) as $cdf_field => $cdf_value) {
1972  $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
1973  }
1974  }
1975 
1976  return $res_data;
1977  }
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 490 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().

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

1859  : bool
1860  {
1861  if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
1862  return true;
1863  }
1864 
1865  // Disable aggrement if is not member of group
1866  if (!$this->object->members_obj->isAssigned($this->user->getId())) {
1867  return true;
1868  }
1869 
1870  if (ilMemberViewSettings::getInstance()->isActive()) {
1871  return true;
1872  }
1873 
1874  $privacy = ilPrivacySettings::getInstance();
1875 
1876  // Check agreement
1877  if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1878  and !ilMemberAgreement::_hasAccepted($this->user->getId(), $this->object->getId())) {
1879  return false;
1880  }
1881  // Check required fields
1882  if (!ilCourseUserData::_checkRequired($this->user->getId(), $this->object->getId())) {
1883  return false;
1884  }
1885  return true;
1886  }
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 1896 of file class.ilObjGroupGUI.php.

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

1896  : string
1897  {
1898  $link = chr(13) . chr(10) . chr(13) . chr(10);
1899  $link .= $this->lng->txt('grp_mail_permanent_link');
1900  $link .= chr(13) . chr(10) . chr(13) . chr(10);
1901  $link .= ilLink::_getLink($this->object->getRefId());
1902  return rawurlencode(base64_encode($link));
1903  }
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

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

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

Referenced by updateInfoObject().

845  : void
846  {
847  $this->checkPermission('write');
848 
849  $this->setSubTabs('settings');
850  $this->tabs_gui->setTabActive('settings');
851  $this->tabs_gui->setSubTabActive('grp_info_settings');
852 
853  $form = $this->initInfoEditor();
854  $this->tpl->setContent($form->getHTML());
855  }
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 757 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(), ilPropertyFormGUI\setTitle(), and ilCheckboxInputGUI\setValue().

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

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

528  : void
529  {
530  $this->checkPermission("write");
531 
532  $this->setSubTabs('settings');
533  $this->tabs_gui->setTabActive('settings');
534  $this->tabs_gui->setSubTabActive('grp_settings');
535 
536  if (!$a_form) {
537  $a_form = $this->initForm('edit');
538  }
539  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
540  }
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:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

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

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

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

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

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

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

Referenced by executeCommand().

1979  : array
1980  {
1981  $local_roles = $this->object->getLocalGroupRoles();
1982  $grp_member = $this->object->getDefaultMemberRole();
1983  $grp_roles = array();
1984 
1985  //put the group member role to the top of the crs_roles array
1986  if (in_array($grp_member, $local_roles)) {
1987  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
1988  unset($local_roles[$grp_roles[$grp_member]]);
1989  }
1990 
1991  foreach ($local_roles as $title => $role_id) {
1992  $grp_roles[(int) $role_id] = ilObjRole::_getTranslation($title);
1993  }
1994  return $grp_roles;
1995  }
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 735 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().

735  : array
736  {
737  $subs = array(
746  );
747  if ($this->news->isGloballyActivated()) {
749  }
750 
751  return $subs;
752  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )
protected

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

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

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

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

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

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

Referenced by executeCommand(), and infoScreenObject().

1188  : void
1189  {
1190  $this->tabs_gui->setTabActive('info_short');
1191 
1192  if (!$this->checkPermissionBool('read')) {
1193  $this->checkPermission('visible');
1194  }
1195 
1197  $this->object->getId(),
1198  $this->object->getId(),
1199  'grp'
1200  );
1201 
1202  $info = new ilInfoScreenGUI($this);
1203 
1204  if (strlen($this->object->getInformation())) {
1205  $info->addSection($this->lng->txt('grp_general_informations'));
1206  $info->addProperty($this->lng->txt('grp_information'), nl2br(
1207  ilUtil::makeClickable($this->object->getInformation(), true)
1208  ));
1209  }
1210 
1211  $info->enablePrivateNotes();
1212  $info->enableLearningProgress(true);
1213 
1214  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'grp', $this->object->getId());
1215  $record_gui->setInfoObject($info);
1216  $record_gui->parse();
1217 
1218  // meta data
1219  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1220 
1221 
1222  // support contacts
1223  $parts = ilParticipants::getInstance($this->object->getRefId());
1224  $contacts = $parts->getContacts();
1225  if (count($contacts) > 0) {
1226  $info->addSection($this->lng->txt("grp_mem_contacts"));
1227  foreach ($contacts as $c) {
1228  $pgui = new ilPublicUserProfileGUI($c);
1229  $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
1230  $pgui->setEmbedded(true);
1231  $info->addProperty("", $pgui->getHTML());
1232  }
1233  }
1234 
1235 
1236  $info->addSection($this->lng->txt('group_registration'));
1237  $info->showLDAPRoleGroupMappingInfo();
1238 
1239  if (!$this->object->isRegistrationEnabled()) {
1240  $info->addProperty(
1241  $this->lng->txt('group_registration_mode'),
1242  $this->lng->txt('grp_reg_deac_info_screen')
1243  );
1244  } else {
1245  switch ($this->object->getRegistrationType()) {
1247  $info->addProperty(
1248  $this->lng->txt('group_registration_mode'),
1249  $this->lng->txt('grp_reg_direct_info_screen')
1250  );
1251  break;
1252 
1254  $info->addProperty(
1255  $this->lng->txt('group_registration_mode'),
1256  $this->lng->txt('grp_reg_req_info_screen')
1257  );
1258  break;
1259 
1261  $info->addProperty(
1262  $this->lng->txt('group_registration_mode'),
1263  $this->lng->txt('grp_reg_passwd_info_screen')
1264  );
1265  break;
1266 
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)
Class ilInfoScreenGUI.
$c
Definition: cli.php:38
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
static getInstance(int $a_ref_id)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _fillHTMLMetaTags(int $a_rbac_id, int $a_obj_id, string $a_type)
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _getInstanceByType(string $a_type)
Get Singleton Instance.
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
setInfoObject(ilInfoScreenGUI $info)
get info sections
static makeClickable(string $a_text, bool $detectGotoLinks=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

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

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

1181  : void
1182  {
1183  $this->ctrl->setCmd("showSummary");
1184  $this->ctrl->setCmdClass("ilinfoscreengui");
1185  $this->infoScreen();
1186  }
+ Here is the call graph for this function:

◆ initForm()

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

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

References ilContainerGUI\$form, ilLink\_getLink(), 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(), ilCheckboxInputGUI\setChecked(), ilFormGUI\setFormAction(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMinValue(), ilDateDurationInputGUI\setShowTime(), ilPropertyFormGUI\setTableWidth(), ilPropertyFormGUI\setTitle(), ilPropertyFormGUI\setTitleIcon(), ilCheckboxInputGUI\setValue(), 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().

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

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

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

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

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

858  {
859  $form = new ilPropertyFormGUI();
860  $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
861  $form->setTitle($this->lng->txt('grp_general_informations'));
862  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
863  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
864 
865  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
866  $area->setInfo($this->lng->txt('grp_information_info'));
867  $area->setValue($this->object->getInformation());
868  $area->setRows(8);
869  $area->setCols(80);
870  $form->addItem($area);
871 
872  return $form;
873  }
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 71 of file class.ilObjGroupGUI.php.

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

Referenced by executeCommand().

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

References ILIAS\Repository\ctrl().

1997  : void
1998  {
1999  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2000  }
+ Here is the call graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

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

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

975  : void
976  {
977  $this->checkPermission('leave');
978 
979  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
980  if ($part->isLastAdmin($this->user->getId())) {
981  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('grp_err_administrator_required'));
982  $this->viewObject();
983  return;
984  }
985 
986  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
987 
988  $cgui = new ilConfirmationGUI();
989  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
990  $cgui->setFormAction($this->ctrl->getFormAction($this));
991  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
992  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
993  $this->tpl->setContent($cgui->getHTML());
994  }
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

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

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

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

Referenced by executeCommand().

1891  : bool
1892  {
1893  return parent::prepareOutput($show_subobjects);
1894  }
+ 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 892 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().

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

◆ renderObject()

ilObjGroupGUI::renderObject ( )

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

References ILIAS\Repository\tabs().

Referenced by executeCommand(), and viewObject().

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

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

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

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

Definition at line 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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

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

References ILIAS\Repository\ctrl().

2005  : void
2006  {
2007  $this->ctrl->setReturn($this, "view");
2008  }
+ Here is the call graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs ( string  $a_tab)
protected

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

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

◆ unsubscribeObject()

ilObjGroupGUI::unsubscribeObject ( )

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

996  : void
997  {
998  $this->checkPermission('leave');
999  $this->object->members_obj->delete($this->user->getId());
1000  $this->object->members_obj->sendNotification(
1002  $this->user->getId()
1003  );
1004  $this->object->members_obj->sendNotification(
1006  $this->user->getId()
1007  );
1008 
1009  $this->tpl->setOnScreenMessage('success', $this->lng->txt('grp_msg_membership_annulled'), true);
1010  $this->ctrl->setParameterByClass(
1011  "ilrepositorygui",
1012  "ref_id",
1013  $this->tree->getParentId($this->object->getRefId())
1014  );
1015  $this->ctrl->redirectByClass("ilrepositorygui", "");
1016  }
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 542 of file class.ilObjGroupGUI.php.

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

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

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

875  : void
876  {
877  $this->checkPermission('manage_members');
878 
879  $important = '';
880  if ($this->http->wrapper()->post()->has('important')) {
881  $important = $this->http->wrapper()->post()->retrieve(
882  'important',
883  $this->refinery->kindlyTo()->string()
884  );
885  }
886  $this->object->setInformation($important);
887  $this->object->update();
888  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"));
889  $this->editInfoObject();
890  }
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 554 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().

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

◆ viewObject()

ilObjGroupGUI::viewObject ( )

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

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

Referenced by leaveObject().

426  : void
427  {
429  $this->user->getId(),
430  $this->object->getId(),
431  $this->object->getRefId(),
432  'grp'
433  );
434 
436  $this->object->getId(),
437  $this->object->getId(),
438  'grp'
439  );
440 
441  if ($this->getAdminMode() === self::ADMIN_MODE_SETTINGS) {
442  parent::viewObject();
443  return;
444  }
445 
446  if (!$this->checkAgreement()) {
447  $this->tabs_gui->setTabActive('view_content');
448  $this->ctrl->setReturn($this, 'view');
449  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
450  $this->ctrl->setCmdClass(get_class($agreement));
451  $this->ctrl->forwardCommand($agreement);
452  return;
453  }
454 
455  $this->tabs_gui->setTabActive('view_content');
456  $this->renderObject();
457  }
static _fillHTMLMetaTags(int $a_rbac_id, int $a_obj_id, string $a_type)
static _tracProgress(int $a_user_id, int $a_obj_id, int $a_ref_id, string $a_obj_type='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $http

GlobalHttpState ilObjGroupGUI::$http
private

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

◆ $news

ilNewsService ilObjGroupGUI::$news
protected

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

◆ $rbacsystem

ilRbacSystem ilObjGroupGUI::$rbacsystem
protected

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

◆ $refinery

Factory ilObjGroupGUI::$refinery
protected

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

◆ $show_tracking

bool ilObjGroupGUI::$show_tracking = false
protected

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


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