ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilObjGroupGUI Class Reference

Class ilObjGroupGUI. More...

+ Inheritance diagram for ilObjGroupGUI:
+ Collaboration diagram for ilObjGroupGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
 Constructor @access public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 viewObject ()
 list childs of current object More...
 
 renderObject ()
 Render group. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container @global type $tree. More...
 
 afterSave (\ilObject $new_object, $a_redirect=true)
 After object creation. More...
 
 editObject (ilPropertyFormGUI $a_form=null)
 Edit object. More...
 
 updateGroupTypeObject ()
 change group type More...
 
 updateObject ()
 update group settings More...
 
 editGroupIconsObject ($a_form=null)
 edit container icons More...
 
 initGroupIconsForm ()
 
 updateGroupIconsObject ()
 update group icons More...
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 editInfoObject ()
 edit info More...
 
 updateInfoObject ()
 update info More...
 
 readMemberData ($ids, $selected_columns=null)
 
 leaveObject ()
 leave Group @access public More...
 
 unsubscribeObject ()
 unsubscribe from group More...
 
 addContentTab ()
 Add content tab. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 saveNotificationObject ()
 :TEMP: Save notification setting (from infoscreen) More...
 
 initForm ($a_mode='edit', $a_omit_form_action=false)
 init create/edit form More...
 
 prepareOutput ($a_show_subobjects=true)
 Handle member view. More...
 
 createMailSignature ()
 Create a course mail signature. More...
 
 addCustomData ($a_data)
 
 getLocalRoles ()
 returns all local roles [role_id] => title More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard 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 ()
 
 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 ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 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 ()
 show clipboard More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 @access public More...
 
 cloneWizardPageListObject ()
 @access public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container @global type $lng. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
 addToDeskObject ()
 Add desktop item @access public. More...
 
 removeFromDeskObject ()
 Remove from desktop @access public. More...
 

Static Public Member Functions

static _goto ($a_target, $a_add="")
 goto target group More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 

Protected Member Functions

 initInfoEditor ()
 init info editor More...
 
 membersObject ()
 Called from goto? More...
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 

Private Member Functions

 checkAgreement ()
 Check agreement and redirect if it is not accepted. More...
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

Reimplemented from ilContainerGUI.

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

36 {
37 global $ilSetting;
38
39 $this->type = "grp";
40 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
41
42 $this->lng->loadLanguageModule('grp');
43
44 $this->setting = $ilSetting;
45 }
global $ilSetting
Definition: privfeed.php:17

References $ilSetting.

Member Function Documentation

◆ _goto()

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

goto target group

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

1351 {
1352 global $ilAccess, $ilErr, $lng,$ilUser;
1353
1354 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1355 if (substr($a_add, 0, 5) == 'rcode') {
1356 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1357 // Redirect to login for anonymous
1359 "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
1360 $ilUser->getCurrentLanguage()
1361 );
1362 }
1363
1364 // Redirects to target location after assigning user to group
1366 $a_target,
1368 substr($a_add, 5)
1369 );
1370 }
1371
1372 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1373 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1374 }
1375
1376 if ($ilAccess->checkAccess("read", "", $a_target)) {
1378 } else {
1379 // to do: force flat view
1380 if ($ilAccess->checkAccess("visible", "", $a_target)) {
1381 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1382 } else {
1383 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1385 $lng->txt("msg_no_perm_read_item"),
1387 ), true);
1389 }
1390 }
1391 }
1392 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1393 }
sprintf('%.4f', $callTime)
$_GET["client_id"]
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$ilUser
Definition: imgupload.php:18

References $_GET, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilMembershipRegistrationCodeUtils\handleCode(), ilUtil\redirect(), ilUtil\sendFailure(), and sprintf.

Referenced by ilObjGroupReferenceGUI\_goto().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContentTab()

ilObjGroupGUI::addContentTab ( )

Add content tab.

Parameters

return

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

1013 {
1014 $this->tabs_gui->addTab(
1015 "view_content",
1016 $this->lng->txt("content"),
1017 $this->ctrl->getLinkTarget($this, "view")
1018 );
1019 }

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ addCustomData()

ilObjGroupGUI::addCustomData (   $a_data)
Parameters
array$a_data

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

1940 {
1941 // object defined fields
1942 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1943 $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1944
1945 $res_data = array();
1946 foreach ($a_data as $usr_id => $user_data) {
1947 $res_data[$usr_id] = $user_data;
1948
1949 // udf
1950 include_once './Services/User/classes/class.ilUserDefinedData.php';
1951 $udf_data = new ilUserDefinedData($usr_id);
1952 foreach ($udf_data->getAll() as $field => $value) {
1953 list($f, $field_id) = explode('_', $field);
1954 $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
1955 }
1956
1957 foreach ((array) $odfs[$usr_id] as $cdf_field => $cdf_value) {
1958 $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
1959 }
1960 }
1961
1962 return $res_data;
1963 }
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
Class ilUserDefinedData.

References ilCourseUserData\_getValuesByObjId().

+ Here is the call graph for this function:

◆ afterSave()

ilObjGroupGUI::afterSave ( \ilObject  $new_object,
  $a_redirect = true 
)

After object creation.

Parameters
\ilObject$new_object

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

419 {
420 global $ilUser, $ilSetting;
421
422 $new_object->setRegistrationType(GRP_REGISTRATION_DIRECT);
423 $new_object->update();
424
425 // check for parent group or course => SORT_INHERIT
426 $sort_mode = ilContainer::SORT_TITLE;
427 if (
428 $GLOBALS['tree']->checkForParentType($new_object->getRefId(), 'crs', true) ||
429 $GLOBALS['tree']->checkForParentType($new_object->getRefId(), 'grp', true)
430 ) {
431 $sort_mode = ilContainer::SORT_INHERIT;
432 }
433
434 // Save sorting
435 include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
436 $sort = new ilContainerSortingSettings($new_object->getId());
437 $sort->setSortMode($sort_mode);
438 $sort->update();
439
440
441 // Add user as admin and enable notification
442 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
443 $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
444 $members_obj->add($ilUser->getId(), IL_GRP_ADMIN);
445 $members_obj->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
446
447 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
448 if ($a_redirect) {
449 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
450 $this->ctrl->redirect($this, 'edit');
451 }
452 }
const GRP_REGISTRATION_DIRECT
const IL_GRP_ADMIN
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

References $GLOBALS, $ilSetting, $ilUser, ilGroupParticipants\_getInstanceByObjId(), ilObject\getId(), ilObject\getRefId(), GRP_REGISTRATION_DIRECT, IL_GRP_ADMIN, ilUtil\sendSuccess(), ilContainer\SORT_INHERIT, ilContainer\SORT_TITLE, and ilObject\update().

+ Here is the call graph for this function:

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

@access private

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

1819 {
1820 global $ilUser,$ilAccess;
1821
1822 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1823 return true;
1824 }
1825
1826 // Disable aggrement if is not member of group
1827 if (!$this->object->members_obj->isAssigned($ilUser->getId())) {
1828 return true;
1829 }
1830
1831 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1832 if (ilMemberViewSettings::getInstance()->isActive()) {
1833 return true;
1834 }
1835
1836 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1837 include_once('Services/Membership/classes/class.ilMemberAgreement.php');
1839
1840 // Check agreement
1841 if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1842 and !ilMemberAgreement::_hasAccepted($ilUser->getId(), $this->object->getId())) {
1843 return false;
1844 }
1845 // Check required fields
1846 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1847 if (!ilCourseUserData::_checkRequired($ilUser->getId(), $this->object->getId())) {
1848 return false;
1849 }
1850 return true;
1851 }
static _hasFields($a_container_id)
Check if there are any define fields.
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
static getInstance()
Get instance.
static _getInstance()
Get instance of ilPrivacySettings.

References $ilUser, ilCourseUserData\_checkRequired(), ilPrivacySettings\_getInstance(), ilMemberAgreement\_hasAccepted(), ilCourseDefinedFieldDefinition\_hasFields(), and ilMemberViewSettings\getInstance().

Referenced by viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )

Create a course mail signature.

Returns
string

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

1880 {
1881 $link = chr(13) . chr(10) . chr(13) . chr(10);
1882 $link .= $this->lng->txt('grp_mail_permanent_link');
1883 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1884 include_once 'Services/Link/classes/class.ilLink.php';
1885 $link .= ilLink::_getLink($this->object->getRefId());
1886 return rawurlencode(base64_encode($link));
1887 }

References ilLink\_getLink().

+ Here is the call graph for this function:

◆ editGroupIconsObject()

ilObjGroupGUI::editGroupIconsObject (   $a_form = null)

edit container icons

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

661 {
662 global $tpl;
663
664 $this->checkPermission('write');
665
666 $this->setSubTabs("settings");
667 $this->tabs_gui->setTabActive('settings');
668 $this->tabs_gui->setSubTabActive('grp_icon_settings');
669
670 if (!$a_form) {
671 $a_form = $this->initGroupIconsForm();
672 }
673
674 $tpl->setContent($a_form->getHTML());
675 }
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), initGroupIconsForm(), and setSubTabs().

Referenced by updateGroupIconsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

@access public

Returns

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

801 {
802 global $ilErr,$ilAccess;
803
804 $this->checkPermission('write');
805
806 $this->setSubTabs('settings');
807 $this->tabs_gui->setTabActive('settings');
808 $this->tabs_gui->setSubTabActive('grp_info_settings');
809
810 $form = $this->initInfoEditor();
811 $this->tpl->setContent($form->getHTML());
812 }
initInfoEditor()
init info editor
if(isset($_POST['submit'])) $form

References $form, ilObjectGUI\$ilErr, ilObjectGUI\checkPermission(), initInfoEditor(), and setSubTabs().

Referenced by updateInfoObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editMapSettingsObject()

ilObjGroupGUI::editMapSettingsObject ( )

Edit Map Settings.

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

724 {
725 global $ilUser, $ilCtrl, $ilUser, $ilAccess;
726
727 $this->setSubTabs("settings");
728 $this->tabs_gui->setTabActive('settings');
729 $this->tabs_gui->setSubTabActive('grp_map_settings');
730
731 include_once('./Services/Maps/classes/class.ilMapUtil.php');
732 if (!ilMapUtil::isActivated() ||
733 !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
734 return;
735 }
736
737 $latitude = $this->object->getLatitude();
738 $longitude = $this->object->getLongitude();
739 $zoom = $this->object->getLocationZoom();
740
741 // Get Default settings, when nothing is set
742 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
744 $latitude = $def["latitude"];
745 $longitude = $def["longitude"];
746 $zoom = $def["zoom"];
747 }
748
749
750 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
751 $form = new ilPropertyFormGUI();
752 $form->setFormAction($ilCtrl->getFormAction($this));
753
754 $form->setTitle($this->lng->txt("grp_map_settings"));
755
756 // enable map
757 $public = new ilCheckboxInputGUI(
758 $this->lng->txt("grp_enable_map"),
759 "enable_map"
760 );
761 $public->setValue("1");
762 $public->setChecked($this->object->getEnableGroupMap());
763 $form->addItem($public);
764
765 // map location
766 $loc_prop = new ilLocationInputGUI(
767 $this->lng->txt("grp_map_location"),
768 "location"
769 );
770 $loc_prop->setLatitude($latitude);
771 $loc_prop->setLongitude($longitude);
772 $loc_prop->setZoom($zoom);
773 $form->addItem($loc_prop);
774
775 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
776
777 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
778 }
This class represents a checkbox property in a property form.
This class represents a location property in a property form.
static isActivated()
Checks whether Map feature is activated.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a property form user interface.
$def
Definition: croninfo.php:21
global $ilCtrl
Definition: ilias.php:18

References $def, $form, $ilCtrl, $ilUser, ilMapUtil\getDefaultSettings(), ilMapUtil\isActivated(), and setSubTabs().

+ Here is the call graph for this function:

◆ editObject()

ilObjGroupGUI::editObject ( ilPropertyFormGUI  $a_form = null)

Edit object.

@access public

Parameters
ilPropertyFormGUI
Returns

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

462 {
463 $this->checkPermission("write");
464
465 $this->setSubTabs('settings');
466 $this->tabs_gui->setTabActive('settings');
467 $this->tabs_gui->setSubTabActive('grp_settings');
468
469 if (!$a_form) {
470 $a_form = $this->initForm('edit');
471 }
472
473 $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
474 }
initForm($a_mode='edit', $a_omit_form_action=false)
init create/edit form

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

execute command note: this method is overwritten in all container objects

Reimplemented from ilContainerGUI.

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

48 {
49 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilToolbar;
50
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd();
53 $this->prepareOutput();
54 // show repository tree
55 $this->showRepTree();
56
57 // add entry to navigation history
58 if (!$this->getCreationMode() &&
59 $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
60 include_once("./Services/Link/classes/class.ilLink.php");
61 $ilNavigationHistory->addItem(
62 $_GET["ref_id"],
63 ilLink::_getLink($_GET["ref_id"], "grp"),
64 "grp"
65 );
66 }
67
68 // if news timeline is landing page, redirect if necessary
69 if ($next_class == "" && $cmd == "" && $this->object->isNewsTimelineLandingPageEffective()
70 && $ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
71 $this->ctrl->redirectbyclass("ilnewstimelinegui");
72 }
73
74 switch ($next_class) {
75 case 'illtiproviderobjectsettinggui':
76 $this->setSubTabs('properties');
77 $this->tabs_gui->activateTab('settings');
78 $this->tabs_gui->activateSubTab('lti_provider');
79 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
80 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
81 $lti_gui->offerLTIRolesForSelection(false);
82 $this->ctrl->forwardCommand($lti_gui);
83 break;
84
85
86 case 'ilgroupmembershipgui':
87
88 $this->tabs_gui->activateTab('members');
89
90 include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
91 $mem_gui = new ilGroupMembershipGUI($this, $this->object);
92 $this->ctrl->forwardCommand($mem_gui);
93 break;
94
95
96 case 'ilgroupregistrationgui':
97 $this->ctrl->setReturn($this, '');
98 $this->tabs_gui->setTabActive('join');
99 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
100 $registration = new ilGroupRegistrationGUI($this->object);
101 $this->ctrl->forwardCommand($registration);
102 break;
103
104 case 'ilpermissiongui':
105 $this->tabs_gui->setTabActive('perm_settings');
106 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
107 $perm_gui = new ilPermissionGUI($this);
108 $ret =&$this->ctrl->forwardCommand($perm_gui);
109 break;
110
111 case "ilinfoscreengui":
112 $ret =&$this->infoScreen();
113 break;
114
115 case "illearningprogressgui":
116 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
117
118 $new_gui = new ilLearningProgressGUI(
120 $this->object->getRefId(),
121 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId()
122 );
123 $this->ctrl->forwardCommand($new_gui);
124 $this->tabs_gui->setTabActive('learning_progress');
125 break;
126
127 case 'ilobjcoursegroupinggui':
128 $this->setSubTabs('settings');
129
130 include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
131 $this->ctrl->setReturn($this, 'edit');
132 $crs_grp_gui = new ilObjCourseGroupingGUI($this->object, (int) $_GET['obj_id']);
133 $this->ctrl->forwardCommand($crs_grp_gui);
134
135 $this->tabs_gui->setTabActive('settings');
136 $this->tabs_gui->setSubTabActive('groupings');
137 break;
138
139 case 'ilcoursecontentgui':
140
141 include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
142 $course_content_obj = new ilCourseContentGUI($this);
143 $this->ctrl->forwardCommand($course_content_obj);
144 break;
145
146 case 'ilpublicuserprofilegui':
147 require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
148 $this->setSubTabs('members');
149 $this->tabs_gui->setTabActive('group_members');
150 $this->tabs_gui->setSubTabActive('grp_members_gallery');
151 $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
152 if ($_GET["back_url"] == "") {
153 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilGroupMembershipGUI", "ilUsersGalleryGUI"], 'view'));
154 }
155 $html = $this->ctrl->forwardCommand($profile_gui);
156 $this->tpl->setVariable("ADM_CONTENT", $html);
157 break;
158
159 case "ilcolumngui":
160 $this->tabs_gui->setTabActive('none');
161 $this->checkPermission("read");
162 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
163 $this->tpl->setVariable(
164 "LOCATION_CONTENT_STYLESHEET",
165 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
166 );
167 $this->renderObject();
168 break;
169
170 // container page editing
171 case "ilcontainerpagegui":
172 $ret = $this->forwardToPageObject();
173 if ($ret != "") {
174 $this->tpl->setContent($ret);
175 }
176 break;
177
178 case 'ilobjectcopygui':
179 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
180 $cp = new ilObjectCopyGUI($this);
181 $cp->setType('grp');
182 $this->ctrl->forwardCommand($cp);
183 break;
184
185 case "ilobjstylesheetgui":
186 $this->forwardToStyleSheet();
187 break;
188
189 case 'ilobjectcustomuserfieldsgui':
190 include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
191 $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
192 $this->setSubTabs('settings');
193 $this->tabs_gui->setTabActive('settings');
194 $this->ctrl->forwardCommand($cdf_gui);
195 break;
196
197 case 'ilmemberagreementgui':
198 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
199 $this->ctrl->setReturn($this, '');
200 $this->tabs_gui->setTabActive('view_content');
201 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
202 $this->ctrl->forwardCommand($agreement);
203 break;
204
205 case 'ilexportgui':
206 $this->tabs_gui->setTabActive('export');
207 include_once './Services/Export/classes/class.ilExportGUI.php';
208 $exp = new ilExportGUI($this);
209 $exp->addFormat('xml');
210 $this->ctrl->forwardCommand($exp);
211 break;
212
213 case "ilcommonactiondispatchergui":
214 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
216 $this->ctrl->forwardCommand($gui);
217 break;
218
219 case 'ilobjectservicesettingsgui':
220 $this->ctrl->setReturn($this, 'edit');
221 $this->setSubTabs("settings");
222 $this->tabs_gui->activateTab('settings');
223 $this->tabs_gui->activateSubTab('tool_settings');
224
225 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
227 $this,
228 $this->object->getId(),
229 array(
231 )
232 );
233 $this->ctrl->forwardCommand($service);
234 break;
235
236 case 'ilmailmembersearchgui':
237 include_once 'Services/Mail/classes/class.ilMail.php';
238 $mail = new ilMail($ilUser->getId());
239
240 if (!($ilAccess->checkAccess('manage_members', '', $this->object->getRefId()) ||
241 $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) &&
242 $rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
243 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
244 }
245
246 $this->tabs_gui->setTabActive('members');
247
248 include_once './Services/Contact/classes/class.ilMailMemberSearchGUI.php';
249 include_once './Services/Contact/classes/class.ilMailMemberGroupRoles.php';
250
251 $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberGroupRoles());
252 $mail_search->setObjParticipants(ilCourseParticipants::_getInstanceByObjId($this->object->getId()));
253 $this->ctrl->forwardCommand($mail_search);
254 break;
255
256 case 'ilbadgemanagementgui':
257 $this->tabs_gui->setTabActive('obj_tool_setting_badges');
258 include_once 'Services/Badge/classes/class.ilBadgeManagementGUI.php';
259 $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'grp');
260 $this->ctrl->forwardCommand($bgui);
261 break;
262
263 case "ilcontainernewssettingsgui":
264 $this->setSubTabs("settings");
265 $this->tabs_gui->setTabActive('settings');
266 include_once("./Services/Container/classes/class.ilContainerNewsSettingsGUI.php");
267 $news_set_gui = new ilContainerNewsSettingsGUI($this);
268 $this->ctrl->forwardCommand($news_set_gui);
269 break;
270
271 case "ilnewstimelinegui":
272 $this->checkPermission("read");
273 $this->tabs_gui->setTabActive('news_timeline');
274 include_once("./Services/News/classes/class.ilNewsTimelineGUI.php");
275 $t = ilNewsTimelineGUI::getInstance($this->object->getRefId(), $this->object->getNewsTimelineAutoENtries());
276 $t->setUserEditAll($ilAccess->checkAccess('write', '', $this->object->getRefId(), 'grp'));
277 $this->showPermanentLink($tpl);
278 $this->ctrl->forwardCommand($t);
279 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
281 $ilUser->getId(),
282 $this->object->getId(),
283 $this->object->getRefId(),
284 'grp'
285 );
286 break;
287
288 case "ilcontainerskillgui":
289 $this->tabs_gui->activateTab('obj_tool_setting_skills');
290 include_once("./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
291 $gui = new ilContainerSkillGUI($this);
292 $this->ctrl->forwardCommand($gui);
293 break;
294
295 case 'ilcalendarpresentationgui':
296 include_once('./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
297 $cal = new ilCalendarPresentationGUI($this->object->getRefId());
298 $ret = $this->ctrl->forwardCommand($cal);
299 break;
300
301 default:
302
303 // check visible permission
304 if (!$this->getCreationMode() and
305 !$ilAccess->checkAccess('visible', '', $this->object->getRefId(), 'grp') and
306 !$ilAccess->checkAccess('read', '', $this->object->getRefId(), 'grp')) {
307 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
308 }
309
310 // #9401 - see also ilStartupGUI::_checkGoto()
311 if ($cmd == 'infoScreenGoto') {
312 if ($this->object->isRegistrationEnabled()) {
313 $cmd = 'join';
314 } else {
315 $cmd = 'infoScreen';
316 }
317 }
318
319 // check read permission
320 if ((!$this->getCreationMode()
321 && !$rbacsystem->checkAccess('read', $this->object->getRefId()) && $cmd != 'infoScreen')
322 || $cmd == 'join') {
323 // no join permission -> redirect to info screen
324 if (!$rbacsystem->checkAccess('join', $this->object->getRefId())) {
325 $this->ctrl->redirect($this, "infoScreen");
326 } else { // no read -> show registration
327 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
328 $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
329 }
330 }
331 if (!$cmd) {
332 $cmd = 'view';
333 }
334 $cmd .= 'Object';
335 $this->$cmd();
336 break;
337 }
338
339 $this->addHeaderAction();
340 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
showPermanentLink(&$tpl)
show permanent link
forwardToStyleSheet()
Forward to style object.
Skills for container (course/group) (top gui class)
Class ilCourseContentGUI.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Export User Interface Class.
GUI class for membership features.
GUI class for group registrations.
GUI class for LTI provider object settings.
Class ilObjUserTrackingGUI.
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
Class ilMailMemberCourseRoles.
Class ilMailMemberSearchGUI.
This class handles base functions for mail handling.
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
Class ilObjCourseGroupingGUI.
prepareOutput($a_show_subobjects=true)
Handle member view.
renderObject()
Render group.
infoScreen()
show information screen
getLocalRoles()
returns all local roles [role_id] => title
const MAIL_ALLOWED_ALL
static getContentStylePath($a_style_id, $add_random=true)
get content style path
GUI class for the workflow of copying objects.
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
GUI class for service settings (calendar, notes, comments)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for public user profile presentation.
$html
Definition: example_001.php:87
$service
Definition: login.php:15
$ret
Definition: parser.php:6

References $_GET, $GLOBALS, $html, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacsystem, $ret, $service, $t, ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilLearningProgress\_tracProgress(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, prepareOutput(), renderObject(), setSubTabs(), ilContainerGUI\showPermanentLink(), and ilContainerGUI\showRepTree().

+ Here is the call graph for this function:

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

returns all local roles [role_id] => title

Returns
array

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

1970 {
1971 $local_roles = $this->object->getLocalGroupRoles(false);
1972 $grp_member = $this->object->getDefaultMemberRole();
1973 $grp_roles = array();
1974
1975 //put the group member role to the top of the crs_roles array
1976 if (in_array($grp_member, $local_roles)) {
1977 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
1978 unset($local_roles[$grp_roles[$grp_member]]);
1979 }
1980
1981 foreach ($local_roles as $title => $role_id) {
1982 $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
1983 }
1984 return $grp_roles;
1985 }
static _getTranslation($a_role_title)

References $title, and ilObjRole\_getTranslation().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )

common tabs for all container objects (should be called at the end of child getTabs() method

Reimplemented from ilContainerGUI.

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

1024 {
1025 global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
1026
1027 $ilHelp->setScreenIdComponent("grp");
1028
1029 if ($ilAccess->checkAccess('read', '', $this->ref_id)) {
1030 if ($this->object->isNewsTimelineEffective()) {
1031 if (!$this->object->isNewsTimelineLandingPageEffective()) {
1032 $this->addContentTab();
1033 }
1034 $this->tabs_gui->addTab(
1035 "news_timeline",
1036 $lng->txt("cont_news_timeline_tab"),
1037 $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show")
1038 );
1039 if ($this->object->isNewsTimelineLandingPageEffective()) {
1040 $this->addContentTab();
1041 }
1042 } else {
1043 $this->addContentTab();
1044 }
1045 }
1046 if (
1047 $ilAccess->checkAccess('visible', '', $this->ref_id) ||
1048 $ilAccess->checkAccess('join', '', $this->ref_id) ||
1049 $ilAccess->checkAccess('read', '', $this->ref_id)
1050 ) {
1051 $this->tabs_gui->addTarget(
1052 "info_short",
1053 $this->ctrl->getLinkTargetByClass(
1054 array("ilobjgroupgui", "ilinfoscreengui"),
1055 "showSummary"
1056 ),
1057 "infoScreen",
1058 "",
1059 "",
1060 false
1061 );
1062 }
1063
1064
1065 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1066 $this->tabs_gui->addTarget(
1067 "settings",
1068 $this->ctrl->getLinkTarget($this, "edit"),
1069 array("edit", "editMapSettings"),
1070 get_class($this),
1071 ""
1072 );
1073 }
1074
1075 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
1076 $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
1077
1078 // Members
1079 include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
1080 $membership_gui = new ilGroupMembershipGUI($this, $this->object);
1081 $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1082
1083
1084 // badges
1085 if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1086 include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
1087 if (ilBadgeHandler::getInstance()->isObjectActive($this->object->getId())) {
1088 $this->tabs_gui->addTarget(
1089 "obj_tool_setting_badges",
1090 $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1091 "",
1092 "ilbadgemanagementgui"
1093 );
1094 }
1095 }
1096
1097 // skills
1098 include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1099 if ($ilAccess->checkAccess('read', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
1100 $this->object->getId(),
1102 false
1103 )) {
1104 $this->tabs_gui->addTarget(
1105 "obj_tool_setting_skills",
1106 $this->ctrl->getLinkTargetByClass(array("ilcontainerskillgui", "ilcontskillpresentationgui"), ""),
1107 "",
1108 array("ilcontainerskillgui", "ilcontskillpresentationgui", "ilcontskilladmingui")
1109 );
1110 }
1111
1112 // learning progress
1113 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1114 if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
1115 $this->tabs_gui->addTarget(
1116 'learning_progress',
1117 $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'), ''),
1118 '',
1119 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui')
1120 );
1121 }
1122
1123
1124 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1125 $this->tabs_gui->addTarget(
1126 'export',
1127 $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
1128 'export',
1129 'ilexportgui'
1130 );
1131 }
1132
1133 // parent tabs (all container: edit_permission, clipboard, trash
1134 parent::getTabs();
1135
1136 if ($ilAccess->checkAccess('join', '', $this->object->getRefId()) and
1137 !$this->object->members_obj->isAssigned($ilUser->getId())) {
1138 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
1139 if (ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
1140 $this->tabs_gui->addTab(
1141 'leave',
1142 $this->lng->txt('membership_leave'),
1143 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', 'show', '')
1144 );
1145 } else {
1146 $this->tabs_gui->addTarget(
1147 "join",
1148 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1149 'show',
1150 ""
1151 );
1152 }
1153 }
1154 if ($ilAccess->checkAccess('leave', '', $this->object->getRefId()) and
1155 $this->object->members_obj->isMember($ilUser->getId())) {
1156 $this->tabs_gui->addTarget(
1157 "grp_btn_unsubscribe",
1158 $this->ctrl->getLinkTarget($this, "leave"),
1159 '',
1160 ""
1161 );
1162 }
1163 }
static getInstance()
Constructor.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
addContentTab()
Add content tab.
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.

References $ilUser, ilObjectGUI\$lng, ilContainerGUI\$rbacsystem, ilWaitingList\_isOnList(), ilGroupParticipants\_isParticipant(), ilContainer\_lookupContainerSetting(), addContentTab(), ilLearningProgressAccess\checkAccess(), ilBadgeHandler\getInstance(), and ilObjectServiceSettingsGUI\SKILLS.

+ Here is the call graph for this function:

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

show information screen

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

1181 {
1183
1184 $this->tabs_gui->setTabActive('info_short');
1185
1186 if (!$this->checkPermissionBool('read')) {
1187 $this->checkPermission('visible');
1188 }
1189
1190 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1191 $info = new ilInfoScreenGUI($this);
1192
1193 if (strlen($this->object->getInformation())) {
1194 $info->addSection($this->lng->txt('grp_general_informations'));
1195 $info->addProperty($this->lng->txt('grp_information'), nl2br(
1196 ilUtil::makeClickable($this->object->getInformation(), true)
1197 ));
1198 }
1199
1200 $info->enablePrivateNotes();
1201 $info->enableLearningProgress(true);
1202
1203 $info->addSection($this->lng->txt('group_registration'));
1204 $info->showLDAPRoleGroupMappingInfo();
1205
1206 if (!$this->object->isRegistrationEnabled()) {
1207 $info->addProperty(
1208 $this->lng->txt('group_registration_mode'),
1209 $this->lng->txt('grp_reg_deac_info_screen')
1210 );
1211 } else {
1212 switch ($this->object->getRegistrationType()) {
1214 $info->addProperty(
1215 $this->lng->txt('group_registration_mode'),
1216 $this->lng->txt('grp_reg_direct_info_screen')
1217 );
1218 break;
1219
1221 $info->addProperty(
1222 $this->lng->txt('group_registration_mode'),
1223 $this->lng->txt('grp_reg_req_info_screen')
1224 );
1225 break;
1226
1228 $info->addProperty(
1229 $this->lng->txt('group_registration_mode'),
1230 $this->lng->txt('grp_reg_passwd_info_screen')
1231 );
1232 break;
1233
1234 }
1235 /*
1236 $info->addProperty($this->lng->txt('group_registration_time'),
1237 ilDatePresentation::formatPeriod(
1238 $this->object->getRegistrationStart(),
1239 $this->object->getRegistrationEnd()));
1240 */
1241 if ($this->object->isRegistrationUnlimited()) {
1242 $info->addProperty(
1243 $this->lng->txt('group_registration_time'),
1244 $this->lng->txt('grp_registration_unlimited')
1245 );
1246 } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
1247 $info->addProperty(
1248 $this->lng->txt("group_registration_time"),
1249 $this->lng->txt('cal_until') . ' ' .
1250 ilDatePresentation::formatDate($this->object->getRegistrationEnd())
1251 );
1252 } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
1253 $info->addProperty(
1254 $this->lng->txt("group_registration_time"),
1255 $this->lng->txt('cal_from') . ' ' .
1256 ilDatePresentation::formatDate($this->object->getRegistrationStart())
1257 );
1258 }
1259 if ($this->object->isMembershipLimited()) {
1260 if ($this->object->getMinMembers()) {
1261 $info->addProperty(
1262 $this->lng->txt("mem_min_users"),
1263 $this->object->getMinMembers()
1264 );
1265 }
1266 if ($this->object->getMaxMembers()) {
1267 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1268 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1269
1270 $info->addProperty(
1271 $this->lng->txt('mem_free_places'),
1272 $reg_info['reg_info_free_places']
1273 );
1274 }
1275 }
1276
1277 if ($this->object->getCancellationEnd()) {
1278 $info->addProperty(
1279 $this->lng->txt('grp_cancellation_end'),
1280 ilDatePresentation::formatDate($this->object->getCancellationEnd())
1281 );
1282 }
1283 }
1284
1285 if ($this->object->getStart()) {
1286 $info->addProperty(
1287 $this->lng->txt('grp_period'),
1289 $this->object->getStart(),
1290 $this->object->getEnd()
1291 )
1292 );
1293 }
1294
1295
1296 // Confirmation
1297 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1299
1300 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1301 if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
1302 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
1303
1304 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1305
1306 $this->lng->loadLanguageModule('ps');
1307 $info->addSection($this->lng->txt('grp_user_agreement_info'));
1308 $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
1309
1310 if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
1311 $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
1312 }
1313 }
1314
1315
1316 // forward the command
1317 $this->ctrl->forwardCommand($info);
1318 }
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_REQUEST
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _fieldsToInfoString($a_obj_id)
Fields to info string.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static _getInstanceByType($a_type)
Get Singleton Instance.
Class ilInfoScreenGUI.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
$info
Definition: index.php:5

References $ilSetting, $ilUser, $info, ilContainerGUI\$rbacsystem, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilCourseDefinedFieldDefinition\_getFields(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjGroupAccess\lookupRegistrationInfo(), and ilUtil\makeClickable().

Referenced by executeCommand(), and infoScreenObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

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

1171 {
1172 $this->ctrl->setCmd("showSummary");
1173 $this->ctrl->setCmdClass("ilinfoscreengui");
1174 $this->infoScreen();
1175 }

References infoScreen().

+ Here is the call graph for this function:

◆ initForm()

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

init create/edit form

@access protected

Parameters
stringedit or create
Returns

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

1404 {
1405 global $ilUser,$tpl,$tree;
1406
1407 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1408
1409 $form = new ilPropertyFormGUI();
1410
1411 if (!$a_omit_form_action) {
1412 switch ($a_mode) {
1413 case 'edit':
1414 $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1415 break;
1416
1417 default:
1418 $form->setTableWidth('600px');
1419 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
1420 break;
1421 }
1422 }
1423
1424 // title
1425 $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
1426 $title->setSubmitFormOnEnter(true);
1427 if ($a_mode == "edit") {
1428 $title->setValue($this->object->getTitle());
1429 }
1430 $title->setSize(min(40, ilObject::TITLE_LENGTH));
1431 $title->setMaxLength(ilObject::TITLE_LENGTH);
1432 $title->setRequired(true);
1433 $form->addItem($title);
1434
1435 // desc
1436 $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
1437 if ($a_mode == "edit") {
1438 $desc->setValue($this->object->getLongDescription());
1439 }
1440 $desc->setRows(2);
1441 $desc->setCols(40);
1442 $form->addItem($desc);
1443
1445
1446 if ($a_mode == 'edit') {
1447 // group period
1448 include_once 'Services/Form/classes/class.ilDateDurationInputGUI.php';
1449 $group_duration = new ilDateDurationInputGUI($this->lng->txt('grp_period'), 'period');
1450 $group_duration->setInfo($this->lng->txt('grp_period_info'));
1451 if ($this->object->getStart()) {
1452 $group_duration->setStart($this->object->getStart());
1453 }
1454 if ($this->object->getEnd()) {
1455 $group_duration->setEnd($this->object->getEnd());
1456 }
1457 $form->addItem($group_duration);
1458
1459 // Group registration ############################################################
1460 $pres = new ilFormSectionHeaderGUI();
1461 $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1462 $form->addItem($pres);
1463
1464 // Registration type
1465 $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
1466 $reg_type->setValue($this->object->getRegistrationType());
1467
1468 $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
1469 $reg_type->addOption($opt_dir);
1470
1471 $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
1472 $pass = new ilTextInputGUI($this->lng->txt("password"), 'password');
1473 $pass->setRequired(true);
1474 $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1475 $pass->setValue($this->object->getPassword());
1476 $pass->setSize(32);
1477 $pass->setMaxLength(32);
1478 $opt_pass->addSubItem($pass);
1479 $reg_type->addOption($opt_pass);
1480
1481 $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
1482 $reg_type->addOption($opt_req);
1483
1484 $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
1485 $reg_type->addOption($opt_deact);
1486
1487 // Registration codes
1488 $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
1489 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1490 $reg_code->setValue(1);
1491 $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1492 $form->addItem($reg_type);
1493
1494 // Registration codes
1495 if (!$this->object->getRegistrationAccessCode()) {
1496 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1497 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1498 }
1499 $reg_link = new ilHiddenInputGUI('reg_code');
1500 $reg_link->setValue($this->object->getRegistrationAccessCode());
1501 $form->addItem($reg_link);
1502
1503 $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1504 include_once './Services/Link/classes/class.ilLink.php';
1505 $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
1506 $link->setHTML('<font class="small">' . $val . '</font>');
1507 $reg_code->addSubItem($link);
1508 $form->addItem($reg_code);
1509
1510 // time limit
1511 $this->lng->loadLanguageModule('dateplaner');
1512 include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
1513 $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'), 'reg');
1514 $dur->setShowTime(true);
1515 $dur->setStart($this->object->getRegistrationStart());
1516 $dur->setEnd($this->object->getRegistrationEnd());
1517 $form->addItem($dur);
1518
1519 // cancellation limit
1520 $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1521 $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1522 $cancel->setDate($this->object->getCancellationEnd());
1523 $form->addItem($cancel);
1524
1525 // max member
1526 $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'), 'registration_membership_limited');
1527 $lim->setValue(1);
1528 // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1529 $lim->setChecked($this->object->isMembershipLimited());
1530
1531 $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'), 'registration_min_members');
1532 $min->setSize(3);
1533 $min->setMaxLength(4);
1534 $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
1535 $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1536 $lim->addSubItem($min);
1537
1538 $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'), 'registration_max_members');
1539 $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
1540 //$max->setTitle($this->lng->txt('members'));
1541 $max->setSize(3);
1542 $max->setMaxLength(4);
1543 $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1544 $lim->addSubItem($max);
1545
1546 /*
1547 $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1548 $wait->setValue(1);
1549 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1550 $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1551 $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1552 $lim->addSubItem($wait);
1553 $form->addItem($lim);
1554 */
1555
1556 $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1557
1558 $option = new ilRadioOption($this->lng->txt('none'), 0);
1559 $wait->addOption($option);
1560
1561 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
1562 $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1563 $wait->addOption($option);
1564
1565 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
1566 $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1567 $wait->addOption($option);
1568
1569 if ($this->object->hasWaitingListAutoFill()) {
1570 $wait->setValue(2);
1571 } elseif ($this->object->isWaitingListEnabled()) {
1572 $wait->setValue(1);
1573 }
1574
1575 $lim->addSubItem($wait);
1576
1577 $form->addItem($lim);
1578
1579
1580 // Group presentation
1581 $hasParentMembership =
1582 (
1583 $tree->checkForParentType($this->object->getRefId(), 'crs', true) ||
1584 $tree->checkForParentType($this->object->getRefId(), 'grp', true)
1585 );
1586
1587 $pres = new ilFormSectionHeaderGUI();
1588 $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1589 $form->addItem($pres);
1590
1591 // presentation type
1592 $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'), 'view_mode');
1593 if ($hasParentMembership) {
1594 switch ($this->object->getViewMode()) {
1596 $course_view_mode = ': ' . $this->lng->txt('cntr_view_sessions');
1597 break;
1598
1600 $course_view_mode = ': ' . $this->lng->txt('cntr_view_simple');
1601 break;
1602
1604 $course_view_mode = ': ' . $this->lng->txt('cntr_view_by_type');
1605 break;
1606 }
1607
1608 $opt = new ilRadioOption($this->lng->txt('grp_view_inherit') . $course_view_mode, ilContainer::VIEW_INHERIT);
1609 $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1610 $view_type->addOption($opt);
1611 }
1612
1613 if ($hasParentMembership &&
1614 $this->object->getViewMode() == ilContainer::VIEW_INHERIT) {
1615 $view_type->setValue(ilContainer::VIEW_INHERIT);
1616 } else {
1617 $view_type->setValue(
1619 $this->object->getId(),
1620 $this->object->getViewMode(),
1621 $this->object->getRefId()
1622 )
1623 );
1624 }
1625
1626 $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'), ilContainer::VIEW_SIMPLE);
1627 $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1628 $view_type->addOption($opt);
1629
1630 $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
1631 $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1632 $view_type->addOption($opt);
1633 $form->addItem($view_type);
1634
1635
1636 // Sorting
1637 $sorting_settings = array();
1638 if ($hasParentMembership) {
1639 $sorting_settings[] = ilContainer::SORT_INHERIT;
1640 }
1641 $sorting_settings[] = ilContainer::SORT_TITLE;
1642 $sorting_settings[] = ilContainer::SORT_CREATION;
1643 $sorting_settings[] = ilContainer::SORT_MANUAL;
1644 $this->initSortingForm($form, $sorting_settings);
1645
1646 // additional features
1647 $feat = new ilFormSectionHeaderGUI();
1648 $feat->setTitle($this->lng->txt('obj_features'));
1649 $form->addItem($feat);
1650
1651 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1653 $this->object->getId(),
1654 $form,
1655 array(
1663 )
1664 );
1665
1666 // Notification Settings
1667 /*$notification = new ilFormSectionHeaderGUI();
1668 $notification->setTitle($this->lng->txt('grp_notification'));
1669 $form->addItem($notification);*/
1670
1671 $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'), 'show_members');
1672 $mem->setChecked($this->object->getShowMembers());
1673 $mem->setInfo($this->lng->txt('grp_show_members_info'));
1674 $form->addItem($mem);
1675
1676 // Show members type
1677 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1678 $mail_type->setValue($this->object->getMailToMembersType());
1679
1680 $mail_tutors = new ilRadioOption(
1681 $this->lng->txt('grp_mail_tutors_only'),
1683 $this->lng->txt('grp_mail_tutors_only_info')
1684 );
1685 $mail_type->addOption($mail_tutors);
1686
1687 $mail_all = new ilRadioOption(
1688 $this->lng->txt('grp_mail_all'),
1690 $this->lng->txt('grp_mail_all_info')
1691 );
1692 $mail_type->addOption($mail_all);
1693 $form->addItem($mail_type);
1694 }
1695
1696 switch ($a_mode) {
1697 case 'create':
1698 $form->setTitle($this->lng->txt('grp_new'));
1699 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1700
1701 $form->addCommandButton('save', $this->lng->txt('grp_new'));
1702 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1703 break;
1704
1705 case 'edit':
1706 $form->setTitle($this->lng->txt('grp_edit'));
1707 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1708
1709 // Edit ecs export settings
1710 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
1711 $ecs = new ilECSGroupSettings($this->object);
1712 $ecs->addSettingsToForm($form, 'grp');
1713
1714 $form->addCommandButton('update', $this->lng->txt('save'));
1715 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1716 break;
1717 }
1718 return $form;
1719 }
const GRP_REGISTRATION_DEACTIVATED
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
This class represents a custom property in a property form.
input GUI for a time span (start and end date)
This class represents a date/time property in a property form.
Class ilECSGroupSettings.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
static generateCode()
Generate new registration key.
const MAIL_ALLOWED_TUTORS
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const TITLE_LENGTH
max length of object title
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $form, $ilUser, $pass, $title, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilLink\_getLink(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjGroup\MAIL_ALLOWED_ALL, ilObjGroup\MAIL_ALLOWED_TUTORS, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjectServiceSettingsGUI\SKILLS, ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAG_CLOUD, ilObject\TITLE_LENGTH, ilObjGroup\translateViewMode(), ilObjectServiceSettingsGUI\USE_NEWS, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by editObject(), and updateObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGroupIconsForm()

ilObjGroupGUI::initGroupIconsForm ( )

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

678 {
679 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
680 $form = new ilPropertyFormGUI();
681 $form->setFormAction($this->ctrl->getFormAction($this));
682
683 $this->showCustomIconsEditing(1, $form);
684
685 // $form->setTitle($this->lng->txt('edit_grouping'));
686 $form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
687
688 return $form;
689 }
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container

References $form, and ilContainerGUI\showCustomIconsEditing().

Referenced by editGroupIconsObject(), and updateGroupIconsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

ilObjGroupGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

Reimplemented from ilContainerGUI.

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

1890 {
1891 global $ilSetting, $ilUser;
1892
1893 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
1894
1895 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1896 if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1897 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1899 $noti = new ilMembershipNotifications($this->ref_id);
1900 if (!$noti->isCurrentUserActive()) {
1901 $lg->addHeaderIcon(
1902 "not_icon",
1903 ilUtil::getImagePath("notification_off.svg"),
1904 $this->lng->txt("grp_notification_deactivated")
1905 );
1906
1907 $this->ctrl->setParameter($this, "grp_ntf", 1);
1908 $caption = "grp_activate_notification";
1909 } else {
1910 $lg->addHeaderIcon(
1911 "not_icon",
1912 ilUtil::getImagePath("notification_on.svg"),
1913 $this->lng->txt("grp_notification_activated")
1914 );
1915
1916 $this->ctrl->setParameter($this, "grp_ntf", 0);
1917 $caption = "grp_deactivate_notification";
1918 }
1919
1920 if ($noti->canCurrentUserEdit()) {
1921 $lg->addCustomCommand(
1922 $this->ctrl->getLinkTarget($this, "saveNotification"),
1923 $caption
1924 );
1925 }
1926
1927 $this->ctrl->setParameter($this, "grp_ntf", "");
1928 }
1929 }
1930
1931 return $lg;
1932 }
Membership notification settings.
$lg
Definition: example_018.php:62

References $ilSetting, $ilUser, $lg, ilGroupParticipants\_isParticipant(), ilUtil\getImagePath(), and ilMembershipNotifications\isActive().

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

@access protected

Returns

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

821 {
822 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
823 $form = new ilPropertyFormGUI();
824 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
825 $form->setTitle($this->lng->txt('grp_general_informations'));
826 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
827 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
828
829 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
830 $area->setInfo($this->lng->txt('grp_information_info'));
831 $area->setValue($this->object->getInformation());
832 $area->setRows(8);
833 $area->setCols(80);
834 $form->addItem($area);
835
836 return $form;
837 }

References $form.

Referenced by editInfoObject().

+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

1991 {
1992 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
1993 }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group @access public

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

950 {
951 global $ilUser;
952
953 $this->checkPermission('leave');
954
955 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
956 if ($part->isLastAdmin($ilUser->getId())) {
957 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
958 $this->viewObject();
959 return false;
960 }
961
962 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
963
964 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
965 $cgui = new ilConfirmationGUI();
966 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
967 $cgui->setFormAction($this->ctrl->getFormAction($this));
968 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
969 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
970 $this->tpl->setContent($cgui->getHTML());
971 }
Confirmation screen class.
viewObject()
list childs of current object

References $ilUser, ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), ilUtil\sendFailure(), and viewObject().

+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )
protected

Called from goto?

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

1342 {
1343 $GLOBALS['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1344 }

References $GLOBALS.

◆ modifyItemGUI()

ilObjGroupGUI::modifyItemGUI (   $a_item_list_gui,
  $a_item_data,
  $a_show_path 
)

Modify Item ListGUI for presentation in container @global type $tree.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

Reimplemented from ilContainerGUI.

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

393 {
394 global $tree;
395
396 // if folder is in a course, modify item list gui according to course requirements
397 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs')) {
398 include_once("./Modules/Course/classes/class.ilObjCourse.php");
399 include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
400 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
402 $a_item_list_gui,
403 'ilcoursecontentgui',
404 $a_item_data,
405 $a_show_path,
406 ilObjCourse::_lookupAboStatus($course_obj_id),
407 $course_ref_id,
408 $course_obj_id,
409 $this->object->getRefId()
410 );
411 }
412 }
static _modifyItemGUI( $a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
static _lookupAboStatus($a_id)

References ilObjectGUI\$tree, ilObjCourse\_lookupAboStatus(), ilObject\_lookupObjId(), and ilObjCourseGUI\_modifyItemGUI().

+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput (   $a_show_subobjects = true)

Handle member view.

Returns

Reimplemented from ilContainerGUI.

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

1859 {
1860 global $rbacsystem;
1861 if (!$this->getCreationMode()) {
1862 /*
1863 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1864 $settings = ilMemberViewSettings::getInstance();
1865 if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
1866 {
1867 $settings->setContainer($this->object->getRefId());
1868 $rbacsystem->initMemberView();
1869 }
1870 */
1871 }
1872 parent::prepareOutput($a_show_subobjects);
1873 }

References ilContainerGUI\$rbacsystem, and ilObjectGUI\getCreationMode().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readMemberData()

ilObjGroupGUI::readMemberData (   $ids,
  $selected_columns = null 
)

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

859 {
860 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
862
863 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
864 $this->show_tracking =
865 (
867 ilObjUserTracking::_enabledUserRelatedData()
868 );
869 if ($this->show_tracking) {
870 include_once('./Services/Object/classes/class.ilObjectLP.php');
871 $olp = ilObjectLP::getInstance($this->object->getId());
872 $this->show_tracking = $olp->isActive();
873 }
874
875 if ($this->show_tracking) {
876 include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
877 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
878 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
879 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
880 }
881
882 if ($privacy->enabledGroupAccessTimes()) {
883 include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
884 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
885 }
886
887 $do_prtf = (is_array($selected_columns) &&
888 in_array('prtf', $selected_columns) &&
889 is_array($ids));
890 if ($do_prtf) {
891 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
893 $ids,
894 $this->ctrl->getLinkTarget($this, "members")
895 );
896 }
897
898 $profile_data = ilObjUser::_readUsersProfileData($ids);
899 foreach ($ids as $usr_id) {
900 $name = ilObjUser::_lookupName($usr_id);
901 $tmp_data['firstname'] = $name['firstname'];
902 $tmp_data['lastname'] = $name['lastname'];
903 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
904 $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
905 $tmp_data['usr_id'] = $usr_id;
906 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
907
908 foreach ((array) $profile_data[$usr_id] as $field => $value) {
909 $tmp_data[$field] = $value;
910 }
911
912 if ($this->show_tracking) {
913 if (in_array($usr_id, $completed)) {
914 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
915 } elseif (in_array($usr_id, $in_progress)) {
916 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
917 } elseif (in_array($usr_id, $failed)) {
918 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
919 } else {
920 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
921 }
922 }
923
924 if ($privacy->enabledGroupAccessTimes()) {
925 if (isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts']) {
926 $tmp_data['access_time'] = ilDatePresentation::formatDate(
927 $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
928 );
929 $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
930 } else {
931 $tmp_data['access_time'] = $this->lng->txt('no_date');
932 $tmp_data['access_time_unix'] = 0;
933 }
934 }
935
936 if ($do_prtf) {
937 $tmp_data['prtf'] = $all_prtf[$usr_id];
938 }
939
940 $members[$usr_id] = $tmp_data;
941 }
942 return $members ? $members : array();
943 }
$failed
Definition: Utf8Test.php:85
PHPExcel root directory.
Definition: PHPExcel.php:30
const IL_CAL_UNIX
@classDescription Date and time handling
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
static getInstance($a_obj_id)
if($format !==null) $name
Definition: metadata.php:146

References $failed, $name, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilPrivacySettings\_getInstance(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilLearningProgress\_lookupProgressByObjId(), ilObjUser\_readUsersProfileData(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjectLP\getInstance(), IL_CAL_UNIX, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED.

+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

Render group.

Reimplemented from ilContainerGUI.

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

377 {
378 global $ilTabs;
379
380 $ilTabs->activateTab("view_content");
381 $ret = parent::renderObject();
382 return $ret;
383 }

References $ret.

Referenced by executeCommand(), and viewObject().

+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

781 {
782 global $ilCtrl, $ilUser;
783
784 $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
785 $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
786 $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
787 $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
788 $this->object->update();
789
790 $ilCtrl->redirect($this, "editMapSettings");
791 }
$_POST["username"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $ilCtrl, $ilUser, and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

1324 {
1325 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1326 $noti = new ilMembershipNotifications($this->ref_id);
1327 if ($noti->canCurrentUserEdit()) {
1328 if ((bool) $_REQUEST["grp_ntf"]) {
1329 $noti->activateUser();
1330 } else {
1331 $noti->deactivateUser();
1332 }
1333 }
1334 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1335 $this->ctrl->redirect($this, "infoScreen");
1336 }

References ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

Set return point for side column actions.

Reimplemented from ilContainerGUI.

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

1999 {
2000 $this->ctrl->setReturn($this, "view");
2001 }

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

@access protected

Parameters

return

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

1729 {
1730 global $rbacsystem,$ilUser,$ilAccess;
1731
1732 switch ($a_tab) {
1733
1734 case 'settings':
1735 $this->tabs_gui->addSubTabTarget(
1736 "grp_settings",
1737 $this->ctrl->getLinkTarget($this, 'edit'),
1738 "edit",
1739 get_class($this)
1740 );
1741
1742 $this->tabs_gui->addSubTabTarget(
1743 "grp_info_settings",
1744 $this->ctrl->getLinkTarget($this, 'editInfo'),
1745 "editInfo",
1746 get_class($this)
1747 );
1748
1749 // custom icon
1750 if ($this->ilias->getSetting("custom_icons")) {
1751 $this->tabs_gui->addSubTabTarget(
1752 "grp_icon_settings",
1753 $this->ctrl->getLinkTarget($this, 'editGroupIcons'),
1754 "editGroupIcons",
1755 get_class($this)
1756 );
1757 }
1758
1759 include_once("./Services/Maps/classes/class.ilMapUtil.php");
1760 if (ilMapUtil::isActivated()) {
1761 $this->tabs_gui->addSubTabTarget(
1762 "grp_map_settings",
1763 $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1764 "editMapSettings",
1765 get_class($this)
1766 );
1767 }
1768
1769 $this->tabs_gui->addSubTabTarget(
1770 'groupings',
1771 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1772 'listGroupings',
1773 get_class($this)
1774 );
1775
1776 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1777 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1778 // only show if export permission is granted
1779 if (ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1780 $this->tabs_gui->addSubTabTarget(
1781 'grp_custom_user_fields',
1782 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1783 '',
1784 'ilobjectcustomuserfieldsgui'
1785 );
1786 }
1787
1788 // news settings
1789 if ($this->object->getUseNews()) {
1790 $this->tabs_gui->addSubTab(
1791 'obj_news_settings',
1792 $this->lng->txt("cont_news_settings"),
1793 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1794 );
1795 }
1796
1797 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1798 if ($lti_settings->hasSettingsAccess()) {
1799 $this->tabs_gui->addSubTabTarget(
1800 'lti_provider',
1801 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1802 );
1803 }
1804
1805
1806 break;
1807
1808
1809 }
1810 }
redirection script todo: (a better solution should control the processing via a xml file)

References $ilUser, ilContainerGUI\$rbacsystem, ilPrivacySettings\_getInstance(), ilCourseDefinedFieldDefinition\_hasFields(), and ilMapUtil\isActivated().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsubscribeObject()

ilObjGroupGUI::unsubscribeObject ( )

unsubscribe from group

@access public

Returns

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

980 {
981 global $ilUser,$tree, $ilCtrl;
982
983 $this->checkPermission('leave');
984
985 $this->object->members_obj->delete($ilUser->getId());
986
987 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
988 $this->object->members_obj->sendNotification(
990 $ilUser->getId()
991 );
992 $this->object->members_obj->sendNotification(
994 $ilUser->getId()
995 );
996
997 ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'), true);
998 $ilCtrl->setParameterByClass(
999 "ilrepositorygui",
1000 "ref_id",
1001 $tree->getParentId($this->object->getRefId())
1002 );
1003 $ilCtrl->redirectByClass("ilrepositorygui", "");
1004 }

References $ilCtrl, $ilUser, ilObjectGUI\$tree, ilObjectGUI\checkPermission(), ilUtil\sendSuccess(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, and ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER.

+ Here is the call graph for this function:

◆ updateGroupIconsObject()

ilObjGroupGUI::updateGroupIconsObject ( )

update group icons

@access public

Returns

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

698 {
699 global $ilSetting;
700
701 $this->checkPermission('write');
702
703 $form = $this->initGroupIconsForm();
704 if ($form->checkInput()) {
705 //save custom icons
706 if ($ilSetting->get("custom_icons")) {
707 if ($_POST["cont_icon_delete"]) {
708 $this->object->removeCustomIcon();
709 }
710 $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
711 }
712 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
713 $this->ctrl->redirect($this, "editGroupIcons");
714 }
715
716 $form->setValuesByPost();
718 }
editGroupIconsObject($a_form=null)
edit container icons

References $_POST, $form, $ilSetting, ilObjectGUI\checkPermission(), editGroupIconsObject(), initGroupIconsForm(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

@access public

Parameters

return

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

484 {
485 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
487 $this->object->getRefId(),
488 (int) $_REQUEST['grp_type']
489 );
490
491 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
492 $this->ctrl->redirect($this, 'edit');
493 }
static switchTemplate($a_ref_id, $a_new_tpl_id)

References ilUtil\sendSuccess(), and ilDidacticTemplateUtils\switchTemplate().

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

update info

@access public

Returns

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

846 {
847 $this->checkPermission('manage_members');
848
849 $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
850 $this->object->update();
851
852 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
853 $this->editInfoObject();
854 return true;
855 }
editInfoObject()
edit info

References $_POST, ilObjectGUI\checkPermission(), editInfoObject(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ updateObject()

ilObjGroupGUI::updateObject ( )

update group settings

Parameters
boolupdate group type @access public

Reimplemented from ilObjectGUI.

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

502 {
503 global $ilErr;
504
505 $this->checkPermission('write');
506
507 $form = $this->initForm();
508 if ($form->checkInput()) {
509 // handle group type settings
510 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
511 $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
512
513 $modified = false;
514 $new_type_info = $form->getInput('didactic_type');
515 if ($new_type_info) {
516 $new_type = explode('_', $form->getInput('didactic_type'));
517 $new_type = $new_type[1];
518
519 $modified = ($new_type != $old_type);
520 ilLoggerFactory::getLogger('grp')->info('Switched group type from ' . $old_type . ' to ' . $new_type);
521 }
522
523 $old_autofill = $this->object->hasWaitingListAutoFill();
524
525 $this->object->setTitle(ilUtil::stripSlashes($form->getInput('title')));
526 $this->object->setDescription(ilUtil::stripSlashes($form->getInput('desc')));
527 $this->object->setGroupType(ilUtil::stripSlashes($form->getInput('grp_type')));
528 $this->object->setRegistrationType(ilUtil::stripSlashes($form->getInput('registration_type')));
529 $this->object->setPassword(ilUtil::stripSlashes($form->getInput('password')));
530 $this->object->enableUnlimitedRegistration((bool) !$form->getInput('reg_limit_time'));
531 $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
532 $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
533 $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
534 $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
535 $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
536 $this->object->setViewMode($form->getInput('view_mode'));
537 $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
538 $this->object->setShowMembers((int) $form->getInput('show_members'));
539
540 // group period
541 $period = $form->getItemByPostVar('period');
542 $this->object->setStart($period->getStart());
543 $this->object->setEnd($period->getEnd());
544
545 $reg = $form->getItemByPostVar("reg");
546 if ($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime) {
547 $this->object->enableUnlimitedRegistration(false);
548 } else {
549 $this->object->enableUnlimitedRegistration(true);
550 }
551
552 $this->object->setRegistrationStart($reg->getStart());
553 $this->object->setRegistrationEnd($reg->getEnd());
554
555 $cancel_end = $form->getItemByPostVar("cancel_end");
556 $this->object->setCancellationEnd($cancel_end->getDate());
557
558 switch ((int) $_POST['waiting_list']) {
559 case 2:
560 $this->object->enableWaitingList(true);
561 $this->object->setWaitingListAutoFill(true);
562 break;
563
564 case 1:
565 $this->object->enableWaitingList(true);
566 $this->object->setWaitingListAutoFill(false);
567 break;
568
569 default:
570 $this->object->enableWaitingList(false);
571 $this->object->setWaitingListAutoFill(false);
572 break;
573 }
574
575 // update object settings
576 $this->object->update();
577
578
579 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
581 $this->object->getId(),
582 $form,
583 array(
591 )
592 );
593
594 // Save sorting
596 // if autofill has been activated trigger process
597 if (
598 !$old_autofill &&
599 $this->object->hasWaitingListAutoFill()) {
600 $this->object->handleAutoFill();
601 }
602
603 // BEGIN ChangeEvents: Record update Object.
604 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
605 global $ilUser;
607 $this->object->getId(),
608 $ilUser->getId(),
609 'update'
610 );
611 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
612 // END PATCH ChangeEvents: Record update Object.
613 // Update ecs export settings
614 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
615 $ecs = new ilECSGroupSettings($this->object);
616 $ecs->handleSettingsUpdate();
617 } else {
618 ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
619
620 $form->setValuesByPost();
621 $this->editObject($form);
622 return true;
623 }
624
625 // group type modified
626 if ($modified) {
627 if ($new_type == 0) {
628 $new_type_txt = $GLOBALS['lng']->txt('il_grp_status_open');
629 } else {
630 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
631 $dtpl = new ilDidacticTemplateSetting($new_type);
632 $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['lng']->getLangKey());
633 }
634
635
636 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
637 ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
638 $confirm = new ilConfirmationGUI();
639 $confirm->setFormAction($this->ctrl->getFormAction($this));
640 $confirm->addItem(
641 'grp_type',
642 $new_type,
643 $this->lng->txt('grp_info_new_grp_type') . ': ' . $new_type_txt
644 );
645 $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
646 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
647
648 $this->tpl->setContent($confirm->getHTML());
649 return true;
650 } else {
651 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
652 $this->ctrl->redirect($this, 'edit');
653 return true;
654 }
655 }
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static getLogger($a_component_id)
Get component logger.
editObject()
edit object
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.

References $_POST, $form, $GLOBALS, ilObjectGUI\$ilErr, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\editObject(), ilLoggerFactory\getLogger(), initForm(), ilDidacticTemplateObjSettings\lookupTemplateId(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilUtil\sendQuestion(), ilUtil\sendSuccess(), ilObjectServiceSettingsGUI\SKILLS, ilUtil\stripSlashes(), ilObjectServiceSettingsGUI\TAG_CLOUD, ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilObjectServiceSettingsGUI\USE_NEWS.

+ Here is the call graph for this function:

◆ viewObject()

ilObjGroupGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

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

343 {
345
346 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
348 $ilUser->getId(),
349 $this->object->getId(),
350 $this->object->getRefId(),
351 'grp'
352 );
353
354 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
355 parent::viewObject();
356 return true;
357 }
358
359 if (!$this->checkAgreement()) {
360 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
361 $this->tabs_gui->setTabActive('view_content');
362 $this->ctrl->setReturn($this, 'view');
363 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
364 $this->ctrl->setCmdClass(get_class($agreement));
365 $this->ctrl->forwardCommand($agreement);
366 return true;
367 }
368
369 $this->tabs_gui->setTabActive('view_content');
370 $this->renderObject();
371 }
checkAgreement()
Check agreement and redirect if it is not accepted.

References $_GET, $ilUser, ilContainerGUI\$rbacsystem, ilObjectGUI\$tree, ilLearningProgress\_tracProgress(), checkAgreement(), and renderObject().

Referenced by leaveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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