ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 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...
 
 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 ()
 
 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...
 
 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. 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
 getObjectService ()
 Get object service. More...
 
 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...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. 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
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
- 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
 
 $ui
 

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

37 {
38 global $DIC;
39
40 $ilSetting = $DIC['ilSetting'];
41
42 $this->type = "grp";
43 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
44
45 $this->lng->loadLanguageModule('grp');
46 $this->lng->loadLanguageModule('obj');
47
48 $this->setting = $ilSetting;
49 }
global $ilSetting
Definition: privfeed.php:17
global $DIC
Definition: saml.php:7

References $DIC, and $ilSetting.

Member Function Documentation

◆ _goto()

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

goto target group

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

1428 {
1429 global $DIC;
1430
1431 $ilAccess = $DIC['ilAccess'];
1432 $ilErr = $DIC['ilErr'];
1433 $lng = $DIC['lng'];
1434 $ilUser = $DIC['ilUser'];
1435
1436 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1437 if (substr($a_add, 0, 5) == 'rcode') {
1438 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1439 // Redirect to login for anonymous
1441 "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
1442 $ilUser->getCurrentLanguage()
1443 );
1444 }
1445
1446 // Redirects to target location after assigning user to group
1448 $a_target,
1450 substr($a_add, 5)
1451 );
1452 }
1453
1454 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1455 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1456 }
1457
1458 if ($ilAccess->checkAccess("read", "", $a_target)) {
1460 } else {
1461 // to do: force flat view
1462 if ($ilAccess->checkAccess("visible", "", $a_target)) {
1463 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1464 } else {
1465 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1466 ilUtil::sendFailure(sprintf(
1467 $lng->txt("msg_no_perm_read_item"),
1469 ), true);
1471 }
1472 }
1473 }
1474 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1475 }
$_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, $DIC, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilMembershipRegistrationCodeUtils\handleCode(), ilUtil\redirect(), and ilUtil\sendFailure().

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

1037 {
1038 $this->tabs_gui->addTab(
1039 "view_content",
1040 $this->lng->txt("content"),
1041 $this->ctrl->getLinkTarget($this, "view")
1042 );
1043 }

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ addCustomData()

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

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

2031 {
2032 // object defined fields
2033 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2034 $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
2035
2036 $res_data = array();
2037 foreach ($a_data as $usr_id => $user_data) {
2038 $res_data[$usr_id] = $user_data;
2039
2040 // udf
2041 include_once './Services/User/classes/class.ilUserDefinedData.php';
2042 $udf_data = new ilUserDefinedData($usr_id);
2043 foreach ($udf_data->getAll() as $field => $value) {
2044 list($f, $field_id) = explode('_', $field);
2045 $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
2046 }
2047
2048 foreach ((array) $odfs[$usr_id] as $cdf_field => $cdf_value) {
2049 $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
2050 }
2051 }
2052
2053 return $res_data;
2054 }
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
Class ilUserDefinedData.

References $f, and 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 465 of file class.ilObjGroupGUI.php.

466 {
467 global $DIC;
468
469 $ilUser = $DIC['ilUser'];
470 $ilSetting = $DIC['ilSetting'];
471
472 $new_object->setRegistrationType(GRP_REGISTRATION_DIRECT);
473 $new_object->update();
474
475 // check for parent group or course => SORT_INHERIT
476 $sort_mode = ilContainer::SORT_TITLE;
477 if (
478 $GLOBALS['DIC']['tree']->checkForParentType($new_object->getRefId(), 'crs', true) ||
479 $GLOBALS['DIC']['tree']->checkForParentType($new_object->getRefId(), 'grp', true)
480 ) {
481 $sort_mode = ilContainer::SORT_INHERIT;
482 }
483
484 // Save sorting
485 include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
486 $sort = new ilContainerSortingSettings($new_object->getId());
487 $sort->setSortMode($sort_mode);
488 $sort->update();
489
490
491 // Add user as admin and enable notification
492 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
493 $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
494 $members_obj->add($ilUser->getId(), IL_GRP_ADMIN);
495 $members_obj->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
496 $members_obj->updateContact($ilUser->getId(), true);
497
498 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
499 if ($a_redirect) {
500 $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
501 $this->ctrl->redirect($this, 'edit');
502 }
503 }
const GRP_REGISTRATION_DIRECT
const IL_GRP_ADMIN
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

References $DIC, $GLOBALS, $ilSetting, $ilUser, ilGroupParticipants\_getInstanceByObjId(), ilObject\getId(), ilObject\getRefId(), GRP_REGISTRATION_DIRECT, IL_GRP_ADMIN, 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 1901 of file class.ilObjGroupGUI.php.

1902 {
1903 global $DIC;
1904
1905 $ilUser = $DIC['ilUser'];
1906 $ilAccess = $DIC['ilAccess'];
1907
1908 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1909 return true;
1910 }
1911
1912 // Disable aggrement if is not member of group
1913 if (!$this->object->members_obj->isAssigned($ilUser->getId())) {
1914 return true;
1915 }
1916
1917 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1918 if (ilMemberViewSettings::getInstance()->isActive()) {
1919 return true;
1920 }
1921
1922 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1923 include_once('Services/Membership/classes/class.ilMemberAgreement.php');
1925
1926 // Check agreement
1927 if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1928 and !ilMemberAgreement::_hasAccepted($ilUser->getId(), $this->object->getId())) {
1929 return false;
1930 }
1931 // Check required fields
1932 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1933 if (!ilCourseUserData::_checkRequired($ilUser->getId(), $this->object->getId())) {
1934 return false;
1935 }
1936 return true;
1937 }
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 $DIC, $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 1967 of file class.ilObjGroupGUI.php.

1968 {
1969 $link = chr(13) . chr(10) . chr(13) . chr(10);
1970 $link .= $this->lng->txt('grp_mail_permanent_link');
1971 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1972 include_once 'Services/Link/classes/class.ilLink.php';
1973 $link .= ilLink::_getLink($this->object->getRefId());
1974 return rawurlencode(base64_encode($link));
1975 }

References ilLink\_getLink().

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

@access public

Returns

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

815 {
816 global $DIC;
817
818 $ilErr = $DIC['ilErr'];
819 $ilAccess = $DIC['ilAccess'];
820
821 $this->checkPermission('write');
822
823 $this->setSubTabs('settings');
824 $this->tabs_gui->setTabActive('settings');
825 $this->tabs_gui->setSubTabActive('grp_info_settings');
826
827 $form = $this->initInfoEditor();
828 $this->tpl->setContent($form->getHTML());
829 }
initInfoEditor()
init info editor
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
if(isset($_POST['submit'])) $form

References $DIC, $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 729 of file class.ilObjGroupGUI.php.

730 {
731 global $DIC;
732
733 $ilUser = $DIC['ilUser'];
734 $ilCtrl = $DIC['ilCtrl'];
735 $ilUser = $DIC['ilUser'];
736 $ilAccess = $DIC['ilAccess'];
737
738 $this->setSubTabs("settings");
739 $this->tabs_gui->setTabActive('settings');
740 $this->tabs_gui->setSubTabActive('grp_map_settings');
741
742 include_once('./Services/Maps/classes/class.ilMapUtil.php');
743 if (!ilMapUtil::isActivated() ||
744 !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
745 return;
746 }
747
748 $latitude = $this->object->getLatitude();
749 $longitude = $this->object->getLongitude();
750 $zoom = $this->object->getLocationZoom();
751
752 // Get Default settings, when nothing is set
753 if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
755 $latitude = $def["latitude"];
756 $longitude = $def["longitude"];
757 $zoom = $def["zoom"];
758 }
759
760
761 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
762 $form = new ilPropertyFormGUI();
763 $form->setFormAction($ilCtrl->getFormAction($this));
764
765 $form->setTitle($this->lng->txt("grp_map_settings"));
766
767 // enable map
768 $public = new ilCheckboxInputGUI(
769 $this->lng->txt("grp_enable_map"),
770 "enable_map"
771 );
772 $public->setValue("1");
773 $public->setChecked($this->object->getEnableGroupMap());
774 $form->addItem($public);
775
776 // map location
777 $loc_prop = new ilLocationInputGUI(
778 $this->lng->txt("grp_map_location"),
779 "location"
780 );
781 $loc_prop->setLatitude($latitude);
782 $loc_prop->setLongitude($longitude);
783 $loc_prop->setZoom($zoom);
784 $form->addItem($loc_prop);
785
786 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
787
788 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
789 }
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, $DIC, $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 512 of file class.ilObjGroupGUI.php.

513 {
514 $this->checkPermission("write");
515
516 $this->setSubTabs('settings');
517 $this->tabs_gui->setTabActive('settings');
518 $this->tabs_gui->setSubTabActive('grp_settings');
519
520 if (!$a_form) {
521 $a_form = $this->initForm('edit');
522 }
523
524 $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
525 }
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 51 of file class.ilObjGroupGUI.php.

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

References $_GET, $DIC, $GLOBALS, $html, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacsystem, $ret, $t, ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilLearningProgress\_tracProgress(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), 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 2060 of file class.ilObjGroupGUI.php.

2061 {
2062 $local_roles = $this->object->getLocalGroupRoles(false);
2063 $grp_member = $this->object->getDefaultMemberRole();
2064 $grp_roles = array();
2065
2066 //put the group member role to the top of the crs_roles array
2067 if (in_array($grp_member, $local_roles)) {
2068 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2069 unset($local_roles[$grp_roles[$grp_member]]);
2070 }
2071
2072 foreach ($local_roles as $title => $role_id) {
2073 $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
2074 }
2075 return $grp_roles;
2076 }
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 1047 of file class.ilObjGroupGUI.php.

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

1226 {
1227 global $DIC;
1228
1229 $rbacsystem = $DIC['rbacsystem'];
1230 $ilUser = $DIC['ilUser'];
1231 $ilSetting = $DIC['ilSetting'];
1232
1233 $this->tabs_gui->setTabActive('info_short');
1234
1235 if (!$this->checkPermissionBool('read')) {
1236 $this->checkPermission('visible');
1237 }
1238
1240 $this->object->getId(),
1241 $this->object->getId(),
1242 'grp'
1243 );
1244
1245 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1246 $info = new ilInfoScreenGUI($this);
1247
1248 if (strlen($this->object->getInformation())) {
1249 $info->addSection($this->lng->txt('grp_general_informations'));
1250 $info->addProperty($this->lng->txt('grp_information'), nl2br(
1251 ilUtil::makeClickable($this->object->getInformation(), true)
1252 ));
1253 }
1254
1255 $info->enablePrivateNotes();
1256 $info->enableLearningProgress(true);
1257
1258 $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'grp', $this->object->getId());
1259 $record_gui->setInfoObject($info);
1260 $record_gui->parse();
1261
1262 // meta data
1263 $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1264
1265
1266 // support contacts
1267 $parts = ilParticipants::getInstance($this->object->getRefId());
1268 $contacts = $parts->getContacts();
1269 if (count($contacts) > 0) {
1270 $info->addSection($this->lng->txt("grp_mem_contacts"));
1271 foreach ($contacts as $c) {
1272 $pgui = new ilPublicUserProfileGUI($c);
1273 $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
1274 $pgui->setEmbedded(true);
1275 $info->addProperty("", $pgui->getHTML());
1276 }
1277 }
1278
1279
1280 $info->addSection($this->lng->txt('group_registration'));
1281 $info->showLDAPRoleGroupMappingInfo();
1282
1283 if (!$this->object->isRegistrationEnabled()) {
1284 $info->addProperty(
1285 $this->lng->txt('group_registration_mode'),
1286 $this->lng->txt('grp_reg_deac_info_screen')
1287 );
1288 } else {
1289 switch ($this->object->getRegistrationType()) {
1291 $info->addProperty(
1292 $this->lng->txt('group_registration_mode'),
1293 $this->lng->txt('grp_reg_direct_info_screen')
1294 );
1295 break;
1296
1298 $info->addProperty(
1299 $this->lng->txt('group_registration_mode'),
1300 $this->lng->txt('grp_reg_req_info_screen')
1301 );
1302 break;
1303
1305 $info->addProperty(
1306 $this->lng->txt('group_registration_mode'),
1307 $this->lng->txt('grp_reg_passwd_info_screen')
1308 );
1309 break;
1310
1311 }
1312 /*
1313 $info->addProperty($this->lng->txt('group_registration_time'),
1314 ilDatePresentation::formatPeriod(
1315 $this->object->getRegistrationStart(),
1316 $this->object->getRegistrationEnd()));
1317 */
1318 if ($this->object->isRegistrationUnlimited()) {
1319 $info->addProperty(
1320 $this->lng->txt('group_registration_time'),
1321 $this->lng->txt('grp_registration_unlimited')
1322 );
1323 } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
1324 $info->addProperty(
1325 $this->lng->txt("group_registration_time"),
1326 $this->lng->txt('cal_until') . ' ' .
1327 ilDatePresentation::formatDate($this->object->getRegistrationEnd())
1328 );
1329 } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
1330 $info->addProperty(
1331 $this->lng->txt("group_registration_time"),
1332 $this->lng->txt('cal_from') . ' ' .
1333 ilDatePresentation::formatDate($this->object->getRegistrationStart())
1334 );
1335 }
1336 if ($this->object->isMembershipLimited()) {
1337 if ($this->object->getMinMembers()) {
1338 $info->addProperty(
1339 $this->lng->txt("mem_min_users"),
1340 $this->object->getMinMembers()
1341 );
1342 }
1343 if ($this->object->getMaxMembers()) {
1344 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1345 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1346
1347 $info->addProperty(
1348 $this->lng->txt('mem_free_places'),
1349 $reg_info['reg_info_free_places']
1350 );
1351 }
1352 }
1353
1354 if ($this->object->getCancellationEnd()) {
1355 $info->addProperty(
1356 $this->lng->txt('grp_cancellation_end'),
1357 ilDatePresentation::formatDate($this->object->getCancellationEnd())
1358 );
1359 }
1360 }
1361
1362 if ($this->object->getStart()) {
1363 $info->addProperty(
1364 $this->lng->txt('grp_period'),
1366 $this->object->getStart(),
1367 $this->object->getEnd()
1368 )
1369 );
1370 }
1371
1372
1373 // Confirmation
1374 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1376
1377 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1378 if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
1379 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
1380
1381 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1382
1383 $this->lng->loadLanguageModule('ps');
1384 $info->addSection($this->lng->txt('grp_user_agreement_info'));
1385 $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
1386
1387 if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
1388 $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
1389 }
1390 }
1391
1392
1393 // forward the command
1394 $this->ctrl->forwardCommand($info);
1395 }
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, $include_seconds=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 _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
static getInstance($a_ref_id)
Get instance by ref_id.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
$info
Definition: index.php:5

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

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

1216 {
1217 $this->ctrl->setCmd("showSummary");
1218 $this->ctrl->setCmdClass("ilinfoscreengui");
1219 $this->infoScreen();
1220 }

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

1486 {
1487 global $DIC;
1488
1489 $obj_service = $this->getObjectService();
1490
1491 $tree = $DIC['tree'];
1492
1493 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1494
1495 $form = new ilPropertyFormGUI();
1496
1497 if (!$a_omit_form_action) {
1498 switch ($a_mode) {
1499 case 'edit':
1500 $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1501 break;
1502
1503 default:
1504 $form->setTableWidth('600px');
1505 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
1506 break;
1507 }
1508 }
1509
1510 // title/description
1511 $this->initFormTitleDescription($form);
1512
1514
1515 if ($a_mode == 'edit') {
1516 // group period
1517 include_once 'Services/Form/classes/class.ilDateDurationInputGUI.php';
1518 $group_duration = new ilDateDurationInputGUI($this->lng->txt('grp_period'), 'period');
1519 $group_duration->setInfo($this->lng->txt('grp_period_info'));
1520 if ($this->object->getStart()) {
1521 $group_duration->setStart($this->object->getStart());
1522 }
1523 if ($this->object->getEnd()) {
1524 $group_duration->setEnd($this->object->getEnd());
1525 }
1526 $form->addItem($group_duration);
1527
1528 // Group registration ############################################################
1529 $pres = new ilFormSectionHeaderGUI();
1530 $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1531 $form->addItem($pres);
1532
1533 // Registration type
1534 $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
1535 $reg_type->setValue($this->object->getRegistrationType());
1536
1537 $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
1538 $reg_type->addOption($opt_dir);
1539
1540 $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
1541 $pass = new ilTextInputGUI($this->lng->txt("password"), 'password');
1542 $pass->setRequired(true);
1543 $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1544 $pass->setValue($this->object->getPassword());
1545 $pass->setSize(32);
1546 $pass->setMaxLength(32);
1547 $opt_pass->addSubItem($pass);
1548 $reg_type->addOption($opt_pass);
1549
1550 $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
1551 $reg_type->addOption($opt_req);
1552
1553 $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
1554 $reg_type->addOption($opt_deact);
1555
1556 // Registration codes
1557 $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
1558 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1559 $reg_code->setValue(1);
1560 $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1561 $form->addItem($reg_type);
1562
1563 // Registration codes
1564 if (!$this->object->getRegistrationAccessCode()) {
1565 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1566 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1567 }
1568 $reg_link = new ilHiddenInputGUI('reg_code');
1569 $reg_link->setValue($this->object->getRegistrationAccessCode());
1570 $form->addItem($reg_link);
1571
1572 $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1573 include_once './Services/Link/classes/class.ilLink.php';
1574 $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
1575 $link->setHTML('<span class="small">' . $val . '</span>');
1576 $reg_code->addSubItem($link);
1577 $form->addItem($reg_code);
1578
1579 // time limit
1580 $this->lng->loadLanguageModule('dateplaner');
1581 include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
1582 $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'), 'reg');
1583 $dur->setShowTime(true);
1584 $dur->setStart($this->object->getRegistrationStart());
1585 $dur->setEnd($this->object->getRegistrationEnd());
1586 $form->addItem($dur);
1587
1588 // cancellation limit
1589 $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1590 $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1591 $cancel->setDate($this->object->getCancellationEnd());
1592 $form->addItem($cancel);
1593
1594 // max member
1595 $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'), 'registration_membership_limited');
1596 $lim->setValue(1);
1597 // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1598 $lim->setChecked($this->object->isMembershipLimited());
1599
1600 $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'), 'registration_min_members');
1601 $min->setSize(3);
1602 $min->setMaxLength(4);
1603 $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
1604 $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1605 $lim->addSubItem($min);
1606
1607 $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'), 'registration_max_members');
1608 $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
1609 //$max->setTitle($this->lng->txt('members'));
1610 $max->setSize(3);
1611 $max->setMaxLength(4);
1612 $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1613 $lim->addSubItem($max);
1614
1615 /*
1616 $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1617 $wait->setValue(1);
1618 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1619 $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1620 $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1621 $lim->addSubItem($wait);
1622 $form->addItem($lim);
1623 */
1624
1625 $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1626
1627 $option = new ilRadioOption($this->lng->txt('none'), 0);
1628 $wait->addOption($option);
1629
1630 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
1631 $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1632 $wait->addOption($option);
1633
1634 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
1635 $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1636 $wait->addOption($option);
1637
1638 if ($this->object->hasWaitingListAutoFill()) {
1639 $wait->setValue(2);
1640 } elseif ($this->object->isWaitingListEnabled()) {
1641 $wait->setValue(1);
1642 }
1643
1644 $lim->addSubItem($wait);
1645
1646 $form->addItem($lim);
1647
1648
1649 // Group presentation
1650 $parent_membership_ref_id = 0;
1651 $hasParentMembership =
1652 (
1653 $parent_membership_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs', true)
1654 );
1655
1656 $pres = new ilFormSectionHeaderGUI();
1657 $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1658 $form->addItem($pres);
1659
1660 // title and icon visibility
1661 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
1662
1663 // top actions visibility
1664 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
1665
1666 // custom icon
1667 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
1668
1669 // tile image
1670 $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
1671
1672 // list presentation
1674
1675
1676 // presentation type
1677 $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'), 'view_mode');
1678 if ($hasParentMembership) {
1679 $parent_view_mode = ilObjCourseAccess::_lookupViewMode(ilObject::_lookupObjId($parent_membership_ref_id));
1680 $course_view_mode = '';
1681 switch ($parent_view_mode) {
1683 $course_view_mode = ': ' . $this->lng->txt('cntr_view_sessions');
1684 break;
1685
1687 $course_view_mode = ': ' . $this->lng->txt('cntr_view_simple');
1688 break;
1689
1691 $course_view_mode = ': ' . $this->lng->txt('cntr_view_by_type');
1692 break;
1693 }
1694 if ($course_view_mode) {
1695 $opt = new ilRadioOption($this->lng->txt('grp_view_inherit') . $course_view_mode, ilContainer::VIEW_INHERIT);
1696 $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1697 $view_type->addOption($opt);
1698 }
1699 }
1700
1701 if ($hasParentMembership && ilObjGroup::lookupViewMode($this->object->getId()) == ilContainer::VIEW_INHERIT) {
1702 $view_type->setValue(ilContainer::VIEW_INHERIT);
1703 } else {
1704 $view_type->setValue(ilObjGroup::lookupViewMode($this->object->getId()));
1705 }
1706
1707 $opt = new ilRadioOption($this->lng->txt('cntr_view_sessions'), ilContainer::VIEW_SESSIONS);
1708 $opt->setInfo($this->lng->txt('cntr_view_info_sessions'));
1709 $view_type->addOption($opt);
1710
1711 $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'), ilContainer::VIEW_SIMPLE);
1712 $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1713 $view_type->addOption($opt);
1714
1715 $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
1716 $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1717 $view_type->addOption($opt);
1718 $form->addItem($view_type);
1719
1720
1721 // Sorting
1722 $sorting_settings = array();
1723 if ($hasParentMembership) {
1724 $sorting_settings[] = ilContainer::SORT_INHERIT;
1725 }
1726 $sorting_settings[] = ilContainer::SORT_TITLE;
1727 $sorting_settings[] = ilContainer::SORT_CREATION;
1728 $sorting_settings[] = ilContainer::SORT_MANUAL;
1729 $this->initSortingForm($form, $sorting_settings);
1730
1731 // additional features
1732 $feat = new ilFormSectionHeaderGUI();
1733 $feat->setTitle($this->lng->txt('obj_features'));
1734 $form->addItem($feat);
1735
1736 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1738 $this->object->getId(),
1739 $form,
1740 array(
1749 )
1750 );
1751
1752
1753 $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'), 'show_members');
1754 $mem->setChecked($this->object->getShowMembers());
1755 $mem->setInfo($this->lng->txt('grp_show_members_info'));
1756 $form->addItem($mem);
1757
1758 // Show members type
1759 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1760 $mail_type->setValue($this->object->getMailToMembersType());
1761
1762 $mail_tutors = new ilRadioOption(
1763 $this->lng->txt('grp_mail_tutors_only'),
1765 $this->lng->txt('grp_mail_tutors_only_info')
1766 );
1767 $mail_type->addOption($mail_tutors);
1768
1769 $mail_all = new ilRadioOption(
1770 $this->lng->txt('grp_mail_all'),
1772 $this->lng->txt('grp_mail_all_info')
1773 );
1774 $mail_type->addOption($mail_all);
1775 $form->addItem($mail_type);
1776 }
1777
1778 switch ($a_mode) {
1779 case 'create':
1780 $form->setTitle($this->lng->txt('grp_new'));
1781 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1782
1783 $form->addCommandButton('save', $this->lng->txt('grp_new'));
1784 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1785 break;
1786
1787 case 'edit':
1788 $form->setTitle($this->lng->txt('grp_edit'));
1789 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1790
1791 // Edit ecs export settings
1792 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
1793 $ecs = new ilECSGroupSettings($this->object);
1794 $ecs->addSettingsToForm($form, 'grp');
1795
1796 $form->addCommandButton('update', $this->lng->txt('save'));
1797 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1798 break;
1799 }
1800 return $form;
1801 }
const GRP_REGISTRATION_DEACTIVATED
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to 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.
static _lookupViewMode($a_id)
Lookup view mode.
static lookupViewMode($a_obj_id)
lookup view mode @global $ilDB
const MAIL_ALLOWED_TUTORS
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
getObjectService()
Get object service.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
This class represents a property in a property form.
This class represents an option in a radio group.
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 $DIC, $form, $pass, ilObjectGUI\$tree, ilLink\_getLink(), ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), ilObjectGUI\getObjectService(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjGroup\lookupViewMode(), 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, 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:

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

1978 {
1979 global $DIC;
1980
1981 $ilSetting = $DIC['ilSetting'];
1982 $ilUser = $DIC['ilUser'];
1983
1984 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
1985
1986 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1987 if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
1988 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1990 $noti = new ilMembershipNotifications($this->ref_id);
1991 if (!$noti->isCurrentUserActive()) {
1992 $lg->addHeaderIcon(
1993 "not_icon",
1994 ilUtil::getImagePath("notification_off.svg"),
1995 $this->lng->txt("grp_notification_deactivated")
1996 );
1997
1998 $this->ctrl->setParameter($this, "grp_ntf", 1);
1999 $caption = "grp_activate_notification";
2000 } else {
2001 $lg->addHeaderIcon(
2002 "not_icon",
2003 ilUtil::getImagePath("notification_on.svg"),
2004 $this->lng->txt("grp_notification_activated")
2005 );
2006
2007 $this->ctrl->setParameter($this, "grp_ntf", 0);
2008 $caption = "grp_deactivate_notification";
2009 }
2010
2011 if ($noti->canCurrentUserEdit()) {
2012 $lg->addCustomCommand(
2013 $this->ctrl->getLinkTarget($this, "saveNotification"),
2014 $caption
2015 );
2016 }
2017
2018 $this->ctrl->setParameter($this, "grp_ntf", "");
2019 }
2020 }
2021
2022 return $lg;
2023 }
Membership notification settings.
$lg
Definition: example_018.php:62

References $DIC, $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 837 of file class.ilObjGroupGUI.php.

838 {
839 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
840 $form = new ilPropertyFormGUI();
841 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
842 $form->setTitle($this->lng->txt('grp_general_informations'));
843 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
844 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
845
846 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
847 $area->setInfo($this->lng->txt('grp_information_info'));
848 $area->setValue($this->object->getInformation());
849 $area->setRows(8);
850 $area->setCols(80);
851 $form->addItem($area);
852
853 return $form;
854 }
This class represents a text area property in a property form.

References $form.

Referenced by editInfoObject().

+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

2082 {
2083 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2084 }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group @access public

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

968 {
969 global $DIC;
970
971 $ilUser = $DIC['ilUser'];
972
973 $this->checkPermission('leave');
974
975 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
976 if ($part->isLastAdmin($ilUser->getId())) {
977 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
978 $this->viewObject();
979 return false;
980 }
981
982 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
983
984 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
985 $cgui = new ilConfirmationGUI();
986 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
987 $cgui->setFormAction($this->ctrl->getFormAction($this));
988 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
989 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
990 $this->tpl->setContent($cgui->getHTML());
991 }
Confirmation screen class.
viewObject()
list childs of current object

References $DIC, $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 1418 of file class.ilObjGroupGUI.php.

1419 {
1420 $GLOBALS['DIC']['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1421 }

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

438 {
439 global $DIC;
440
441 $tree = $DIC['tree'];
442
443 // if folder is in a course, modify item list gui according to course requirements
444 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs')) {
445 include_once("./Modules/Course/classes/class.ilObjCourse.php");
446 include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
447 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
449 $a_item_list_gui,
450 'ilcoursecontentgui',
451 $a_item_data,
452 $a_show_path,
453 ilObjCourse::_lookupAboStatus($course_obj_id),
454 $course_ref_id,
455 $course_obj_id,
456 $this->object->getRefId()
457 );
458 }
459 }
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 $DIC, 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 1944 of file class.ilObjGroupGUI.php.

1945 {
1946 global $DIC;
1947
1948 $rbacsystem = $DIC['rbacsystem'];
1949 if (!$this->getCreationMode()) {
1950 /*
1951 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1952 $settings = ilMemberViewSettings::getInstance();
1953 if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
1954 {
1955 $settings->setContainer($this->object->getRefId());
1956 $rbacsystem->initMemberView();
1957 }
1958 */
1959 }
1960 parent::prepareOutput($a_show_subobjects);
1961 }

References $DIC, 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 875 of file class.ilObjGroupGUI.php.

876 {
877 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
879
880 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
881 $this->show_tracking =
882 (
884 ilObjUserTracking::_enabledUserRelatedData()
885 );
886 if ($this->show_tracking) {
887 include_once('./Services/Object/classes/class.ilObjectLP.php');
888 $olp = ilObjectLP::getInstance($this->object->getId());
889 $this->show_tracking = $olp->isActive();
890 }
891
892 if ($this->show_tracking) {
893 include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
894 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
895 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
896 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
897 }
898
899 if ($privacy->enabledGroupAccessTimes()) {
900 include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
901 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
902 }
903
904 $do_prtf = (is_array($selected_columns) &&
905 in_array('prtf', $selected_columns) &&
906 is_array($ids));
907 if ($do_prtf) {
908 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
910 $ids,
911 $this->ctrl->getLinkTarget($this, "members")
912 );
913 }
914
915 $profile_data = ilObjUser::_readUsersProfileData($ids);
916 foreach ($ids as $usr_id) {
917 $name = ilObjUser::_lookupName($usr_id);
918 $tmp_data['firstname'] = $name['firstname'];
919 $tmp_data['lastname'] = $name['lastname'];
920 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
921 $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
922 $tmp_data['contact'] = $this->object->members_obj->isContact($usr_id) ? 1 : 0;
923 $tmp_data['usr_id'] = $usr_id;
924 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
925
926 foreach ((array) $profile_data[$usr_id] as $field => $value) {
927 $tmp_data[$field] = $value;
928 }
929
930 if ($this->show_tracking) {
931 if (in_array($usr_id, $completed)) {
932 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
933 } elseif (in_array($usr_id, $in_progress)) {
934 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
935 } elseif (in_array($usr_id, $failed)) {
936 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
937 } else {
938 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
939 }
940 }
941
942 if ($privacy->enabledGroupAccessTimes()) {
943 if (isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts']) {
944 $tmp_data['access_time'] = ilDatePresentation::formatDate(
945 $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
946 );
947 $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
948 } else {
949 $tmp_data['access_time'] = $this->lng->txt('no_date');
950 $tmp_data['access_time_unix'] = 0;
951 }
952 }
953
954 if ($do_prtf) {
955 $tmp_data['prtf'] = $all_prtf[$usr_id];
956 }
957
958 $members[$usr_id] = $tmp_data;
959 }
960 return $members ? $members : array();
961 }
$failed
Definition: Utf8Test.php:85
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(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12

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

420 {
421 global $DIC;
422
423 $ilTabs = $DIC['ilTabs'];
424
425 $ilTabs->activateTab("view_content");
426 $ret = parent::renderObject();
427 return $ret;
428 }

References $DIC, and $ret.

Referenced by executeCommand(), and viewObject().

+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

792 {
793 global $DIC;
794
795 $ilCtrl = $DIC['ilCtrl'];
796 $ilUser = $DIC['ilUser'];
797
798 $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
799 $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
800 $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
801 $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
802 $this->object->update();
803
804 $ilCtrl->redirect($this, "editMapSettings");
805 }
$_POST["username"]
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $DIC, $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 1400 of file class.ilObjGroupGUI.php.

1401 {
1402 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1403 $noti = new ilMembershipNotifications($this->ref_id);
1404 if ($noti->canCurrentUserEdit()) {
1405 if ((bool) $_REQUEST["grp_ntf"]) {
1406 $noti->activateUser();
1407 } else {
1408 $noti->deactivateUser();
1409 }
1410 }
1411 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1412 $this->ctrl->redirect($this, "");
1413 }

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

Set return point for side column actions.

Reimplemented from ilContainerGUI.

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

2090 {
2091 $this->ctrl->setReturn($this, "view");
2092 }

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

@access protected

Parameters

return

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

1811 {
1812 global $DIC;
1813
1814 $rbacsystem = $DIC['rbacsystem'];
1815 $ilUser = $DIC['ilUser'];
1816 $ilAccess = $DIC['ilAccess'];
1817
1818 switch ($a_tab) {
1819
1820 case 'settings':
1821 $this->tabs_gui->addSubTabTarget(
1822 "grp_settings",
1823 $this->ctrl->getLinkTarget($this, 'edit'),
1824 "edit",
1825 get_class($this)
1826 );
1827
1828 $this->tabs_gui->addSubTabTarget(
1829 "grp_info_settings",
1830 $this->ctrl->getLinkTarget($this, 'editInfo'),
1831 "editInfo",
1832 get_class($this)
1833 );
1834
1835 include_once("./Services/Maps/classes/class.ilMapUtil.php");
1836 if (ilMapUtil::isActivated()) {
1837 $this->tabs_gui->addSubTabTarget(
1838 "grp_map_settings",
1839 $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1840 "editMapSettings",
1841 get_class($this)
1842 );
1843 }
1844
1845 $this->tabs_gui->addSubTabTarget(
1846 'groupings',
1847 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1848 'listGroupings',
1849 get_class($this)
1850 );
1851
1852 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1853 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1854 // only show if export permission is granted
1855 if (ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1856 $this->tabs_gui->addSubTabTarget(
1857 'grp_custom_user_fields',
1858 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1859 '',
1860 'ilobjectcustomuserfieldsgui'
1861 );
1862 }
1863
1864 // news settings
1865 if ($this->object->getUseNews()) {
1866 $this->tabs_gui->addSubTab(
1867 'obj_news_settings',
1868 $this->lng->txt("cont_news_settings"),
1869 $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1870 );
1871 }
1872
1873 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1874 if ($lti_settings->hasSettingsAccess()) {
1875 $this->tabs_gui->addSubTabTarget(
1876 'lti_provider',
1877 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1878 );
1879 }
1880
1881 $this->tabs_gui->addSubTabTarget(
1882 "obj_multilinguality",
1883 $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""),
1884 "",
1885 "ilobjecttranslationgui"
1886 );
1887
1888
1889 break;
1890
1891
1892 }
1893 }

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

Referenced by 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 999 of file class.ilObjGroupGUI.php.

1000 {
1001 global $DIC;
1002
1003 $ilUser = $DIC['ilUser'];
1004 $tree = $DIC['tree'];
1005 $ilCtrl = $DIC['ilCtrl'];
1006
1007 $this->checkPermission('leave');
1008
1009 $this->object->members_obj->delete($ilUser->getId());
1010
1011 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1012 $this->object->members_obj->sendNotification(
1014 $ilUser->getId()
1015 );
1016 $this->object->members_obj->sendNotification(
1018 $ilUser->getId()
1019 );
1020
1021 ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'), true);
1022 $ilCtrl->setParameterByClass(
1023 "ilrepositorygui",
1024 "ref_id",
1025 $tree->getParentId($this->object->getRefId())
1026 );
1027 $ilCtrl->redirectByClass("ilrepositorygui", "");
1028 }

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

+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

@access public

Parameters

return

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

535 {
536 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
538 $this->object->getRefId(),
539 (int) $_REQUEST['grp_type']
540 );
541
542 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
543 $this->ctrl->redirect($this, 'edit');
544 }
static switchTemplate($a_ref_id, $a_new_tpl_id)

References ilDidacticTemplateUtils\switchTemplate().

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

update info

@access public

Returns

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

863 {
864 $this->checkPermission('manage_members');
865
866 $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
867 $this->object->update();
868
869 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
870 $this->editInfoObject();
871 return true;
872 }
editInfoObject()
edit info

References $_POST, ilObjectGUI\checkPermission(), editInfoObject(), 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 552 of file class.ilObjGroupGUI.php.

553 {
554 $obj_service = $this->getObjectService();
555
556 $this->checkPermission('write');
557
558 $form = $this->initForm();
559 if ($form->checkInput()) {
560 // handle group type settings
561 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
562 $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
563
564 $modified = false;
565 $new_type_info = $form->getInput('didactic_type');
566 if ($new_type_info) {
567 $new_type = explode('_', $form->getInput('didactic_type'));
568 $new_type = $new_type[1];
569
570 $modified = ($new_type != $old_type);
571 ilLoggerFactory::getLogger('grp')->info('Switched group type from ' . $old_type . ' to ' . $new_type);
572 }
573
574 $old_autofill = $this->object->hasWaitingListAutoFill();
575
576 $this->object->setTitle(ilUtil::stripSlashes($form->getInput('title')));
577 $this->object->setDescription(ilUtil::stripSlashes($form->getInput('desc')));
578 $this->object->setGroupType(ilUtil::stripSlashes($form->getInput('grp_type')));
579 $this->object->setRegistrationType(ilUtil::stripSlashes($form->getInput('registration_type')));
580 $this->object->setPassword(ilUtil::stripSlashes($form->getInput('password')));
581 $this->object->enableUnlimitedRegistration((bool) !$form->getInput('reg_limit_time'));
582 $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
583 $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
584 $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
585 $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
586 $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
587 $this->object->setViewMode($form->getInput('view_mode'));
588 $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
589 $this->object->setShowMembers((int) $form->getInput('show_members'));
590
591 // group period
592 $period = $form->getItemByPostVar('period');
593 $this->object->setStart($period->getStart());
594 $this->object->setEnd($period->getEnd());
595
596 $reg = $form->getItemByPostVar("reg");
597 if ($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime) {
598 $this->object->enableUnlimitedRegistration(false);
599 } else {
600 $this->object->enableUnlimitedRegistration(true);
601 }
602
603 $this->object->setRegistrationStart($reg->getStart());
604 $this->object->setRegistrationEnd($reg->getEnd());
605
606 $cancel_end = $form->getItemByPostVar("cancel_end");
607 $this->object->setCancellationEnd($cancel_end->getDate());
608
609 switch ((int) $_POST['waiting_list']) {
610 case 2:
611 $this->object->enableWaitingList(true);
612 $this->object->setWaitingListAutoFill(true);
613 break;
614
615 case 1:
616 $this->object->enableWaitingList(true);
617 $this->object->setWaitingListAutoFill(false);
618 break;
619
620 default:
621 $this->object->enableWaitingList(false);
622 $this->object->setWaitingListAutoFill(false);
623 break;
624 }
625
626 // title icon visibility
627 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
628
629 // top actions visibility
630 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
631
632 // custom icon
633 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
634
635 // tile image
636 $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
637
638 // list presentation
640
641 // update object settings
642 $this->object->update();
643
644
645 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
647 $this->object->getId(),
648 $form,
649 array(
658 )
659 );
660
661 // Save sorting
663 // if autofill has been activated trigger process
664 if (
665 !$old_autofill &&
666 $this->object->hasWaitingListAutoFill()) {
667 $this->object->handleAutoFill();
668 }
669
670 // BEGIN ChangeEvents: Record update Object.
671 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
672 global $DIC;
673
674 $ilUser = $DIC['ilUser'];
676 $this->object->getId(),
677 $ilUser->getId(),
678 'update'
679 );
680 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
681 // END PATCH ChangeEvents: Record update Object.
682 // Update ecs export settings
683 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
684 $ecs = new ilECSGroupSettings($this->object);
685 $ecs->handleSettingsUpdate();
686 } else {
687 ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
688
689 $form->setValuesByPost();
690 $this->editObject($form);
691 return true;
692 }
693
694 // group type modified
695 if ($modified) {
696 if ($new_type == 0) {
697 $new_type_txt = $GLOBALS['DIC']['lng']->txt('il_grp_status_open');
698 } else {
699 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
700 $dtpl = new ilDidacticTemplateSetting($new_type);
701 $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['DIC']['lng']->getLangKey());
702 }
703
704
705 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
706 ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
707 $confirm = new ilConfirmationGUI();
708 $confirm->setFormAction($this->ctrl->getFormAction($this));
709 $confirm->addItem(
710 'grp_type',
711 $new_type,
712 $this->lng->txt('grp_info_new_grp_type') . ': ' . $new_type_txt
713 );
714 $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
715 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
716
717 $this->tpl->setContent($confirm->getHTML());
718 return true;
719 } else {
720 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
721 $this->ctrl->redirect($this, 'edit');
722 return true;
723 }
724 }
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.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
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, $DIC, $form, $GLOBALS, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\editObject(), ilLoggerFactory\getLogger(), ilObjectGUI\getObjectService(), initForm(), ilDidacticTemplateObjSettings\lookupTemplateId(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilUtil\sendQuestion(), 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 374 of file class.ilObjGroupGUI.php.

375 {
376 global $DIC;
377
378 $tree = $DIC['tree'];
379 $rbacsystem = $DIC['rbacsystem'];
380 $ilUser = $DIC['ilUser'];
381
382 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
384 $ilUser->getId(),
385 $this->object->getId(),
386 $this->object->getRefId(),
387 'grp'
388 );
389
391 $this->object->getId(),
392 $this->object->getId(),
393 'grp'
394 );
395
396
397 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
398 parent::viewObject();
399 return true;
400 }
401
402 if (!$this->checkAgreement()) {
403 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
404 $this->tabs_gui->setTabActive('view_content');
405 $this->ctrl->setReturn($this, 'view');
406 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
407 $this->ctrl->setCmdClass(get_class($agreement));
408 $this->ctrl->forwardCommand($agreement);
409 return true;
410 }
411
412 $this->tabs_gui->setTabActive('view_content');
413 $this->renderObject();
414 }
checkAgreement()
Check agreement and redirect if it is not accepted.

References $_GET, $DIC, $ilUser, ilContainerGUI\$rbacsystem, ilObjectGUI\$tree, ilMDUtils\_fillHTMLMetaTags(), 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: