ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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 ()
 viewObject container presentation for "administration -> repository, trash, permissions" 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...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc 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...
 
 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 ()
 
 getBucketTitle ()
 get proper label to add in the background task popover More...
 
 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...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 trash table apply filter More...
 
 trashResetFilterObject ()
 trash table reset filter 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...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
- Public Member Functions inherited from ilDesktopItemHandling
 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...
 
 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...
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (\ilPropertyFormGUI $form=null)
 
 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
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $global_screen
 
 $app_event_handler
 
 $ui
 
 $container_filter_service
 
 $container_user_filter = null
 
 $ui_filter
 

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 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46

References $DIC, $ilSetting, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

goto target group

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

1439 {
1440 global $DIC;
1441
1442 $ilAccess = $DIC['ilAccess'];
1443 $ilErr = $DIC['ilErr'];
1444 $lng = $DIC['lng'];
1445 $ilUser = $DIC['ilUser'];
1446
1447 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1448 if (substr($a_add, 0, 5) == 'rcode') {
1449 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1450 // Redirect to login for anonymous
1452 "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
1453 $ilUser->getCurrentLanguage()
1454 );
1455 }
1456
1457 // Redirects to target location after assigning user to group
1459 $a_target,
1461 substr($a_add, 5)
1462 );
1463 }
1464
1465 if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1466 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1467 }
1468
1469 if ($ilAccess->checkAccess("read", "", $a_target)) {
1471 } else {
1472 // to do: force flat view
1473 if ($ilAccess->checkAccess("visible", "", $a_target)) {
1474 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1475 } else {
1476 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1477 ilUtil::sendFailure(sprintf(
1478 $lng->txt("msg_no_perm_read_item"),
1480 ), true);
1482 }
1483 }
1484 }
1485 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1486 }
$_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 1047 of file class.ilObjGroupGUI.php.

1048 {
1049 $this->tabs_gui->addTab(
1050 "view_content",
1051 $this->lng->txt("content"),
1052 $this->ctrl->getLinkTarget($this, "view")
1053 );
1054 }

Referenced by getTabs().

+ Here is the caller graph for this function:

◆ addCustomData()

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

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

2050 {
2051 // object defined fields
2052 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2053 $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
2054
2055 $res_data = array();
2056 foreach ($a_data as $usr_id => $user_data) {
2057 $res_data[$usr_id] = $user_data;
2058
2059 // udf
2060 include_once './Services/User/classes/class.ilUserDefinedData.php';
2061 $udf_data = new ilUserDefinedData($usr_id);
2062 foreach ($udf_data->getAll() as $field => $value) {
2063 list($f, $field_id) = explode('_', $field);
2064 $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
2065 }
2066
2067 foreach ((array) $odfs[$usr_id] as $cdf_field => $cdf_value) {
2068 $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
2069 }
2070 }
2071
2072 return $res_data;
2073 }
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
Class ilUserDefinedData.

References Vendor\Package\$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 471 of file class.ilObjGroupGUI.php.

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

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

1921 {
1922 global $DIC;
1923
1924 $ilUser = $DIC['ilUser'];
1925 $ilAccess = $DIC['ilAccess'];
1926
1927 if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1928 return true;
1929 }
1930
1931 // Disable aggrement if is not member of group
1932 if (!$this->object->members_obj->isAssigned($ilUser->getId())) {
1933 return true;
1934 }
1935
1936 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1937 if (ilMemberViewSettings::getInstance()->isActive()) {
1938 return true;
1939 }
1940
1941 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1942 include_once('Services/Membership/classes/class.ilMemberAgreement.php');
1944
1945 // Check agreement
1946 if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1947 and !ilMemberAgreement::_hasAccepted($ilUser->getId(), $this->object->getId())) {
1948 return false;
1949 }
1950 // Check required fields
1951 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1952 if (!ilCourseUserData::_checkRequired($ilUser->getId(), $this->object->getId())) {
1953 return false;
1954 }
1955 return true;
1956 }
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 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 1986 of file class.ilObjGroupGUI.php.

1987 {
1988 $link = chr(13) . chr(10) . chr(13) . chr(10);
1989 $link .= $this->lng->txt('grp_mail_permanent_link');
1990 $link .= chr(13) . chr(10) . chr(13) . chr(10);
1991 include_once 'Services/Link/classes/class.ilLink.php';
1992 $link .= ilLink::_getLink($this->object->getRefId());
1993 return rawurlencode(base64_encode($link));
1994 }

References ilLink\_getLink().

+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

@access public

Returns

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

826 {
827 global $DIC;
828
829 $ilErr = $DIC['ilErr'];
830 $ilAccess = $DIC['ilAccess'];
831
832 $this->checkPermission('write');
833
834 $this->setSubTabs('settings');
835 $this->tabs_gui->setTabActive('settings');
836 $this->tabs_gui->setSubTabActive('grp_info_settings');
837
838 $form = $this->initInfoEditor();
839 $this->tpl->setContent($form->getHTML());
840 }
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.

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

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

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

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

References $_GET, $DIC, $GLOBALS, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacsystem, $ret, $service, 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(), and ilContainerGUI\showPermanentLink().

+ Here is the call graph for this function:

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

returns all local roles [role_id] => title

Returns
array

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

2080 {
2081 $local_roles = $this->object->getLocalGroupRoles(false);
2082 $grp_member = $this->object->getDefaultMemberRole();
2083 $grp_roles = array();
2084
2085 //put the group member role to the top of the crs_roles array
2086 if (in_array($grp_member, $local_roles)) {
2087 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2088 unset($local_roles[$grp_roles[$grp_member]]);
2089 }
2090
2091 foreach ($local_roles as $title => $role_id) {
2092 $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
2093 }
2094 return $grp_roles;
2095 }
static _getTranslation($a_role_title)

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

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

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

References Vendor\Package\$c, $DIC, $ilSetting, $ilUser, 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 1226 of file class.ilObjGroupGUI.php.

1227 {
1228 $this->ctrl->setCmd("showSummary");
1229 $this->ctrl->setCmdClass("ilinfoscreengui");
1230 $this->infoScreen();
1231 }

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

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

1997 {
1998 global $DIC;
1999
2000 $ilSetting = $DIC['ilSetting'];
2001 $ilUser = $DIC['ilUser'];
2002
2003 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
2004
2005 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
2006 if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
2007 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
2009 $noti = new ilMembershipNotifications($this->ref_id);
2010 if (!$noti->isCurrentUserActive()) {
2011 $lg->addHeaderIcon(
2012 "not_icon",
2013 ilUtil::getImagePath("notification_off.svg"),
2014 $this->lng->txt("grp_notification_deactivated")
2015 );
2016
2017 $this->ctrl->setParameter($this, "grp_ntf", 1);
2018 $caption = "grp_activate_notification";
2019 } else {
2020 $lg->addHeaderIcon(
2021 "not_icon",
2022 ilUtil::getImagePath("notification_on.svg"),
2023 $this->lng->txt("grp_notification_activated")
2024 );
2025
2026 $this->ctrl->setParameter($this, "grp_ntf", 0);
2027 $caption = "grp_deactivate_notification";
2028 }
2029
2030 if ($noti->canCurrentUserEdit()) {
2031 $lg->addCustomCommand(
2032 $this->ctrl->getLinkTarget($this, "saveNotification"),
2033 $caption
2034 );
2035 }
2036
2037 $this->ctrl->setParameter($this, "grp_ntf", "");
2038 }
2039 }
2040
2041 return $lg;
2042 }
Membership notification settings.

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

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

@access protected

Returns

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

849 {
850 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
851 $form = new ilPropertyFormGUI();
852 $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
853 $form->setTitle($this->lng->txt('grp_general_informations'));
854 $form->addCommandButton('updateInfo', $this->lng->txt('save'));
855 $form->addCommandButton('cancel', $this->lng->txt('cancel'));
856
857 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
858 $area->setInfo($this->lng->txt('grp_information_info'));
859 $area->setValue($this->object->getInformation());
860 $area->setRows(8);
861 $area->setCols(80);
862 $form->addItem($area);
863
864 return $form;
865 }
This class represents a text area property in a property form.

Referenced by editInfoObject().

+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

2101 {
2102 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2103 }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group @access public

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

979 {
980 global $DIC;
981
982 $ilUser = $DIC['ilUser'];
983
984 $this->checkPermission('leave');
985
986 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
987 if ($part->isLastAdmin($ilUser->getId())) {
988 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
989 $this->viewObject();
990 return false;
991 }
992
993 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
994
995 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
996 $cgui = new ilConfirmationGUI();
997 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
998 $cgui->setFormAction($this->ctrl->getFormAction($this));
999 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1000 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1001 $this->tpl->setContent($cgui->getHTML());
1002 }
Confirmation screen class.
viewObject()
viewObject container presentation for "administration -> repository, trash, permissions"

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

1430 {
1431 $GLOBALS['DIC']['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1432 }

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

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

1964 {
1965 global $DIC;
1966
1967 $rbacsystem = $DIC['rbacsystem'];
1968 if (!$this->getCreationMode()) {
1969 /*
1970 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1971 $settings = ilMemberViewSettings::getInstance();
1972 if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
1973 {
1974 $settings->setContainer($this->object->getRefId());
1975 $rbacsystem->initMemberView();
1976 }
1977 */
1978 }
1979 parent::prepareOutput($a_show_subobjects);
1980 }

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

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

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

426 {
427 global $DIC;
428
429 $ilTabs = $DIC['ilTabs'];
430
431 $ilTabs->activateTab("view_content");
432 $ret = parent::renderObject();
433 return $ret;
434 }

References $DIC, and $ret.

Referenced by executeCommand(), and viewObject().

+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

803 {
804 global $DIC;
805
806 $ilCtrl = $DIC['ilCtrl'];
807 $ilUser = $DIC['ilUser'];
808
809 $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
810 $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
811 $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
812 $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
813 $this->object->update();
814
815 $ilCtrl->redirect($this, "editMapSettings");
816 }
$_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 1411 of file class.ilObjGroupGUI.php.

1412 {
1413 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1414 $noti = new ilMembershipNotifications($this->ref_id);
1415 if ($noti->canCurrentUserEdit()) {
1416 if ((bool) $_REQUEST["grp_ntf"]) {
1417 $noti->activateUser();
1418 } else {
1419 $noti->deactivateUser();
1420 }
1421 }
1422 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1423 $this->ctrl->redirect($this, "");
1424 }

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

Set return point for side column actions.

Reimplemented from ilContainerGUI.

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

2109 {
2110 $this->ctrl->setReturn($this, "view");
2111 }

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

@access protected

Parameters

return

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

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

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

1011 {
1012 global $DIC;
1013
1014 $ilUser = $DIC['ilUser'];
1015 $tree = $DIC['tree'];
1016 $ilCtrl = $DIC['ilCtrl'];
1017
1018 $this->checkPermission('leave');
1019
1020 $this->object->members_obj->delete($ilUser->getId());
1021
1022 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1023 $this->object->members_obj->sendNotification(
1025 $ilUser->getId()
1026 );
1027 $this->object->members_obj->sendNotification(
1029 $ilUser->getId()
1030 );
1031
1032 ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'), true);
1033 $ilCtrl->setParameterByClass(
1034 "ilrepositorygui",
1035 "ref_id",
1036 $tree->getParentId($this->object->getRefId())
1037 );
1038 $ilCtrl->redirectByClass("ilrepositorygui", "");
1039 }

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

541 {
542 include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
544 $this->object->getRefId(),
545 (int) $_REQUEST['grp_type']
546 );
547
548 ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
549 $this->ctrl->redirect($this, 'edit');
550 }
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 873 of file class.ilObjGroupGUI.php.

874 {
875 $this->checkPermission('manage_members');
876
877 $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
878 $this->object->update();
879
880 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
881 $this->editInfoObject();
882 return true;
883 }
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 558 of file class.ilObjGroupGUI.php.

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

References $_POST, $DIC, $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(), language(), 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 ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Exceptions

ilObjectException

Reimplemented from ilObjectGUI.

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

381 {
382 global $DIC;
383
384 $tree = $DIC['tree'];
385 $rbacsystem = $DIC['rbacsystem'];
386 $ilUser = $DIC['ilUser'];
387
388 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
390 $ilUser->getId(),
391 $this->object->getId(),
392 $this->object->getRefId(),
393 'grp'
394 );
395
397 $this->object->getId(),
398 $this->object->getId(),
399 'grp'
400 );
401
402
403 if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
404 parent::viewObject();
405 return true;
406 }
407
408 if (!$this->checkAgreement()) {
409 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
410 $this->tabs_gui->setTabActive('view_content');
411 $this->ctrl->setReturn($this, 'view');
412 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
413 $this->ctrl->setCmdClass(get_class($agreement));
414 $this->ctrl->forwardCommand($agreement);
415 return true;
416 }
417
418 $this->tabs_gui->setTabActive('view_content');
419 $this->renderObject();
420 }
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: