ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjGroupGUI Class Reference

Class ilObjGroupGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
 Constructor @access public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 viewObject ()
 list childs of current object More...
 
 renderObject ()
 Render group. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container. More...
 
 saveObject ()
 save object More...
 
 editObject ()
 Edit object. More...
 
 updateGroupTypeObject ()
 change group type More...
 
 updateObject ()
 update GroupObject More...
 
 editGroupIconsObject ($a_form=null)
 edit container icons More...
 
 initGroupIconsForm ()
 
 updateGroupIconsObject ()
 update group icons More...
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 membersMapObject ()
 Members map. More...
 
 editInfoObject ()
 edit info More...
 
 updateInfoObject ()
 update info More...
 
 membersGalleryObject ()
 Builds a group members gallery as a layer of left-floating images. More...
 
 readMemberData ($ids, $role='admin', $selected_columns=null)
 
 membersObject ()
 edit members More...
 
 assignSubscribersObject ()
 assign subscribers More...
 
 refuseSubscribersObject ()
 refuse subscribers More...
 
 assignFromWaitingListObject ()
 add from waiting list More...
 
 refuseFromListObject ()
 refuse from waiting list More...
 
 confirmDeleteMembersObject ()
 delete selected members More...
 
 deleteMembersObject ()
 delete members More...
 
 sendMailToSelectedUsersObject ()
 show send mail More...
 
 setShowHidePrefs ()
 set preferences (show/hide tabel content) More...
 
 editMemberObject ()
 edit one member More...
 
 editMembersObject ()
 edit member(s) More...
 
 updateMembersObject ()
 update members More...
 
 updateStatusObject ()
 update status More...
 
 canceledObject ()
 canceledObject is called when operation is canceled, method links back @access public More...
 
 leaveObject ()
 leave Group @access public More...
 
 unsubscribeObject ()
 unsubscribe from group More...
 
 assignMemberObject ()
 displays confirmation formular with users that shall be assigned to group @access public More...
 
 addUserObject ($user_ids, $a_type)
 displays confirmation formular with users that shall be assigned to group @access public More...
 
 mailMembersObject ()
 Form for mail to group members. More...
 
 refuseApplicantsObject ()
 adds applicant to group as member @access public More...
 
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 importFileObject2 ()
 
 exportObject ()
 Creates the output form for group member export. More...
 
 exportMembersObject ()
 Exports group members to Microsoft Excel file. More...
 
 cleanString ($str)
 Clean output string from german umlauts. More...
 
 infoScreenObject ()
 set sub tabs More...
 
 infoScreen ()
 show information screen More...
 
 saveNotificationObject ()
 :TEMP: Save notification setting (from infoscreen) More...
 
 load ()
 load settings More...
 
 prepareOutput ()
 Handle member view. More...
 
 printMembersObject ()
 
 getAttendanceListUserData ($a_user_id)
 
 printMembersOutputObject ()
 
 confirmRefuseSubscribersObject ()
 
 confirmAssignSubscribersObject ()
 
 confirmRefuseFromListObject ()
 
 confirmAssignFromWaitingListObject ()
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 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...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor @access public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings ($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 Item ListGUI for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ($a_initial_call=false)
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 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

 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initInfoEditor ()
 init info editor More...
 
 initForm ($a_mode='edit')
 init create/edit form More...
 
 loadDate ($a_field)
 load date More...
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 createMailSignature ()
 Create a course mail signature. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 initAttendanceList ()
 Init attendance list object. More...
 
 getLocalRoles ()
 returns all local roles [role_id] => title More...
 
 addMailToMemberButton ($ilToolbar, $back_cmd=null, $a_separator=false)
 add Mail to Member button to toolbar More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 

Private Member Functions

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

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor @access public.

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

32 {
33 $this->type = "grp";
34 $this->ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
35
36 $this->lng->loadLanguageModule('grp');
37 }
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor @access public.

References ilContainerGUI\ilContainerGUI().

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

2459 {
2460 global $ilAccess, $ilErr, $lng,$ilUser;
2461
2462 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2463 if(substr($a_add,0,5) == 'rcode')
2464 {
2465 if($ilUser->getId() == ANONYMOUS_USER_ID)
2466 {
2467 // Redirect to login for anonymous
2469 "login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
2470 $ilUser->getCurrentLanguage()
2471 );
2472 }
2473
2474 // Redirects to target location after assigning user to course
2476 $a_target,
2478 substr($a_add,5)
2479 );
2480 }
2481
2482 if ($a_add == "mem" && $ilAccess->checkAccess("write", "", $a_target))
2483 {
2484 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
2485 }
2486
2487 if ($ilAccess->checkAccess("read", "", $a_target))
2488 {
2490 }
2491 else
2492 {
2493 // to do: force flat view
2494 if ($ilAccess->checkAccess("visible", "", $a_target))
2495 {
2496 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
2497 }
2498 else
2499 {
2500 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
2501 {
2502 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
2505 }
2506 }
2507 }
2508 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2509 }
$_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)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15

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

+ Here is the call graph for this function:

◆ addMailToMemberButton()

ilObjGroupGUI::addMailToMemberButton (   $ilToolbar,
  $back_cmd = null,
  $a_separator = false 
)
protected

add Mail to Member button to toolbar

Parameters
ilToolbarGUI$ilToolbar
string$back_cmd
bool$a_separator

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

3202 {
3203 global $ilAccess, $ilUser, $rbacsystem;
3204 include_once 'Services/Mail/classes/class.ilMail.php';
3205 $mail = new ilMail($ilUser->getId());
3206
3207 if(
3208 ($ilAccess->checkAccess('write','',$this->object->getRefId()) or
3209 $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) and
3210 $rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId()))
3211 {
3212
3213 if($a_separator)
3214 {
3215 $ilToolbar->addSeparator();
3216 }
3217
3218 if($back_cmd)
3219 {
3220 $this->ctrl->setParameter($this, "back_cmd", $back_cmd);
3221 }
3222
3223 $ilToolbar->addButton($this->lng->txt("mail_members"),
3224 $this->ctrl->getLinkTarget($this,'mailMembers'));
3225 }
3226 }
Class Mail this class handles base functions for mail handling.
const MAIL_ALLOWED_ALL

References $ilUser, and ilObjGroup\MAIL_ALLOWED_ALL.

Referenced by membersGalleryObject(), and membersObject().

+ Here is the caller graph for this function:

◆ addUserObject()

ilObjGroupGUI::addUserObject (   $user_ids,
  $a_type 
)

displays confirmation formular with users that shall be assigned to group @access public

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

1840 {
1841 if (empty($user_ids[0]))
1842 {
1843 $GLOBALS['lng']->loadLanguageModule('search');
1844 ilUtil::sendFailure($this->lng->txt('search_err_user_not_exist'),true);
1845 return false;
1846 }
1847
1848 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1849 $assigned = FALSE;
1850 foreach((array) $user_ids as $new_member)
1851 {
1852 if($part->isAssigned($new_member))
1853 {
1854 continue;
1855 }
1856 switch($a_type)
1857 {
1858 case $this->object->getDefaultAdminRole():
1859 $part->add($new_member, IL_GRP_ADMIN);
1860 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1861 $part->sendNotification(
1863 $new_member
1864 );
1865 $assigned = TRUE;
1866 break;
1867
1868 default:
1869 $part->add($new_member, IL_GRP_MEMBER);
1870 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1871 $part->sendNotification(
1873 $new_member
1874 );
1875 $assigned = TRUE;
1876 break;
1877 }
1878 }
1879
1880 if($assigned)
1881 {
1882 ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
1883 }
1884 else
1885 {
1886 ilUtil::sendSuccess($this->lng->txt('grp_users_already_assigned'),TRUE);
1887 }
1888 $this->ctrl->redirect($this,'members');
1889 }
const IL_GRP_MEMBER
const IL_GRP_ADMIN
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$GLOBALS['ct_recipient']

References $GLOBALS, ilGroupParticipants\_getInstanceByObjId(), IL_GRP_ADMIN, IL_GRP_MEMBER, ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER.

+ Here is the call graph for this function:

◆ assignFromWaitingListObject()

ilObjGroupGUI::assignFromWaitingListObject ( )

add from waiting list

@access public

Parameters

return

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

1334 {
1335 $this->checkPermission('write');
1336
1337 if(!count($_POST["waiting"]))
1338 {
1339 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
1340 $this->membersObject();
1341 return false;
1342 }
1343
1344 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1345 $waiting_list = new ilGroupWaitingList($this->object->getId());
1346
1347 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1348
1349 $added_users = 0;
1350 foreach($_POST["waiting"] as $user_id)
1351 {
1352 if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
1353 {
1354 continue;
1355 }
1356 if($this->object->members_obj->isAssigned($user_id))
1357 {
1358 continue;
1359 }
1360 $this->object->members_obj->add($user_id,IL_GRP_MEMBER);
1361 $this->object->members_obj->sendNotification(
1363 $user_id
1364 );
1365 $waiting_list->removeFromList($user_id);
1366
1367 ++$added_users;
1368 }
1369 if($added_users)
1370 {
1371 ilUtil::sendSuccess($this->lng->txt("grp_users_added"), true);
1372 $this->ctrl->redirect($this, "members");
1373
1374 return true;
1375 }
1376 else
1377 {
1378 ilUtil::sendFailure($this->lng->txt("grp_users_already_assigned"));
1379 $this->searchObject();
1380
1381 return false;
1382 }
1383 }
Waiting list for groups.
membersObject()
edit members
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST['username']
Definition: cron.php:12

References $_POST, ilObjectGUI\checkPermission(), ilObjectFactory\getInstanceByObjId(), IL_GRP_MEMBER, membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ assignMemberObject()

ilObjGroupGUI::assignMemberObject ( )

displays confirmation formular with users that shall be assigned to group @access public

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

1812 {
1813 $user_ids = $_POST["id"];
1814
1815 if (empty($user_ids[0]))
1816 {
1817 // TODO: jumps back to grp content. go back to last search result
1818 $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1819 }
1820
1821 foreach ($user_ids as $new_member)
1822 {
1823 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1824 {
1825 $this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1826 }
1827 }
1828
1829 unset($_SESSION["saved_post"]);
1830
1831 ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
1832 $this->ctrl->redirect($this,'members');
1833 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

References $_POST, $_SESSION, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ assignSubscribersObject()

ilObjGroupGUI::assignSubscribersObject ( )

assign subscribers

@access public

Returns

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

1263 {
1265
1266 $this->checkPermission('write');
1267
1268 if(!count($_POST['subscribers']))
1269 {
1270 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1271 $this->membersObject();
1272 return false;
1273 }
1274
1275 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1276 foreach($_POST['subscribers'] as $usr_id)
1277 {
1278 $this->object->members_obj->sendNotification(
1280 $usr_id
1281 );
1282
1283 $this->object->members_obj->add($usr_id,IL_GRP_MEMBER);
1284 $this->object->members_obj->deleteSubscriber($usr_id);
1285
1286 }
1287 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_assigned"),true);
1288 $this->ctrl->redirect($this,'members');
1289 return true;
1290 }
global $ilIliasIniFile

References $_POST, $ilIliasIniFile, $ilUser, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), IL_GRP_MEMBER, membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ canceledObject()

ilObjGroupGUI::canceledObject ( )

canceledObject is called when operation is canceled, method links back @access public

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

1735 {
1736 $return_location = $_GET["cmd_return_location"];
1737 if (strcmp($return_location, "") == 0)
1738 {
1739 $return_location = "";
1740 }
1741
1742 $this->ctrl->redirect($this, $return_location);
1743 }

References $_GET, and ilObjectGUI\$return_location.

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

@access private

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

2971 {
2972 global $ilUser,$ilAccess;
2973
2974 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2975 {
2976 return true;
2977 }
2978
2979 // Disable aggrement if is not member of group
2980 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2981 {
2982 return true;
2983 }
2984
2985 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
2986 if(ilMemberViewSettings::getInstance()->isActive())
2987 {
2988 return true;
2989 }
2990
2991 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2992 include_once('Services/Membership/classes/class.ilMemberAgreement.php');
2994
2995 // Check agreement
2996 if(($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2997 and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
2998 {
2999 return false;
3000 }
3001 // Check required fields
3002 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
3003 if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
3004 {
3005 return false;
3006 }
3007 return true;
3008 }
static _hasFields($a_container_id)
Check if there are any define fields.
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
static getInstance()
Get instance.
static _getInstance()
Get instance of ilPrivacySettings.

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

Referenced by viewObject().

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

◆ cleanString()

ilObjGroupGUI::cleanString (   $str)

Clean output string from german umlauts.

Clean output string from german umlauts. Replaces �� -> ae etc.

Parameters
string$strString to clean
Returns
string Cleaned string

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

2303 {
2304 return str_replace(array("��","��","��","��","��","��","��"), array("ae","oe","ue","ss","Ae","Oe","Ue"), $str);
2305 }

Referenced by exportMembersObject().

+ Here is the caller graph for this function:

◆ confirmAssignFromWaitingListObject()

ilObjGroupGUI::confirmAssignFromWaitingListObject ( )

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

3345 {
3346 if(!is_array($_POST["waiting"]))
3347 {
3348 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
3349 $this->membersObject();
3350
3351 return false;
3352 }
3353 $this->checkPermission('write');
3354 $this->setSubTabs('members');
3355 $this->tabs_gui->setTabActive('members');
3356 $this->tabs_gui->setSubTabActive('grp_edit_members');
3357
3358 include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
3359 $c_gui = new ilConfirmationGUI();
3360
3361 // set confirm/cancel commands
3362 $c_gui->setFormAction($this->ctrl->getFormAction($this, "assignFromWaitingList"));
3363 $c_gui->setHeaderText($this->lng->txt("info_assign_sure"));
3364 $c_gui->setCancel($this->lng->txt("cancel"), "members");
3365 $c_gui->setConfirm($this->lng->txt("confirm"), "assignFromWaitingList");
3366
3367 foreach($_POST["waiting"] as $waiting)
3368 {
3369 $name = ilObjUser::_lookupName($waiting);
3370
3371 $c_gui->addItem('waiting[]',
3372 $name['user_id'],
3373 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
3374 ilUtil::getImagePath('icon_usr.svg'));
3375 }
3376
3377 $this->tpl->setContent($c_gui->getHTML());
3378 return true;
3379 }
Confirmation screen class.
setSubTabs($a_tab)
set sub tabs
static _lookupName($a_user_id)
lookup user name
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_POST, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), ilUtil\sendFailure(), and setSubTabs().

+ Here is the call graph for this function:

◆ confirmAssignSubscribersObject()

ilObjGroupGUI::confirmAssignSubscribersObject ( )

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

3268 {
3269 if(!is_array($_POST["subscribers"]))
3270 {
3271 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
3272 $this->membersObject();
3273
3274 return false;
3275 }
3276 $this->checkPermission('write');
3277 $this->setSubTabs('members');
3278 $this->tabs_gui->setTabActive('members');
3279 $this->tabs_gui->setSubTabActive('grp_edit_members');
3280
3281 include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
3282 $c_gui = new ilConfirmationGUI();
3283
3284 // set confirm/cancel commands
3285 $c_gui->setFormAction($this->ctrl->getFormAction($this, "assignSubscribers"));
3286 $c_gui->setHeaderText($this->lng->txt("info_assign_sure"));
3287 $c_gui->setCancel($this->lng->txt("cancel"), "members");
3288 $c_gui->setConfirm($this->lng->txt("confirm"), "assignSubscribers");
3289
3290 foreach($_POST["subscribers"] as $subscribers)
3291 {
3292 $name = ilObjUser::_lookupName($subscribers);
3293
3294 $c_gui->addItem('subscribers[]',
3295 $name['user_id'],
3296 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
3297 ilUtil::getImagePath('icon_usr.svg'));
3298 }
3299
3300 $this->tpl->setContent($c_gui->getHTML());
3301 return true;
3302 }

References $_POST, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), ilUtil\sendFailure(), and setSubTabs().

+ Here is the call graph for this function:

◆ confirmDeleteMembersObject()

ilObjGroupGUI::confirmDeleteMembersObject ( )

delete selected members

@access public

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

1426 {
1427 $this->checkPermission('write');
1428
1429 $participants_to_delete = (array) array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
1430
1431 if(!count($participants_to_delete))
1432 {
1433 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1434 $this->membersObject();
1435 return false;
1436 }
1437
1438 // Check last admin
1439 $admins = (array) ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins();
1440
1441 $admins_after = (array) array_diff($admins, $participants_to_delete);
1442 if(!count($admins_after) and count($admins))
1443 {
1444 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
1445 $this->membersObject();
1446 return false;
1447 }
1448
1449 $this->setSubTabs('members');
1450 $this->tabs_gui->setTabActive('members');
1451 $this->tabs_gui->setSubTabActive('grp_edit_members');
1452
1453 include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
1454 $confirm = new ilConfirmationGUI();
1455 $confirm->setFormAction($this->ctrl->getFormAction($this,'deleteMembers'));
1456 $confirm->setHeaderText($this->lng->txt('grp_dismiss_member'));
1457 $confirm->setConfirm($this->lng->txt('confirm'),'deleteMembers');
1458 $confirm->setCancel($this->lng->txt('cancel'),'members');
1459
1460 foreach($this->readMemberData(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles'])) as $participants)
1461 {
1462 $confirm->addItem('participants[]',
1463 $participants['usr_id'],
1464 $participants['lastname'].', '.$participants['firstname'].' ['.$participants['login'].']',
1465 ilUtil::getImagePath('icon_usr.svg'));
1466 }
1467
1468 $this->tpl->setContent($confirm->getHTML());
1469 }
readMemberData($ids, $role='admin', $selected_columns=null)

References $_POST, ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), readMemberData(), ilUtil\sendFailure(), and setSubTabs().

+ Here is the call graph for this function:

◆ confirmRefuseFromListObject()

ilObjGroupGUI::confirmRefuseFromListObject ( )

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

3305 {
3306 if(!is_array($_POST["waiting"]))
3307 {
3308 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
3309 $this->membersObject();
3310
3311 return false;
3312 }
3313
3314 $this->lng->loadLanguageModule('mmbr');
3315
3316 $this->checkPermission('write');
3317 $this->setSubTabs('members');
3318 $this->tabs_gui->setTabActive('members');
3319 $this->tabs_gui->setSubTabActive('grp_edit_members');
3320
3321 include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
3322 $c_gui = new ilConfirmationGUI();
3323
3324 // set confirm/cancel commands
3325 $c_gui->setFormAction($this->ctrl->getFormAction($this, "refuseFromList"));
3326 $c_gui->setHeaderText($this->lng->txt("info_refuse_sure"));
3327 $c_gui->setCancel($this->lng->txt("cancel"), "members");
3328 $c_gui->setConfirm($this->lng->txt("confirm"), "refuseFromList");
3329
3330 foreach($_POST["waiting"] as $waiting)
3331 {
3332 $name = ilObjUser::_lookupName($waiting);
3333
3334 $c_gui->addItem('waiting[]',
3335 $name['user_id'],
3336 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
3337 ilUtil::getImagePath('icon_usr.svg'));
3338 }
3339
3340 $this->tpl->setContent($c_gui->getHTML());
3341 return true;
3342 }

References $_POST, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), ilUtil\sendFailure(), and setSubTabs().

+ Here is the call graph for this function:

◆ confirmRefuseSubscribersObject()

ilObjGroupGUI::confirmRefuseSubscribersObject ( )

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

3229 {
3230 if(!is_array($_POST["subscribers"]))
3231 {
3232 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
3233 $this->membersObject();
3234
3235 return false;
3236 }
3237
3238 $this->lng->loadLanguageModule('mmbr');
3239
3240 $this->checkPermission('write');
3241 $this->setSubTabs('members');
3242 $this->tabs_gui->setTabActive('members');
3243 $this->tabs_gui->setSubTabActive('grp_edit_members');
3244
3245 include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
3246 $c_gui = new ilConfirmationGUI();
3247
3248 // set confirm/cancel commands
3249 $c_gui->setFormAction($this->ctrl->getFormAction($this, "refuseSubscribers"));
3250 $c_gui->setHeaderText($this->lng->txt("info_refuse_sure"));
3251 $c_gui->setCancel($this->lng->txt("cancel"), "members");
3252 $c_gui->setConfirm($this->lng->txt("confirm"), "refuseSubscribers");
3253
3254 foreach($_POST["subscribers"] as $subscribers)
3255 {
3256 $name = ilObjUser::_lookupName($subscribers);
3257
3258 $c_gui->addItem('subscribers[]',
3259 $name['user_id'],
3260 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
3261 ilUtil::getImagePath('icon_usr.svg'));
3262 }
3263
3264 $this->tpl->setContent($c_gui->getHTML());
3265 }

References $_POST, ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), ilUtil\sendFailure(), and setSubTabs().

+ Here is the call graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

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

3038 {
3039 $link = chr(13).chr(10).chr(13).chr(10);
3040 $link .= $this->lng->txt('grp_mail_permanent_link');
3041 $link .= chr(13).chr(10).chr(13).chr(10);
3042 include_once 'Services/Link/classes/class.ilLink.php';
3043 $link .= ilLink::_getLink($this->object->getRefId());
3044 return rawurlencode(base64_encode($link));
3045 }

References ilLink\_getLink().

Referenced by mailMembersObject(), and sendMailToSelectedUsersObject().

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

◆ deleteMembersObject()

ilObjGroupGUI::deleteMembersObject ( )

delete members

@access public

Parameters

return

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

1479 {
1480 $this->checkPermission('write');
1481
1482 if(!count($_POST['participants']))
1483 {
1484 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1485 $this->membersObject();
1486 return true;
1487 }
1488
1489 $this->object->members_obj->deleteParticipants($_POST['participants']);
1490
1491 // Send notification
1492 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1493 foreach($_POST['participants'] as $part)
1494 {
1495 $this->object->members_obj->sendNotification(
1497 $part
1498 );
1499 }
1500
1501
1502 ilUtil::sendSuccess($this->lng->txt("grp_msg_membership_annulled"), true);
1503 $this->ctrl->redirect($this, "members");
1504 return true;
1505 }

References $_POST, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_DISMISS_MEMBER.

+ Here is the call graph for this function:

◆ editGroupIconsObject()

ilObjGroupGUI::editGroupIconsObject (   $a_form = null)

edit container icons

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

586 {
587 global $tpl;
588
589 $this->checkPermission('write');
590
591 $this->setSubTabs("settings");
592 $this->tabs_gui->setTabActive('settings');
593 $this->tabs_gui->setSubTabActive('grp_icon_settings');
594
595 if(!$a_form)
596 {
597 $a_form = $this->initGroupIconsForm();
598 }
599
600 $tpl->setContent($a_form->getHTML());
601 }

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

Referenced by updateGroupIconsObject().

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

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

@access public

Returns

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

769 {
770 global $ilErr,$ilAccess;
771
772 $this->checkPermission('write');
773
774 $this->setSubTabs('settings');
775 $this->tabs_gui->setTabActive('settings');
776 $this->tabs_gui->setSubTabActive('grp_info_settings');
777
778 $this->initInfoEditor();
779 $this->tpl->setContent($this->form->getHTML());
780 }
initInfoEditor()
init info editor

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

653 {
654 global $ilUser, $ilCtrl, $ilUser, $ilAccess;
655
656 $this->setSubTabs("settings");
657 $this->tabs_gui->setTabActive('settings');
658 $this->tabs_gui->setSubTabActive('grp_map_settings');
659
660 include_once('./Services/Maps/classes/class.ilMapUtil.php');
661 if (!ilMapUtil::isActivated() ||
662 !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
663 {
664 return;
665 }
666
667 $latitude = $this->object->getLatitude();
668 $longitude = $this->object->getLongitude();
669 $zoom = $this->object->getLocationZoom();
670
671 // Get Default settings, when nothing is set
672 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
673 {
675 $latitude = $def["latitude"];
676 $longitude = $def["longitude"];
677 $zoom = $def["zoom"];
678 }
679
680
681 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
682 $form = new ilPropertyFormGUI();
683 $form->setFormAction($ilCtrl->getFormAction($this));
684
685 $form->setTitle($this->lng->txt("grp_map_settings"));
686
687 // enable map
688 $public = new ilCheckboxInputGUI($this->lng->txt("grp_enable_map"),
689 "enable_map");
690 $public->setValue("1");
691 $public->setChecked($this->object->getEnableGroupMap());
692 $form->addItem($public);
693
694 // map location
695 $loc_prop = new ilLocationInputGUI($this->lng->txt("grp_map_location"),
696 "location");
697 $loc_prop->setLatitude($latitude);
698 $loc_prop->setLongitude($longitude);
699 $loc_prop->setZoom($zoom);
700 $form->addItem($loc_prop);
701
702 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
703
704 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
705 }
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 $ilCtrl, $ilUser, ilMapUtil\getDefaultSettings(), ilMapUtil\isActivated(), and setSubTabs().

+ Here is the call graph for this function:

◆ editMemberObject()

ilObjGroupGUI::editMemberObject ( )

edit one member

@access public

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

1583 {
1584 $_POST['members'] = array((int) $_GET['member_id']);
1585 $this->editMembersObject();
1586 }
editMembersObject()
edit member(s)

References $_GET, $_POST, and editMembersObject().

+ Here is the call graph for this function:

◆ editMembersObject()

ilObjGroupGUI::editMembersObject ( )

edit member(s)

@access public

Returns

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

1595 {
1596 $this->checkPermission('write');
1597
1598 $post_participants = array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
1599 $real_participants = ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getParticipants();
1600 $participants = array_intersect((array) $post_participants, (array) $real_participants);
1601
1602 if(!count($participants))
1603 {
1604 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1605 $this->membersObject();
1606 return false;
1607 }
1608
1609 $this->setSubTabs('members');
1610 $this->tabs_gui->setTabActive('members');
1611 $this->tabs_gui->setSubTabActive('grp_edit_members');
1612
1613 include_once('./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1614 $table_gui = new ilGroupEditParticipantsTableGUI($this);
1615 $table_gui->setTitle($this->lng->txt('grp_mem_change_status'),'icon_usr.svg',$this->lng->txt('grp_mem_change_status'));
1616 $table_gui->setData($this->readMemberData($participants));
1617
1618 $this->tpl->setContent($table_gui->getHTML());
1619 return true;
1620 }

References $_POST, ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), membersObject(), readMemberData(), ilUtil\sendFailure(), and setSubTabs().

Referenced by editMemberObject(), and updateMembersObject().

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

◆ editObject()

ilObjGroupGUI::editObject ( )

Edit object.

@access public

Parameters
boolshow warning, if group type has been changed
Returns

Reimplemented from ilObjectGUI.

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

450 {
451 $this->checkPermission("write");
452
453 $this->setSubTabs('settings');
454 $this->tabs_gui->setTabActive('settings');
455 $this->tabs_gui->setSubTabActive('grp_settings');
456
457 $this->initForm('edit');
458
459 $this->tpl->setVariable('ADM_CONTENT',$this->form->getHTML());
460 }
initForm($a_mode='edit')
init create/edit form

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

Referenced by updateObject().

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

◆ executeCommand()

& ilObjGroupGUI::executeCommand ( )

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

Reimplemented from ilContainerGUI.

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

40 {
41 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilCtrl;
42
43 $next_class = $this->ctrl->getNextClass($this);
44 $cmd = $this->ctrl->getCmd();
45 $this->prepareOutput();
46
47 // show repository tree
48 $this->showRepTree(true);
49
50 // add entry to navigation history
51 if (!$this->getCreationMode() &&
52 $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
53 {
54 include_once("./Services/Link/classes/class.ilLink.php");
55 $ilNavigationHistory->addItem($_GET["ref_id"],
56 ilLink::_getLink($_GET["ref_id"], "grp"), "grp");
57 }
58
59 switch($next_class)
60 {
61 case 'ilgroupregistrationgui':
62 $this->ctrl->setReturn($this,'');
63 $this->tabs_gui->setTabActive('join');
64 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
65 $registration = new ilGroupRegistrationGUI($this->object);
66 $this->ctrl->forwardCommand($registration);
67 break;
68
69 case 'ilpermissiongui':
70 $this->tabs_gui->setTabActive('perm_settings');
71 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
72 $perm_gui =& new ilPermissionGUI($this);
73 $ret =& $this->ctrl->forwardCommand($perm_gui);
74 break;
75
76 case 'ilrepositorysearchgui':
77
78 if(!$this->checkPermissionBool('write'))
79 {
80 $GLOBALS['ilErr']->raiseError($GLOBALS['lng']->txt('permission_denied'), $GLOBALS['ilErr']->WARNING);
81 }
82 include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
83 $rep_search =& new ilRepositorySearchGUI();
84 $rep_search->setCallback($this,
85 'addUserObject',
86 $this->getLocalRoles()
87 );
88
89 // Set tabs
90 $this->tabs_gui->setTabActive('members');
91 $this->ctrl->setReturn($this,'members');
92 $ret =& $this->ctrl->forwardCommand($rep_search);
93 $this->setSubTabs('members');
94 $this->tabs_gui->setSubTabActive('members');
95 break;
96
97 case "ilinfoscreengui":
98 $ret =& $this->infoScreen();
99 break;
100
101 case "illearningprogressgui":
102 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
103
105 $this->object->getRefId(),
106 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
107 $this->ctrl->forwardCommand($new_gui);
108 $this->tabs_gui->setTabActive('learning_progress');
109 break;
110
111 case 'ilobjcoursegroupinggui':
112 $this->setSubTabs('settings');
113
114 include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
115 $this->ctrl->setReturn($this,'edit');
116 $crs_grp_gui =& new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
117 $this->ctrl->forwardCommand($crs_grp_gui);
118
119 $this->tabs_gui->setTabActive('settings');
120 $this->tabs_gui->setSubTabActive('groupings');
121 break;
122
123 case 'ilcoursecontentgui':
124
125 include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
126 $course_content_obj = new ilCourseContentGUI($this);
127 $this->ctrl->forwardCommand($course_content_obj);
128 break;
129
130 case 'ilpublicuserprofilegui':
131 require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
132 $this->setSubTabs('members');
133 $this->tabs_gui->setTabActive('group_members');
134 $this->tabs_gui->setSubTabActive('grp_members_gallery');
135 $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
136 $profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, "membersGallery"));
137 $html = $this->ctrl->forwardCommand($profile_gui);
138 $this->tpl->setVariable("ADM_CONTENT", $html);
139 break;
140
141 case "ilcolumngui":
142 $this->tabs_gui->setTabActive('none');
143 $this->checkPermission("read");
144 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
145 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
146 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
147 $this->renderObject();
148 break;
149
150 // container page editing
151 case "ilcontainerpagegui":
152 $ret = $this->forwardToPageObject();
153 if ($ret != "")
154 {
155 $this->tpl->setContent($ret);
156 }
157 break;
158
159 case 'ilobjectcopygui':
160 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
161 $cp = new ilObjectCopyGUI($this);
162 $cp->setType('grp');
163 $this->ctrl->forwardCommand($cp);
164 break;
165
166 case "ilobjstylesheetgui":
167 $this->forwardToStyleSheet();
168 break;
169
170 case 'ilobjectcustomuserfieldsgui':
171 if(isset($_REQUEST['member_id']))
172 {
173 $this->ctrl->setReturn($this,'members');
174 }
175 include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
176 $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
177 $this->setSubTabs('settings');
178 $this->tabs_gui->setTabActive('settings');
179 $this->ctrl->forwardCommand($cdf_gui);
180 break;
181
182 case 'ilmemberagreementgui':
183 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
184 $this->ctrl->setReturn($this,'');
185 $this->tabs_gui->setTabActive('view_content');
186 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
187 $this->ctrl->forwardCommand($agreement);
188 break;
189
190 case 'ilexportgui':
191 $this->tabs_gui->setTabActive('export');
192 include_once './Services/Export/classes/class.ilExportGUI.php';
193 $exp = new ilExportGUI($this);
194 $exp->addFormat('xml');
195 $this->ctrl->forwardCommand($exp);
196 break;
197
198 case 'ilmemberexportgui':
199 include_once('./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
200
201 $this->setSubTabs('members');
202 $this->tabs_gui->setTabActive('members');
203 $this->tabs_gui->setSubTabActive('export_members');
204 $export = new ilMemberExportGUI($this->object->getRefId());
205 $this->ctrl->forwardCommand($export);
206 break;
207
208 case "ilcommonactiondispatchergui":
209 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
211 $this->ctrl->forwardCommand($gui);
212 break;
213
214 case 'ilobjectservicesettingsgui':
215 $this->ctrl->setReturn($this,'edit');
216 $this->setSubTabs("settings");
217 $this->tabs_gui->activateTab('settings');
218 $this->tabs_gui->activateSubTab('tool_settings');
219
220 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
221 $service = new ilObjectServiceSettingsGUI(
222 $this,
223 $this->object->getId(),
224 array(
226 ));
227 $this->ctrl->forwardCommand($service);
228 break;
229
230 case 'ilsessionoverviewgui':
231 $this->setSubTabs('members');
232 $this->tabs_gui->setTabActive('members');
233 $this->tabs_gui->setSubTabActive('events');
234
235 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
236 $prt = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
237
238 include_once('./Modules/Session/classes/class.ilSessionOverviewGUI.php');
239 $overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt);
240 $this->ctrl->forwardCommand($overview);
241 break;
242
243 default:
244
245 // check visible permission
246 if (!$this->getCreationMode() and
247 !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp') and
248 !$ilAccess->checkAccess('read','',$this->object->getRefId(),'grp') )
249 {
250 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
251 }
252
253 // #9401 - see also ilStartupGUI::_checkGoto()
254 if($cmd == 'infoScreenGoto')
255 {
256 if($this->object->isRegistrationEnabled())
257 {
258 $cmd = 'join';
259 }
260 else
261 {
262 $cmd = 'infoScreen';
263 }
264 }
265
266 // check read permission
267 if ((!$this->getCreationMode()
268 && !$rbacsystem->checkAccess('read',$this->object->getRefId()) && $cmd != 'infoScreen')
269 || $cmd == 'join')
270 {
271 // no join permission -> redirect to info screen
272 if (!$rbacsystem->checkAccess('join',$this->object->getRefId()))
273 {
274 $this->ctrl->redirect($this, "infoScreen");
275 }
276 else // no read -> show registration
277 {
278 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
279 $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
280 }
281 }
282 if(!$cmd)
283 {
284 $cmd = 'view';
285 }
286 $cmd .= 'Object';
287 $this->$cmd();
288 break;
289 }
290
291 $this->addHeaderAction();
292 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
showRepTree($a_initial_call=false)
Show tree.
forwardToStyleSheet()
Forward to style object.
Class ilCourseContentGUI.
Export User Interface Class.
GUI class for group registrations.
Class ilObjUserTrackingGUI.
Class ilObjCourseGroupingGUI.
renderObject()
Render group.
infoScreen()
show information screen
prepareOutput()
Handle member view.
getLocalRoles()
returns all local roles [role_id] => title
getContentStylePath($a_style_id)
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.
GUI class for service settings (calendar, notes, comments)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for public user profile presentation.
$cmd
Definition: sahs_server.php:35
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7

References $_GET, $_REQUEST, $cmd, $GLOBALS, $ilCtrl, $ilErr, $ilUser, $ret, ilGroupParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, prepareOutput(), renderObject(), setSubTabs(), and ilContainerGUI\showRepTree().

+ Here is the call graph for this function:

◆ exportMembersObject()

ilObjGroupGUI::exportMembersObject ( )

Exports group members to Microsoft Excel file.

Exports group members to Microsoft Excel file

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

2157 {
2158 $title = preg_replace("/\s/", "_", $this->object->getTitle());
2159 include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2160 $adapter = new ilExcelWriterAdapter("export_" . $title . ".xls");
2161 $workbook = $adapter->getWorkbook();
2162 // Creating a worksheet
2163 $format_bold =& $workbook->addFormat();
2164 $format_bold->setBold();
2165 $format_percent =& $workbook->addFormat();
2166 $format_percent->setNumFormat("0.00%");
2167 $format_datetime =& $workbook->addFormat();
2168 $format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
2169 $format_title =& $workbook->addFormat();
2170 $format_title->setBold();
2171 $format_title->setColor('black');
2172 $format_title->setPattern(1);
2173 $format_title->setFgColor('silver');
2174 $worksheet =& $workbook->addWorksheet();
2175 $column = 0;
2176 $profile_data = array("email", "gender", "firstname", "lastname", "person_title", "institution",
2177 "department", "street", "zipcode","city", "country", "phone_office", "phone_home", "phone_mobile",
2178 "fax", "matriculation");
2179 foreach ($profile_data as $data)
2180 {
2181 $worksheet->writeString(0, $column++, $this->cleanString($this->lng->txt($data)), $format_title);
2182 }
2183 $member_ids = $this->object->getGroupMemberIds();
2184 $row = 1;
2185 foreach ($member_ids as $member_id)
2186 {
2187 $column = 0;
2188 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2189 if ($member->getPref("public_email")=="y")
2190 {
2191 $worksheet->writeString($row, $column++, $this->cleanString($member->getEmail()));
2192 }
2193 else
2194 {
2195 $column++;
2196 }
2197 $worksheet->writeString($row, $column++, $this->cleanString($this->lng->txt("gender_" . $member->getGender())));
2198 $worksheet->writeString($row, $column++, $this->cleanString($member->getFirstname()));
2199 $worksheet->writeString($row, $column++, $this->cleanString($member->getLastname()));
2200 $worksheet->writeString($row, $column++, $this->cleanString($member->getUTitle()));
2201 if ($member->getPref("public_institution")=="y")
2202 {
2203 $worksheet->writeString($row, $column++, $this->cleanString($member->getInstitution()));
2204 }
2205 else
2206 {
2207 $column++;
2208 }
2209 if ($member->getPref("public_department")=="y")
2210 {
2211 $worksheet->writeString($row, $column++, $this->cleanString($member->getDepartment()));
2212 }
2213 else
2214 {
2215 $column++;
2216 }
2217 if ($member->getPref("public_street")=="y")
2218 {
2219 $worksheet->writeString($row, $column++, $this->cleanString($member->getStreet()));
2220 }
2221 else
2222 {
2223 $column++;
2224 }
2225 if ($member->getPref("public_zip")=="y")
2226 {
2227 $worksheet->writeString($row, $column++, $this->cleanString($member->getZipcode()));
2228 }
2229 else
2230 {
2231 $column++;
2232 }
2233 if ($member->getPref("public_city")=="y")
2234 {
2235 $worksheet->writeString($row, $column++, $this->cleanString($member->getCity()));
2236 }
2237 else
2238 {
2239 $column++;
2240 }
2241 if ($member->getPref("public_country")=="y")
2242 {
2243 $worksheet->writeString($row, $column++, $this->cleanString($member->getCountry()));
2244 }
2245 else
2246 {
2247 $column++;
2248 }
2249 if ($member->getPref("public_phone_office")=="y")
2250 {
2251 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneOffice()));
2252 }
2253 else
2254 {
2255 $column++;
2256 }
2257 if ($member->getPref("public_phone_home")=="y")
2258 {
2259 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneHome()));
2260 }
2261 else
2262 {
2263 $column++;
2264 }
2265 if ($member->getPref("public_phone_mobile")=="y")
2266 {
2267 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneMobile()));
2268 }
2269 else
2270 {
2271 $column++;
2272 }
2273 if ($member->getPref("public_fax")=="y")
2274 {
2275 $worksheet->writeString($row, $column++, $this->cleanString($member->getFax()));
2276 }
2277 else
2278 {
2279 $column++;
2280 }
2281 if ($member->getPref("public_matriculation")=="y")
2282 {
2283 $worksheet->writeString($row, $column++, $this->cleanString($member->getMatriculation()));
2284 }
2285 else
2286 {
2287 $column++;
2288 }
2289 $row++;
2290 }
2291 $workbook->close();
2292 }
Class ilExcelWriterAdapter.
cleanString($str)
Clean output string from german umlauts.
redirection script todo: (a better solution should control the processing via a xml file)

References ilObjectGUI\$data, $row, and cleanString().

+ Here is the call graph for this function:

◆ exportObject()

ilObjGroupGUI::exportObject ( )

Creates the output form for group member export.

Creates the output form for group member export

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

2141 {
2142 $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.grp_members_export.html",
2143 "Modules/Group");
2144 $this->tpl->setCurrentBlock("adm_content");
2145 $this->tpl->setVariable("FORMACTION", $this->getFormAction("export",$this->ctrl->getFormAction($this)));
2146 $this->tpl->setVariable("BUTTON_EXPORT", $this->lng->txt("export_group_members"));
2147 $this->tpl->parseCurrentBlock();
2148 }
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.

References ilObjectGUI\getFormAction().

+ Here is the call graph for this function:

◆ getAttendanceListUserData()

ilObjGroupGUI::getAttendanceListUserData (   $a_user_id)

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

3147 {
3148 $data = $this->members_data[$a_user_id];
3149 $data['access'] = $data['access_time'];
3150 $data['progress'] = $this->lng->txt($data['progress']);
3151
3152 return $data;
3153 }

References ilObjectGUI\$data.

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )
protected

returns all local roles [role_id] => title

Returns
array

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

3174 {
3175 $local_roles = $this->object->getLocalGroupRoles(false);
3176 $grp_member = $this->object->getDefaultMemberRole();
3177 $grp_roles = array();
3178
3179 //put the group member role to the top of the crs_roles array
3180 if(in_array($grp_member, $local_roles))
3181 {
3182 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search ($grp_member, $local_roles));
3183 unset($local_roles[$grp_roles[$grp_member]]);
3184 }
3185
3186 foreach($local_roles as $title => $role_id)
3187 {
3188 $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
3189 }
3190 return $grp_roles;
3191 }
_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 ( $tabs_gui)

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

Reimplemented from ilContainerGUI.

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

2003 {
2004 global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
2005
2006 $ilHelp->setScreenIdComponent("grp");
2007
2008 if ($rbacsystem->checkAccess('read',$this->ref_id))
2009 {
2010 $tabs_gui->addTab("view_content", $lng->txt("content"),
2011 $this->ctrl->getLinkTarget($this, ""));
2012 }
2013 if ($rbacsystem->checkAccess('visible',$this->ref_id))
2014 {
2015 $tabs_gui->addTarget("info_short",
2016 $this->ctrl->getLinkTargetByClass(
2017 array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"),
2018 "infoScreen",
2019 "", "",false);
2020 }
2021
2022
2023 if ($ilAccess->checkAccess('write','',$this->object->getRefId()))
2024 {
2025 $tabs_gui->addTarget("settings",
2026 $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this),
2027 "");
2028 }
2029
2030
2031 $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
2032
2033 // Members
2034 $mem_cmd = $ilAccess->checkAccess('write','',$this->ref_id) ? "members" : "membersGallery";
2035 if($mem_cmd != "membersGallery" || $is_participant)
2036 {
2037 $tabs_gui->addTarget("members",
2038 $this->ctrl->getLinkTarget($this, $mem_cmd),
2039 array(),
2040 get_class($this));
2041 }
2042
2043 // learning progress
2044 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2045 if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
2046 {
2047 $tabs_gui->addTarget('learning_progress',
2048 $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'),''),
2049 '',
2050 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
2051 }
2052
2053
2054 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2055 {
2056 $tabs_gui->addTarget(
2057 'export',
2058 $this->ctrl->getLinkTargetByClass('ilexportgui',''),
2059 'export',
2060 'ilexportgui'
2061 );
2062 }
2063
2064 /*
2065 if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
2066 {
2067
2068
2069 $tabs_gui->addTarget('export',
2070 $this->ctrl->getLinkTarget($this,'listExportFiles'),
2071 array('listExportFiles','exportXML','confirmDeleteExportFile','downloadExportFile'),
2072 get_class($this));
2073 }
2074 */
2075 // parent tabs (all container: edit_permission, clipboard, trash
2076 parent::getTabs($tabs_gui);
2077
2078 if($ilAccess->checkAccess('join','',$this->object->getRefId()) and
2079 !$this->object->members_obj->isAssigned($ilUser->getId()))
2080 {
2081 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
2082 if(ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
2083 {
2084 $tabs_gui->addTab(
2085 'leave',
2086 $this->lng->txt('membership_leave'),
2087 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui','show','')
2088 );
2089
2090 }
2091 else
2092 {
2093
2094 $tabs_gui->addTarget("join",
2095 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
2096 'show',
2097 "");
2098 }
2099 }
2100 if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
2101 $this->object->members_obj->isMember($ilUser->getId()))
2102 {
2103 $tabs_gui->addTarget("grp_btn_unsubscribe",
2104 $this->ctrl->getLinkTarget($this, "leave"),
2105 '',
2106 "");
2107 }
2108 }
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
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.

References $ilUser, ilObjectGUI\$lng, ilWaitingList\_isOnList(), ilGroupParticipants\_isParticipant(), and ilLearningProgressAccess\checkAccess().

+ Here is the call graph for this function:

◆ importFileObject2()

ilObjGroupGUI::importFileObject2 ( )

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

2113 {
2114 if(!is_array($_FILES['xmldoc']))
2115 {
2116 ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
2117 $this->createObject();
2118 return false;
2119 }
2120
2121 include_once './Modules/Group/classes/class.ilObjGroup.php';
2122
2123 if($ref_id = ilObjGroup::_importFromFile($_FILES['xmldoc'],(int) $_GET['ref_id']))
2124 {
2125 $this->ctrl->setParameter($this, "ref_id", $ref_id);
2126 ilUtil::sendSuccess($this->lng->txt("import_grp_finished"),true);
2127 ilUtil::redirect($this->ctrl->getLinkTarget($this,'edit','',false,false));
2128 }
2129
2130 ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
2131 $this->createObject();
2132 }
_importFromFile($file, $parent_id)
Static used for importing an group from xml zip file.
createObject()
create new object form

References $_GET, ilObjectGUI\$ref_id, ilObjGroup\_importFromFile(), ilObjectGUI\createObject(), ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

show information screen

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

2328 {
2329 global $rbacsystem, $ilUser, $ilSetting;
2330
2331 $this->tabs_gui->setTabActive('info_short');
2332
2333 if(!$rbacsystem->checkAccess("visible", $this->ref_id))
2334 {
2335 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2336 }
2337
2338 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2339 $info = new ilInfoScreenGUI($this);
2340
2341 if(strlen($this->object->getInformation()))
2342 {
2343 $info->addSection($this->lng->txt('grp_general_informations'));
2344 $info->addProperty($this->lng->txt('grp_information'), nl2br(
2345 ilUtil::makeClickable ($this->object->getInformation(), true)));
2346 }
2347
2348 $info->enablePrivateNotes();
2349 $info->enableLearningProgress(true);
2350
2351 $info->addSection($this->lng->txt('group_registration'));
2352 $info->showLDAPRoleGroupMappingInfo();
2353
2354 if(!$this->object->isRegistrationEnabled())
2355 {
2356 $info->addProperty($this->lng->txt('group_registration_mode'),
2357 $this->lng->txt('grp_reg_deac_info_screen'));
2358
2359 }
2360 else
2361 {
2362 switch($this->object->getRegistrationType())
2363 {
2365 $info->addProperty($this->lng->txt('group_registration_mode'),
2366 $this->lng->txt('grp_reg_direct_info_screen'));
2367 break;
2368
2370 $info->addProperty($this->lng->txt('group_registration_mode'),
2371 $this->lng->txt('grp_reg_req_info_screen'));
2372 break;
2373
2375 $info->addProperty($this->lng->txt('group_registration_mode'),
2376 $this->lng->txt('grp_reg_passwd_info_screen'));
2377 break;
2378
2379 }
2380 /*
2381 $info->addProperty($this->lng->txt('group_registration_time'),
2382 ilDatePresentation::formatPeriod(
2383 $this->object->getRegistrationStart(),
2384 $this->object->getRegistrationEnd()));
2385 */
2386 if($this->object->isRegistrationUnlimited())
2387 {
2388 $info->addProperty($this->lng->txt('group_registration_time'),
2389 $this->lng->txt('grp_registration_unlimited'));
2390 }
2391 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2392 {
2393 $info->addProperty($this->lng->txt("group_registration_time"),
2394 $this->lng->txt('cal_until').' '.
2395 ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
2396 }
2397 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2398 {
2399 $info->addProperty($this->lng->txt("group_registration_time"),
2400 $this->lng->txt('cal_from').' '.
2401 ilDatePresentation::formatDate($this->object->getRegistrationStart()));
2402 }
2403 if ($this->object->isMembershipLimited())
2404 {
2405 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
2406 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
2407
2408 $info->addProperty(
2409 $this->lng->txt('mem_free_places'),
2410 $reg_info['reg_info_free_places']
2411 );
2412 }
2413 }
2414
2415 // Confirmation
2416 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2418
2419 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2420 if($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport())
2421 {
2422 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2423
2424 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
2425
2426 $this->lng->loadLanguageModule('ps');
2427 $info->addSection($this->lng->txt('grp_user_agreement_info'));
2428 $info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
2429
2430 if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
2431 {
2432 $info->addProperty($this->lng->txt('ps_grp_user_fields'),$fields);
2433 }
2434 }
2435
2436
2437 // forward the command
2438 $this->ctrl->forwardCommand($info);
2439 }
const GRP_REGISTRATION_DIRECT
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)
Format a date @access public.
static _getInstanceByType($a_type)
Get Singleton Instance.
Class ilInfoScreenGUI.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info @global ilDB $ilDB @global ilObjUser $ilUser @global ilLanguage $lng.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
global $ilSetting
Definition: privfeed.php:40

References $ilSetting, $ilUser, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilCourseDefinedFieldDefinition\_getFields(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilDatePresentation\formatDate(), GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjGroupAccess\lookupRegistrationInfo(), and ilUtil\makeClickable().

Referenced by executeCommand(), and infoScreenObject().

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

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

set sub tabs

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

2318 {
2319 $this->ctrl->setCmd("showSummary");
2320 $this->ctrl->setCmdClass("ilinfoscreengui");
2321 $this->infoScreen();
2322 }

References infoScreen().

+ Here is the call graph for this function:

◆ initAttendanceList()

ilObjGroupGUI::initAttendanceList ( )
protected

Init attendance list object.

Returns
ilAttendanceList

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

3107 {
3108 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
3109 $members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
3110
3111 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
3112 $waiting_list = new ilGroupWaitingList($this->object->getId());
3113
3114 include_once 'Services/Membership/classes/class.ilAttendanceList.php';
3115 $list = new ilAttendanceList($this, $members_obj, $waiting_list);
3116 $list->setId('grpmemlst');
3117
3118 $list->setTitle($this->lng->txt('grp_members_print_title'),
3119 $this->lng->txt('obj_grp').': '.$this->object->getTitle());
3120
3121 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
3122 $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
3123 ilObjUserTracking::_enabledUserRelatedData());
3124 if($this->show_tracking)
3125 {
3126 include_once('./Services/Object/classes/class.ilObjectLP.php');
3127 $olp = ilObjectLP::getInstance($this->object->getId());
3128 $this->show_tracking = $olp->isActive();
3129 }
3130 if($this->show_tracking)
3131 {
3132 $this->lng->loadLanguageModule('trac');
3133 $list->addPreset('progress', $this->lng->txt('learning_progress'), true);
3134 }
3135
3136 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3138 if($privacy->enabledGroupAccessTimes())
3139 {
3140 $list->addPreset('access', $this->lng->txt('last_access'), true);
3141 }
3142
3143 return $list;
3144 }
Base class for attendance lists.
static _enabledLearningProgress()
check wether learing progress is enabled or not
static getInstance($a_obj_id)
if(!file_exists(getcwd().'/ilias.ini.php')) if(isset( $_GET["client_id"]))
registration confirmation script for ilias
Definition: confirmReg.php:20

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilPrivacySettings\_getInstance(), ilGroupParticipants\_getInstanceByObjId(), and ilObjectLP\getInstance().

Referenced by printMembersObject(), and printMembersOutputObject().

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

◆ initCreateForm()

ilObjGroupGUI::initCreateForm (   $a_new_type)
protected

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

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

356 {
357 if(!is_object($this->object))
358 {
359 $this->object = new ilObjGroup();
360 }
361
362 $this->initForm('create');
363 return $this->form;
364 }
Class ilObjGroup.

References initForm().

+ Here is the call graph for this function:

◆ initForm()

ilObjGroupGUI::initForm (   $a_mode = 'edit')
protected

init create/edit form

@access protected

Parameters
stringedit or create
Returns

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

2520 {
2521 global $ilUser,$tpl,$tree;
2522
2523 if(is_object($this->form))
2524 {
2525 return true;
2526 }
2527
2528 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2529
2530 $this->form = new ilPropertyFormGUI();
2531 switch($a_mode)
2532 {
2533 case 'edit':
2534 $this->form->setFormAction($this->ctrl->getFormAction($this,'update'));
2535 break;
2536
2537 default:
2538 $this->form->setTableWidth('600px');
2539 $this->form->setFormAction($this->ctrl->getFormAction($this,'save'));
2540 break;
2541 }
2542
2543 // title
2544 $title = new ilTextInputGUI($this->lng->txt('title'),'title');
2545 $title->setSubmitFormOnEnter(true);
2546 $title->setValue($this->object->getTitle());
2547 $title->setSize(min(40, ilObject::TITLE_LENGTH));
2548 $title->setMaxLength(ilObject::TITLE_LENGTH);
2549 $title->setRequired(true);
2550 $this->form->addItem($title);
2551
2552 // desc
2553 $desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
2554 $desc->setValue($this->object->getLongDescription());
2555 $desc->setRows(2);
2556 $desc->setCols(40);
2557 $this->form->addItem($desc);
2558
2559 // Group type
2560 $grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'),'grp_type');
2561
2562 if($a_mode == 'edit')
2563 {
2564 $type = ($this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus());
2565 }
2566 else
2567 {
2568 $type = ($this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC);
2569 }
2570
2571 $grp_type->setValue($type);
2572 $grp_type->setRequired(true);
2573
2574
2575 // PUBLIC GROUP
2576 $opt_public = new ilRadioOption($this->lng->txt('grp_public'),GRP_TYPE_PUBLIC,$this->lng->txt('grp_public_info'));
2577 $grp_type->addOption($opt_public);
2578
2579
2580 // CLOSED GROUP
2581 $opt_closed = new ilRadioOption($this->lng->txt('grp_closed'),GRP_TYPE_CLOSED,$this->lng->txt('grp_closed_info'));
2582 $grp_type->addOption($opt_closed);
2583
2584 $this->form->addItem($grp_type);
2585
2586 if($a_mode == 'edit')
2587 {
2588 // Group registration ############################################################
2589 $pres = new ilFormSectionHeaderGUI();
2590 $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
2591 $this->form->addItem($pres);
2592
2593 // Registration type
2594 $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'),'registration_type');
2595 $reg_type->setValue($this->object->getRegistrationType());
2596
2597 $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'),GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
2598 $reg_type->addOption($opt_dir);
2599
2600 $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'),GRP_REGISTRATION_PASSWORD);
2601 $pass = new ilTextInputGUI($this->lng->txt("password"),'password');
2602 $pass->setInfo($this->lng->txt('grp_reg_password_info'));
2603 $pass->setValue($this->object->getPassword());
2604 $pass->setSize(10);
2605 $pass->setMaxLength(32);
2606 $opt_pass->addSubItem($pass);
2607 $reg_type->addOption($opt_pass);
2608
2609 $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'),GRP_REGISTRATION_REQUEST,$this->lng->txt('grp_reg_request_info'));
2610 $reg_type->addOption($opt_req);
2611
2612 $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'),GRP_REGISTRATION_DEACTIVATED,$this->lng->txt('grp_reg_disabled_info'));
2613 $reg_type->addOption($opt_deact);
2614
2615 // Registration codes
2616 $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'),'reg_code_enabled');
2617 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
2618 $reg_code->setValue(1);
2619 $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
2620 $this->form->addItem($reg_type);
2621
2622 // Registration codes
2623 if(!$this->object->getRegistrationAccessCode())
2624 {
2625 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2626 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
2627 }
2628 $reg_link = new ilHiddenInputGUI('reg_code');
2629 $reg_link->setValue($this->object->getRegistrationAccessCode());
2630 $this->form->addItem($reg_link);
2631
2632 $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
2633 include_once './Services/Link/classes/class.ilLink.php';
2634 $val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
2635 $link->setHTML('<font class="small">'.$val.'</font>');
2636 $reg_code->addSubItem($link);
2637 $this->form->addItem($reg_code);
2638
2639
2640 // time limit
2641 $time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'),'reg_limit_time');
2642// $time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
2643 $time_limit->setChecked($this->object->isRegistrationUnlimited() ? false : true);
2644
2645 $this->lng->loadLanguageModule('dateplaner');
2646 include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
2647 $tpl->addJavaScript('./Services/Form/js/date_duration.js');
2648 $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_period'),'reg');
2649 $dur->setStartText($this->lng->txt('cal_start'));
2650 $dur->setEndText($this->lng->txt('cal_end'));
2651 $dur->setShowTime(true);
2652 $dur->setStart($this->object->getRegistrationStart());
2653 $dur->setEnd($this->object->getRegistrationEnd());
2654
2655 $time_limit->addSubItem($dur);
2656 $this->form->addItem($time_limit);
2657
2658 // max member
2659 $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'),'registration_membership_limited');
2660 $lim->setValue(1);
2661// $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
2662 $lim->setChecked($this->object->isMembershipLimited());
2663
2664
2665 $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'),'registration_max_members');
2666 $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
2667 //$max->setTitle($this->lng->txt('members'));
2668 $max->setSize(3);
2669 $max->setMaxLength(4);
2670 $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
2671 $lim->addSubItem($max);
2672
2673 $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
2674 $wait->setValue(1);
2675 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
2676 $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
2677 $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
2678 $lim->addSubItem($wait);
2679 $this->form->addItem($lim);
2680
2681 // Group presentation
2682 $hasParentMembership =
2683 (
2684 $tree->checkForParentType($this->object->getRefId(),'crs') ||
2685 $tree->checkForParentType($this->object->getRefId(),'grp')
2686 );
2687
2688 $pres = new ilFormSectionHeaderGUI();
2689 $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
2690 $this->form->addItem($pres);
2691
2692 // presentation type
2693 $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'),'view_mode');
2694 if($hasParentMembership)
2695 {
2696 switch($this->object->getViewMode())
2697 {
2699 $course_view_mode = ': '.$this->lng->txt('cntr_view_sessions');
2700 break;
2701
2703 $course_view_mode = ': '.$this->lng->txt('cntr_view_simple');
2704 break;
2705
2707 $course_view_mode = ': '.$this->lng->txt('cntr_view_by_type');
2708 break;
2709 }
2710
2711 $opt = new ilRadioOption($this->lng->txt('grp_view_inherit').$course_view_mode,ilContainer::VIEW_INHERIT);
2712 $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
2713 $view_type->addOption($opt);
2714 }
2715
2716 if($hasParentMembership &&
2717 $this->object->getViewMode(false) == ilContainer::VIEW_INHERIT)
2718 {
2719 $view_type->setValue(ilContainer::VIEW_INHERIT);
2720 }
2721 else
2722 {
2723 $view_type->setValue($this->object->getViewMode(true));
2724 }
2725
2726 $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'),ilContainer::VIEW_SIMPLE);
2727 $opt->setInfo($this->lng->txt('grp_view_info_simple'));
2728 $view_type->addOption($opt);
2729
2730 $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
2731 $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
2732 $view_type->addOption($opt);
2733 $this->form->addItem($view_type);
2734
2735
2736 // Sorting
2737 $sorting_settings = array();
2738 if($hasParentMembership)
2739 {
2740 $sorting_settings[] = ilContainer::SORT_INHERIT;
2741 }
2742 $sorting_settings[] = ilContainer::SORT_TITLE;
2743 $sorting_settings[] = ilContainer::SORT_CREATION;
2744 $sorting_settings[] = ilContainer::SORT_MANUAL;
2745 $this->initSortingForm($this->form, $sorting_settings);
2746
2747 // additional features
2748 $feat = new ilFormSectionHeaderGUI();
2749 $feat->setTitle($this->lng->txt('obj_features'));
2750 $this->form->addItem($feat);
2751
2752 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2754 $this->object->getId(),
2755 $this->form,
2756 array(
2761 )
2762 );
2763
2764 // Notification Settings
2765 /*$notification = new ilFormSectionHeaderGUI();
2766 $notification->setTitle($this->lng->txt('grp_notification'));
2767 $this->form->addItem($notification);*/
2768
2769 // Show members type
2770 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
2771 $mail_type->setValue($this->object->getMailToMembersType());
2772
2773 $mail_tutors = new ilRadioOption($this->lng->txt('grp_mail_tutors_only'), ilObjGroup::MAIL_ALLOWED_TUTORS,
2774 $this->lng->txt('grp_mail_tutors_only_info'));
2775 $mail_type->addOption($mail_tutors);
2776
2777 $mail_all = new ilRadioOption($this->lng->txt('grp_mail_all'), ilObjGroup::MAIL_ALLOWED_ALL,
2778 $this->lng->txt('grp_mail_all_info'));
2779 $mail_type->addOption($mail_all);
2780 $this->form->addItem($mail_type);
2781 }
2782
2783 switch($a_mode)
2784 {
2785 case 'create':
2786 $this->form->setTitle($this->lng->txt('grp_new'));
2787 $this->form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
2788
2789 $this->form->addCommandButton('save',$this->lng->txt('grp_new'));
2790 $this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
2791 return true;
2792
2793 case 'edit':
2794 $this->form->setTitle($this->lng->txt('grp_edit'));
2795 $this->form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
2796
2797 // Edit ecs export settings
2798 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
2799 $ecs = new ilECSGroupSettings($this->object);
2800 $ecs->addSettingsToForm($this->form, 'grp');
2801
2802 $this->form->addCommandButton('update',$this->lng->txt('save'));
2803 $this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
2804 return true;
2805
2806 }
2807 return true;
2808 }
const GRP_TYPE_CLOSED
const GRP_REGISTRATION_DEACTIVATED
const GRP_TYPE_PUBLIC
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
This class represents a custom property in a property form.
input GUI for a time span (start and end date)
Class ilECSGroupSettings.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
static generateCode()
Generate new registration key.
const MAIL_ALLOWED_TUTORS
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const TITLE_LENGTH
max length of object title
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.

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

Referenced by editObject(), initCreateForm(), and updateObject().

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

◆ initGroupIconsForm()

ilObjGroupGUI::initGroupIconsForm ( )

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

604 {
605 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
606 $form = new ilPropertyFormGUI();
607 $form->setFormAction($this->ctrl->getFormAction($this));
608
609 $this->showCustomIconsEditing(1, $form);
610
611 // $form->setTitle($this->lng->txt('edit_grouping'));
612 $form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
613
614 return $form;
615 }
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container

References ilContainerGUI\showCustomIconsEditing().

Referenced by editGroupIconsObject(), and updateGroupIconsObject().

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

◆ initHeaderAction()

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

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

Reimplemented from ilContainerGUI.

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

3048 {
3049 global $ilSetting, $ilUser;
3050
3051 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3052
3053 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
3054 if($ilSetting->get("crsgrp_ntf") &&
3055 ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
3056 {
3057 if(!$ilUser->getPref("grpcrs_ntf_".$this->ref_id))
3058 {
3059 $lg->addHeaderIcon("not_icon",
3060 ilUtil::getImagePath("notification_off.svg"),
3061 $this->lng->txt("grp_notification_deactivated"));
3062
3063 $this->ctrl->setParameter($this, "grp_ntf", 1);
3064 $caption = "grp_activate_notification";
3065 }
3066 else
3067 {
3068 $lg->addHeaderIcon("not_icon",
3069 ilUtil::getImagePath("notification_on.svg"),
3070 $this->lng->txt("grp_notification_activated"));
3071
3072 $this->ctrl->setParameter($this, "grp_ntf", 0);
3073 $caption = "grp_deactivate_notification";
3074 }
3075
3076 $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
3077 $caption);
3078
3079
3080 $this->ctrl->setParameter($this, "grp_ntf", "");
3081 }
3082
3083 return $lg;
3084 }

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

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

@access protected

Returns

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

789 {
790 if(is_object($this->form))
791 {
792 return true;
793 }
794
795 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
796 $this->form = new ilPropertyFormGUI();
797 $this->form->setFormAction($this->ctrl->getFormAction($this,'updateInfo'));
798 $this->form->setTitle($this->lng->txt('grp_general_informations'));
799 $this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
800 $this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
801
802 $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'),'important');
803 $area->setInfo($this->lng->txt('grp_information_info'));
804 $area->setValue($this->object->getInformation());
805 $area->setRows(8);
806 $area->setCols(80);
807 $this->form->addItem($area);
808 }

Referenced by editInfoObject().

+ Here is the caller graph for this function:

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group @access public

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

1752 {
1753 global $ilUser;
1754
1755 $this->checkPermission('leave');
1756
1757 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1758 if($part->isLastAdmin($ilUser->getId()))
1759 {
1760 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
1761 $this->viewObject();
1762 return false;
1763 }
1764
1765 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
1766
1767 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1768 $cgui = new ilConfirmationGUI();
1769 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1770 $cgui->setFormAction($this->ctrl->getFormAction($this));
1771 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1772 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1773 $this->tpl->setContent($cgui->getHTML());
1774 }
viewObject()
list childs of current object

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

+ Here is the call graph for this function:

◆ load()

ilObjGroupGUI::load ( )

load settings

@access public

Returns

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

2817 {
2818 $this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
2819 $this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
2820 $this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
2821 $this->object->setRegistrationType(ilUtil::stripSlashes($_POST['registration_type']));
2822 $this->object->setPassword(ilUtil::stripSlashes($_POST['password']));
2823 $this->object->enableUnlimitedRegistration((bool) !$_POST['reg_limit_time']);
2824 $this->object->setRegistrationStart($this->loadDate('start'));
2825 $this->object->setRegistrationEnd($this->loadDate('end'));
2826 $this->object->enableMembershipLimitation((bool) $_POST['registration_membership_limited']);
2827 $this->object->setMaxMembers((int) $_POST['registration_max_members']);
2828 $this->object->enableWaitingList((bool) $_POST['waiting_list']);
2829 $this->object->enableRegistrationAccessCode((bool) $_POST['reg_code_enabled']);
2830 $this->object->setRegistrationAccessCode(ilUtil::stripSlashes($_POST['reg_code']));
2831 $this->object->setViewMode(ilUtil::stripSlashes($_POST['view_mode']));
2832 $this->object->setMailToMembersType((int) $_POST['mail_type']);
2833
2834 return true;
2835 }
loadDate($a_field)
load date
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, loadDate(), and ilUtil\stripSlashes().

Referenced by updateObject().

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

◆ loadDate()

ilObjGroupGUI::loadDate (   $a_field)
protected

load date

@access protected

Parameters

return

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

2845 {
2846 global $ilUser;
2847
2848 include_once('./Services/Calendar/classes/class.ilDateTime.php');
2849
2850 $dt['year'] = (int) $_POST['reg'][$a_field]['date']['y'];
2851 $dt['mon'] = (int) $_POST['reg'][$a_field]['date']['m'];
2852 $dt['mday'] = (int) $_POST['reg'][$a_field]['date']['d'];
2853 $dt['hours'] = (int) $_POST['reg'][$a_field]['time']['h'];
2854 $dt['minutes'] = (int) $_POST['reg'][$a_field]['time']['m'];
2855 $dt['seconds'] = (int) $_POST['reg'][$a_field]['time']['s'];
2856
2857 $date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
2858 return $date;
2859 }
const IL_CAL_FKT_GETDATE
@classDescription Date and time handling

References $_POST, $ilUser, and IL_CAL_FKT_GETDATE.

Referenced by load().

+ Here is the caller graph for this function:

◆ mailMembersObject()

ilObjGroupGUI::mailMembersObject ( )

Form for mail to group members.

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

1895 {
1896 global $rbacreview, $ilObjDataCache, $ilias;
1897 include_once('./Services/AccessControl/classes/class.ilObjRole.php');
1898
1899 $this->lng->loadLanguageModule('mail');
1900 if(!isset($_GET['returned_from_mail']))
1901 {
1902 ilUtil::sendInfo($this->lng->txt('mail_select_recipients'));
1903 }
1904
1905 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html','Services/Contact');
1906
1907
1908 $this->tabs_gui->setTabActive('members');
1909 $b_cmd = $_GET["back_cmd"] ? $_GET["back_cmd"] : "members";
1910 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this,$b_cmd));
1911
1912
1913 require_once 'Services/Mail/classes/class.ilMailFormCall.php';
1914 $this->tpl->setVariable("MAILACTION", ilMailFormCall::getLinkTarget($this, $b_cmd, array(), array('type' => 'role','sig' => $this->createMailSignature())));
1915 $this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.svg'));
1916 $this->tpl->setVariable("TXT_MARKED_ENTRIES",$this->lng->txt('marked_entries'));
1917 $this->tpl->setVariable("OK",$this->lng->txt('next'));
1918
1919 // Get role mailbox addresses
1920 $role_ids = $rbacreview->getRolesOfRoleFolder($this->object->getRefId(), false);
1921 $role_addrs = array();
1922
1923 // Sort by relevance
1924 $sorted_role_ids = array();
1925 $counter = 2;
1926 foreach($role_ids as $role_id)
1927 {
1928 switch(substr(ilObject::_lookupTitle($role_id),0,8))
1929 {
1930 case 'il_grp_a':
1931 $sorted_role_ids[1] = $role_id;
1932 break;
1933
1934 case 'il_grp_m':
1935 $sorted_role_ids[0] = $role_id;
1936 break;
1937
1938 default:
1939 $sorted_role_ids[$counter++] = $role_id;
1940 break;
1941 }
1942 }
1943 ksort($sorted_role_ids,SORT_NUMERIC);
1944 foreach ((array) $sorted_role_ids as $role_id)
1945 {
1946 $this->tpl->setCurrentBlock("mailbox_row");
1947 $role_addr = $rbacreview->getRoleMailboxAddress($role_id);
1948
1949 // check if role title is unique. if not force use pear mail for roles
1950 $ids_for_role_title = ilObject::_getIdsForTitle(ilObject::_lookupTitle($role_id), 'role');
1951 if(count($ids_for_role_title) >= 2)
1952 {
1953 $ilias->setSetting('pear_mail_enable', 1);
1954 }
1955
1956 $this->tpl->setVariable("CHECK_MAILBOX",ilUtil::formCheckbox(1,'roles[]',
1957 htmlspecialchars($role_addr)
1958 ));
1959
1960 if (ilMail::_usePearMail() && substr($role_addr, 0, 4) != '#il_')
1961 {
1962 // if pear mail is enabled, mailbox addresses are already localized in the language of the user
1963 $this->tpl->setVariable("MAILBOX",$role_addr);
1964 }
1965 else
1966 {
1967 // if pear mail is not enabled, we need to localize mailbox addresses in the language of the user
1968 $this->tpl->setVariable("MAILBOX",ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)) . " (".$role_addr.")");
1969 }
1970 $this->tpl->parseCurrentBlock();
1971 }
1972 }
static getLinkTarget($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
createMailSignature()
Create a course mail signature.
static _getIdsForTitle($title, $type='', $partialmatch=false)
static formCheckbox($checked, $varname, $value, $disabled=false)
??? @access public
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_GET, ilObjectGUI\$ilias, ilObject\_getIdsForTitle(), ilObjRole\_getTranslation(), ilObject\_lookupTitle(), createMailSignature(), ilUtil\formCheckbox(), ilUtil\getImagePath(), ilMailFormCall\getLinkTarget(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ membersGalleryObject()

ilObjGroupGUI::membersGalleryObject ( )

Builds a group members gallery as a layer of left-floating images.

Author
Arturo Gonzalez artur.nosp@m.ogf@.nosp@m.gmail.nosp@m..com @access public

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

835 {
836 global $rbacsystem, $ilAccess, $ilUser, $ilToolbar;
837
838 $is_admin = (bool) $rbacsystem->checkAccess("write", $this->object->getRefId());
839
840 $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.crs_members_gallery.html','Modules/Course');
841
842 $this->setSubTabs('members');
843 $this->tabs_gui->setTabActive('members');
844
845 $member_ids = $this->object->getGroupMemberIds();
846 $admin_ids = $this->object->getGroupAdminIds();
847
848 // fetch all users data in one shot to improve performance
849 $members = $this->object->getGroupMemberData($member_ids);
850
851 $this->addMailToMemberButton($ilToolbar, "membersGallery");
852
853 // MEMBERS
854 if(count($members))
855 {
856 $ordered_members = array();
857
858 foreach($members as $member)
859 {
860 // get user object
861 if(!($usr_obj = ilObjectFactory::getInstanceByObjId($member["id"],false)))
862 {
863 continue;
864 }
865
866 if(!$usr_obj->getActive())
867 {
868 continue;
869 }
870
871 // please do not use strtoupper on first/last name for output
872 // this messes up with some unicode characters, i guess
873 // depending on php verion, alex
874 array_push($ordered_members,array("id" => $member["id"],
875 "login" => $usr_obj->getLogin(),
876 "lastname" => $usr_obj->getLastName(),
877 "firstname" => $usr_obj->getFirstName(),
878 "sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
879 "usr_obj" => $usr_obj));
880 }
881
882 $ordered_members=ilUtil::sortArray($ordered_members,"sortlastname","asc");
883
884 foreach($ordered_members as $member) {
885
886 $usr_obj = $member["usr_obj"];
887
888 $public_profile = $usr_obj->getPref("public_profile");
889 if ($public_profile == "g")
890 {
891 $public_profile = "y";
892 }
893
894 // SET LINK TARGET FOR USER PROFILE
895 $this->ctrl->setParameterByClass("ilpublicuserprofilegui", "user", $member["id"]);
896 $profile_target = $this->ctrl->getLinkTargetByClass("ilpublicuserprofilegui","getHTML");
897
898 // GET USER IMAGE
899 $file = $usr_obj->getPersonalPicturePath("xsmall");
900
901 switch(in_array($member["id"],$admin_ids))
902 {
903 //admins
904 case 1:
905 if ($public_profile == "y")
906 {
907 $this->tpl->setCurrentBlock("member_linked");
908 $this->tpl->setVariable("LINK_PROFILE", $profile_target);
909 $this->tpl->setVariable("SRC_USR_IMAGE", $file);
910 $this->tpl->parseCurrentBlock();
911 }
912 else
913 {
914 $this->tpl->setCurrentBlock("member_not_linked");
915 $this->tpl->setVariable("SRC_USR_IMAGE", $file);
916 $this->tpl->parseCurrentBlock();
917 }
918 $this->tpl->setCurrentBlock("member");
919 break;
920
921 case 0:
922 if ($public_profile == "y")
923 {
924 $this->tpl->setCurrentBlock("member_linked");
925 $this->tpl->setVariable("LINK_PROFILE", $profile_target);
926 $this->tpl->setVariable("SRC_USR_IMAGE", $file);
927 $this->tpl->parseCurrentBlock();
928 }
929 else
930 {
931 $this->tpl->setCurrentBlock("member_not_linked");
932 $this->tpl->setVariable("SRC_USR_IMAGE", $file);
933 $this->tpl->parseCurrentBlock();
934 }
935 $this->tpl->setCurrentBlock("member");
936 break;
937 }
938
939 if (in_array($member["id"],$admin_ids)) {
940 $this->tpl->setVariable("MEMBER_CLASS", "il_Admin");
941 }
942 else {
943 $this->tpl->setVariable("MEMBER_CLASS", "il_Member");
944 }
945
946
947 // do not show name, if public profile is not activated
948 if ($public_profile == "y")
949 {
950 $this->tpl->setVariable("FIRSTNAME", $member["firstname"]);
951 $this->tpl->setVariable("LASTNAME", $member["lastname"]);
952 }
953 $this->tpl->setVariable("LOGIN", $usr_obj->getLogin());
954 $this->tpl->parseCurrentBlock();
955 }
956 $this->tpl->setCurrentBlock("members");
957 //$this->tpl->setVariable("MEMBERS_TABLE_HEADER",$this->lng->txt('crs_members_title'));
958 $this->tpl->parseCurrentBlock();
959 }
960
961 $this->tpl->setVariable("TITLE",$this->lng->txt('crs_members_print_title'));
962 $this->tpl->setVariable("CSS_PATH",ilUtil::getStyleSheetLocation());
963 }
print $file
addMailToMemberButton($ilToolbar, $back_cmd=null, $a_separator=false)
add Mail to Member button to toolbar
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user

References $file, $ilUser, addMailToMemberButton(), ilObjectFactory\getInstanceByObjId(), ilUtil\getStyleSheetLocation(), setSubTabs(), and ilUtil\sortArray().

+ Here is the call graph for this function:

◆ membersMapObject()

ilObjGroupGUI::membersMapObject ( )

Members map.

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

724 {
725 global $tpl;
726
727 $this->setSubTabs('members');
728 $this->tabs_gui->setTabActive('members');
729
730 include_once("./Services/Maps/classes/class.ilMapUtil.php");
731 if (!ilMapUtil::isActivated() || !$this->object->getEnableGroupMap())
732 {
733 return;
734 }
735
736 $map = ilMapUtil::getMapGUI();
737 $map->setMapId("group_map")
738 ->setWidth("700px")
739 ->setHeight("500px")
740 ->setLatitude($this->object->getLatitude())
741 ->setLongitude($this->object->getLongitude())
742 ->setZoom($this->object->getLocationZoom())
743 ->setEnableTypeControl(true)
744 ->setEnableNavigationControl(true)
745 ->setEnableCentralMarker(true);
746
747
748 $member_ids = $this->object->getGroupMemberIds();
749 $admin_ids = $this->object->getGroupAdminIds();
750
751 // fetch all users data in one shot to improve performance
752 $members = $this->object->getGroupMemberData($member_ids);
753 foreach($member_ids as $user_id)
754 {
755 $map->addUserMarker($user_id);
756 }
757 $tpl->setContent($map->getHTML());
758 $tpl->setLeftContent($map->getUserListHTML());
759 }
static getMapGUI()
Get an instance of the GUI class.

References ilObjectGUI\$tpl, ilMapUtil\getMapGUI(), ilMapUtil\isActivated(), and setSubTabs().

+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )

edit members

@access public

Returns

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

1057 {
1058 global $ilUser, $ilToolbar, $lng, $ilCtrl;
1059
1060 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1061 include_once('./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
1062
1063 $this->checkPermission('write');
1064
1065 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1066 $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
1067 ilObjUserTracking::_enabledUserRelatedData());
1068 if($this->show_tracking)
1069 {
1070 include_once('./Services/Object/classes/class.ilObjectLP.php');
1071 $olp = ilObjectLP::getInstance($this->object->getId());
1072 $this->show_tracking = $olp->isActive();
1073 }
1074
1075 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1076
1077 $this->setSubTabs('members');
1078 $this->tabs_gui->setTabActive('members');
1079 $this->tabs_gui->setSubTabActive('grp_edit_members');
1080
1081 $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.grp_edit_members.html','Modules/Group');
1082 $this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
1083
1084 // add members
1085 include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
1087 $this,
1088 $ilToolbar,
1089 array(
1090 'auto_complete_name' => $lng->txt('user'),
1091 'user_type' => $this->getLocalRoles(),
1092 'submit_name' => $lng->txt('add')
1093 )
1094 );
1095
1096 // spacer
1097 $ilToolbar->addSeparator();
1098
1099 // search button
1100 $ilToolbar->addButton($this->lng->txt("grp_search_users"),
1101 $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
1102
1103 $ilToolbar->addSeparator();
1104
1105 // print button
1106 $ilToolbar->addButton($this->lng->txt("grp_print_list"),
1107 $this->ctrl->getLinkTarget($this, 'printMembers'));
1108
1109 $this->addMailToMemberButton($ilToolbar, "members", true);
1110
1111 $this->setShowHidePrefs();
1112
1113
1114 // Waiting list table
1115 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1116 $waiting_list = new ilGroupWaitingList($this->object->getId());
1117 if(count($wait = $waiting_list->getAllUsers()))
1118 {
1119 include_once('./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1120 if($ilUser->getPref('grp_wait_hide'))
1121 {
1122 $table_gui = new ilWaitingListTableGUI($this,$waiting_list,false);
1123 $this->ctrl->setParameter($this,'wait_hide',0);
1124 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1125 $this->lng->txt('show'));
1126 $this->ctrl->clearParameters($this);
1127 }
1128 else
1129 {
1130 $table_gui = new ilWaitingListTableGUI($this,$waiting_list,true);
1131 $this->ctrl->setParameter($this,'wait_hide',1);
1132 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1133 $this->lng->txt('hide'));
1134 $this->ctrl->clearParameters($this);
1135 }
1136 $table_gui->setUsers($wait);
1137 $table_gui->setTitle($this->lng->txt('grp_header_waiting_list'),'icon_usr.svg',$this->lng->txt('group_new_registrations'));
1138 $this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
1139 }
1140
1141
1142 // Subscriber table
1143 if($part->getSubscribers())
1144 {
1145 include_once('./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1146 if($ilUser->getPref('grp_subscriber_hide'))
1147 {
1148 $table_gui = new ilSubscriberTableGUI($this,false);
1149 $this->ctrl->setParameter($this,'subscriber_hide',0);
1150 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1151 $this->lng->txt('show'));
1152 $this->ctrl->clearParameters($this);
1153 }
1154 else
1155 {
1156 $table_gui = new ilSubscriberTableGUI($this,true);
1157 $this->ctrl->setParameter($this,'subscriber_hide',1);
1158 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1159 $this->lng->txt('hide'));
1160 $this->ctrl->clearParameters($this);
1161 }
1162 $table_gui->readSubscriberData();
1163 $table_gui->setTitle($this->lng->txt('group_new_registrations'),'icon_usr.svg',$this->lng->txt('group_new_registrations'));
1164 $this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
1165 }
1166
1167 if(count($part->getAdmins()))
1168 {
1169 if($ilUser->getPref('grp_admin_hide'))
1170 {
1171 $table_gui = new ilGroupParticipantsTableGUI($this,'admin',false,false);
1172 $this->ctrl->setParameter($this,'admin_hide',0);
1173 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1174 $this->lng->txt('show'));
1175 $this->ctrl->clearParameters($this);
1176 }
1177 else
1178 {
1179 $table_gui = new ilGroupParticipantsTableGUI($this,'admin',true,false);
1180 $this->ctrl->setParameter($this,'admin_hide',1);
1181 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1182 $this->lng->txt('hide'));
1183 $this->ctrl->clearParameters($this);
1184 }
1185 $table_gui->setTitle($this->lng->txt('grp_admins'),'icon_usr.svg',$this->lng->txt('grp_admins'));
1186 $table_gui->parse($this->readMemberData($part->getAdmins()));
1187 $this->tpl->setVariable('ADMINS',$table_gui->getHTML());
1188 }
1189
1190 if($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1191 {
1192 if($ilUser->getPref('grp_member_hide'))
1193 {
1194 $table_gui = new ilGroupParticipantsTableGUI($this,'member',false,$this->show_tracking,$this->object->getDEfaultMemberRole());
1195 $this->ctrl->setParameter($this,'member_hide',0);
1196 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1197 $this->lng->txt('show'));
1198 $this->ctrl->clearParameters($this);
1199 }
1200 else
1201 {
1202 $table_gui = new ilGroupParticipantsTableGUI($this,'member',true,$this->show_tracking,$this->object->getDefaultMemberRole());
1203 $this->ctrl->setParameter($this,'member_hide',1);
1204 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1205 $this->lng->txt('hide'));
1206 $this->ctrl->clearParameters($this);
1207 }
1208
1209 $table_gui->setTitle($this->lng->txt('grp_members'),'icon_usr.svg',$this->lng->txt('grp_members'));
1210 $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($this->object->getDefaultMemberRole()),
1211 null, $table_gui->getSelectedColumns()));
1212 $this->tpl->setCurrentBlock('member_block');
1213 $this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
1214 $this->tpl->parseCurrentBlock();
1215 }
1216
1217 foreach(ilGroupParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
1218 {
1219 // Do not show table if no user is assigned
1220 if(!($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1221 {
1222 continue;
1223 }
1224 if($ilUser->getPref('grp_role_hide'.$role_id))
1225 {
1226 $table_gui = new ilGroupParticipantsTableGUI($this,'role',false,$this->show_tracking,$role_id);
1227 $this->ctrl->setParameter($this,'role_hide_'.$role_id,0);
1228 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1229 $this->lng->txt('show'));
1230 $this->ctrl->clearParameters($this);
1231 }
1232 else
1233 {
1234 $table_gui = new ilGroupParticipantsTableGUI($this,'role',true,$this->show_tracking,$role_id);
1235 $this->ctrl->setParameter($this,'role_hide_'.$role_id,1);
1236 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1237 $this->lng->txt('hide'));
1238 $this->ctrl->clearParameters($this);
1239 }
1240
1241 $table_gui->setTitle(ilObject::_lookupTitle($role_id),'icon_usr.gif',ilObject::_lookupTitle($role_id));
1242 $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($role_id)));
1243 $this->tpl->setCurrentBlock('member_block');
1244 $this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
1245 $this->tpl->parseCurrentBlock();
1246 }
1247
1248 $this->tpl->setVariable('TXT_SELECTED_USER',$this->lng->txt('grp_selected_users'));
1249 $this->tpl->setVariable('BTN_FOOTER_EDIT',$this->lng->txt('edit'));
1250 $this->tpl->setVariable('BTN_FOOTER_VAL',$this->lng->txt('remove'));
1251 $this->tpl->setVariable('BTN_FOOTER_MAIL',$this->lng->txt('grp_mem_send_mail'));
1252 $this->tpl->setVariable('ARROW_DOWN',ilUtil::getImagePath('arrow_downright.svg'));
1253
1254 }
static getMemberRoles($a_ref_id)
Get member roles (not auto generated)
setShowHidePrefs()
set preferences (show/hide tabel content)
static fillAutoCompleteToolbar($parent_object, ilToolbarGUI $toolbar=null, $a_options=array())
fill toolbar with
GUI class for course/group subscriptions.
GUI class for course/group waiting list.

References $GLOBALS, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilGroupParticipants\_getInstanceByObjId(), ilObject\_lookupTitle(), addMailToMemberButton(), ilObjectGUI\checkPermission(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilUtil\getImagePath(), ilObjectLP\getInstance(), ilGroupParticipants\getMemberRoles(), readMemberData(), setShowHidePrefs(), and setSubTabs().

Referenced by assignFromWaitingListObject(), assignSubscribersObject(), confirmAssignFromWaitingListObject(), confirmAssignSubscribersObject(), confirmDeleteMembersObject(), confirmRefuseFromListObject(), confirmRefuseSubscribersObject(), deleteMembersObject(), editMembersObject(), refuseFromListObject(), refuseSubscribersObject(), sendMailToSelectedUsersObject(), updateMembersObject(), and updateStatusObject().

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

◆ modifyItemGUI()

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

Modify Item ListGUI for presentation in container.

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

340 {
341 global $tree;
342
343 // if folder is in a course, modify item list gui according to course requirements
344 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),'crs'))
345 {
346 include_once("./Modules/Course/classes/class.ilObjCourse.php");
347 include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
348 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
349 ilObjCourseGUI::_modifyItemGUI($a_item_list_gui,'ilcoursecontentgui',$a_item_data, $a_show_path,
350 ilObjCourse::_lookupAboStatus($course_obj_id), $course_ref_id, $course_obj_id,
351 $this->object->getRefId());
352 }
353 }
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.

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

+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput ( )

Handle member view.

Returns

Reimplemented from ilObjectGUI.

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

3016 {
3017 global $rbacsystem;
3018 if(!$this->getCreationMode())
3019 {
3020 /*
3021 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
3022 $settings = ilMemberViewSettings::getInstance();
3023 if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
3024 {
3025 $settings->setContainer($this->object->getRefId());
3026 $rbacsystem->initMemberView();
3027 }
3028 */
3029 }
3030 parent::prepareOutput();
3031 }

References ilObjectGUI\getCreationMode().

Referenced by executeCommand().

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

◆ printMembersObject()

ilObjGroupGUI::printMembersObject ( )

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

3087 {
3088 global $ilTabs;
3089
3090 $this->checkPermission('write');
3091
3092 $ilTabs->clearTargets();
3093 $ilTabs->setBackTarget($this->lng->txt('back'),
3094 $this->ctrl->getLinkTarget($this, 'members'));
3095
3096 $list = $this->initAttendanceList();
3097 $form = $list->initForm('printMembersOutput');
3098 $this->tpl->setContent($form->getHTML());
3099 }
initAttendanceList()
Init attendance list object.

References ilObjectGUI\checkPermission(), and initAttendanceList().

+ Here is the call graph for this function:

◆ printMembersOutputObject()

ilObjGroupGUI::printMembersOutputObject ( )

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

3156 {
3157 $list = $this->initAttendanceList();
3158 $list->initFromForm();
3159 $list->setCallback(array($this, 'getAttendanceListUserData'));
3160
3161 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
3162 $this->members_data = $this->readMemberData($part->getParticipants());
3163 $list->getNonMemberUserData($this->members_data);
3164
3165 echo $list->getFullscreenHTML();
3166 exit();
3167 }
exit
Definition: login.php:54

References ilGroupParticipants\_getInstanceByObjId(), exit, initAttendanceList(), and readMemberData().

+ Here is the call graph for this function:

◆ readMemberData()

ilObjGroupGUI::readMemberData (   $ids,
  $role = 'admin',
  $selected_columns = null 
)

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

967 {
968 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
970
971 if($this->show_tracking)
972 {
973 include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
974 $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
975 $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
976 $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
977 }
978
979 if($privacy->enabledGroupAccessTimes())
980 {
981 include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
982 $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
983 }
984
985 $do_prtf = (is_array($selected_columns) &&
986 in_array('prtf', $selected_columns) &&
987 is_array($ids));
988 if($do_prtf)
989 {
990 include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
992 $this->ctrl->getLinkTarget($this, "members"));
993 }
994
995 foreach($ids as $usr_id)
996 {
997 $name = ilObjUser::_lookupName($usr_id);
998 $tmp_data['firstname'] = $name['firstname'];
999 $tmp_data['lastname'] = $name['lastname'];
1000 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
1001 $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
1002 $tmp_data['usr_id'] = $usr_id;
1003 $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
1004
1005 if($this->show_tracking)
1006 {
1007 if(in_array($usr_id,$completed))
1008 {
1009 $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
1010 }
1011 elseif(in_array($usr_id,$in_progress))
1012 {
1013 $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
1014 }
1015 elseif(in_array($usr_id,$failed))
1016 {
1017 $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
1018 }
1019 else
1020 {
1021 $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
1022 }
1023 }
1024
1025 if($privacy->enabledGroupAccessTimes())
1026 {
1027 if(isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts'])
1028 {
1029 $tmp_data['access_time'] = ilDatePresentation::formatDate(
1030 $tmp_date = new ilDateTime($progress[$usr_id]['ts'],IL_CAL_UNIX));
1031 $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
1032 }
1033 else
1034 {
1035 $tmp_data['access_time'] = $this->lng->txt('no_date');
1036 $tmp_data['access_time_unix'] = 0;
1037 }
1038 }
1039
1040 if($do_prtf)
1041 {
1042 $tmp_data['prtf'] = $all_prtf[$usr_id];
1043 }
1044
1045 $members[$usr_id] = $tmp_data;
1046 }
1047 return $members ? $members : array();
1048 }
$failed
Definition: Utf8Test.php:86
const IL_CAL_UNIX
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)
_lookupLogin($a_user_id)
lookup login

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

Referenced by confirmDeleteMembersObject(), editMembersObject(), membersObject(), and printMembersOutputObject().

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

◆ refuseApplicantsObject()

ilObjGroupGUI::refuseApplicantsObject ( )

adds applicant to group as member @access public

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

1979 {
1980 $user_ids = $_POST["user_id"];
1981
1982 if (empty($user_ids[0]))
1983 {
1984 $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1985 }
1986 include_once 'Services/Mail/classes/class.ilMail.php';
1987 $mail = new ilMail($_SESSION["AccountId"]);
1988
1989 foreach ($user_ids as $new_member)
1990 {
1991 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1992
1993 $this->object->deleteApplicationListEntry($new_member);
1994 $mail->sendMail($user->getLogin(),"","","Membership application refused: Group ".$this->object->getTitle(),"Your application has been refused.",array(),array('system'));
1995 }
1996
1997 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"),true);
1998 $this->ctrl->redirect($this,'members');
1999 }

References $_POST, $_SESSION, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ refuseFromListObject()

ilObjGroupGUI::refuseFromListObject ( )

refuse from waiting list

@access public

Returns

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

1392 {
1393 $this->checkPermission('write');
1394
1395 if(!count($_POST['waiting']))
1396 {
1397 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1398 $this->membersObject();
1399 return false;
1400 }
1401
1402 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1403 $waiting_list = new ilGroupWaitingList($this->object->getId());
1404
1405 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1406 foreach($_POST["waiting"] as $user_id)
1407 {
1408 $waiting_list->removeFromList($user_id);
1409 $this->object->members_obj->sendNotification(
1411 $user_id
1412 );
1413 }
1414
1415 ilUtil::sendSuccess($this->lng->txt('grp_users_removed_from_list'), true);
1416 $this->ctrl->redirect($this, "members");
1417 return true;
1418 }

References $_POST, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_REFUSED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ refuseSubscribersObject()

ilObjGroupGUI::refuseSubscribersObject ( )

refuse subscribers

@access public

Returns

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

1299 {
1300 global $lng;
1301
1302 $this->checkPermission('write');
1303
1304 if(!count($_POST['subscribers']))
1305 {
1306 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1307 $this->membersObject();
1308 return false;
1309 }
1310
1311 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1312 foreach($_POST['subscribers'] as $usr_id)
1313 {
1314 $this->object->members_obj->sendNotification(
1316 $usr_id
1317 );
1318 $this->object->members_obj->deleteSubscriber($usr_id);
1319 }
1320 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"));
1321 $this->membersObject();
1322 return true;
1323
1324 }

References $_POST, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_REFUSED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

Render group.

Reimplemented from ilContainerGUI.

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

327 {
328 global $ilTabs;
329
330 $ilTabs->activateTab("view_content");
331 $ret = parent::renderObject();
332 return $ret;
333
334 }

References $ret.

Referenced by executeCommand(), and viewObject().

+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

708 {
709 global $ilCtrl, $ilUser;
710
711 $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
712 $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
713 $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
714 $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
715 $this->object->update();
716
717 $ilCtrl->redirect($this, "editMapSettings");
718 }

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

+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

2445 {
2446 global $ilUser;
2447
2448 $ilUser->setPref("grpcrs_ntf_".$this->ref_id, (bool)$_REQUEST["grp_ntf"]);
2449 $ilUser->writePrefs();
2450
2451 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
2452 $this->ctrl->redirect($this, "infoScreen");
2453 }

References $_REQUEST, $ilUser, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ saveObject()

ilObjGroupGUI::saveObject ( )

save object

@global ilTree @access public

Returns

Reimplemented from ilObjectGUI.

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

374 {
375 global $ilErr,$ilUser,$tree;
376
377 $this->object = new ilObjGroup();
378
379 // we reduced the form, only 3 values left
380 // $this->load();
381
382 $grp_type = ilUtil::stripSlashes($_POST['grp_type']);
383 switch($grp_type)
384 {
385 case GRP_TYPE_PUBLIC:
386 $this->object->setRegistrationType(GRP_REGISTRATION_DIRECT);
387 break;
388
389 default:
390 $this->object->setRegistrationType(GRP_REGISTRATION_DEACTIVATED);
391 break;
392 }
393 $this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
394 $this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
395 $this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
396 $this->object->setViewMode(ilContainer::VIEW_INHERIT);
397
398 $ilErr->setMessage('');
399
400 if(!$this->object->validate())
401 {
402 $err = $this->lng->txt('err_check_input');
404 $err = $ilErr->getMessage();
405 ilUtil::sendInfo($err);
406 $this->createObject();
407 return true;
408 }
409
410 $this->object->create();
411 $this->putObjectInTree($this->object, $_GET["ref_id"]);
412 $this->object->initGroupStatus($this->object->getGroupType());
413
414 // check for parent group or course => SORT_INHERIT
415 $sort_mode = ilContainer::SORT_TITLE;
416 if(
417 $GLOBALS['tree']->checkForParentType($this->object->getRefId(),'crs') ||
418 $GLOBALS['tree']->checkForParentType($this->object->getRefId(),'grp')
419 )
420 {
421 $sort_mode = ilContainer::SORT_INHERIT;
422 }
423 // Save sorting
424 include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
425 $sort = new ilContainerSortingSettings($this->object->getId());
426 $sort->setSortMode($sort_mode);
427 $sort->update();
428
429
430 // Add user as admin and enable notification
431 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
432 $members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
433 $members_obj->add($ilUser->getId(),IL_GRP_ADMIN);
434 $members_obj->updateNotification($ilUser->getId(),1);
435
436
437 ilUtil::sendSuccess($this->lng->txt("grp_added"),true);
438 $this->ctrl->setParameter($this,'ref_id',$this->object->getRefId());
439 $this->ctrl->redirect($this, "edit");
440 }
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.

References $_GET, $_POST, $GLOBALS, $ilErr, $ilUser, ilObjectGUI\$tree, ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\createObject(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_TYPE_PUBLIC, IL_GRP_ADMIN, ilObjectGUI\putObjectInTree(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\sendSuccess(), ilContainer\SORT_INHERIT, ilContainer\SORT_TITLE, ilUtil\stripSlashes(), and ilContainer\VIEW_INHERIT.

+ Here is the call graph for this function:

◆ sendMailToSelectedUsersObject()

ilObjGroupGUI::sendMailToSelectedUsersObject ( )

show send mail

@access public

Parameters

return

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

1515 {
1516 if(isset($_GET['member_id']))
1517 {
1518 $_POST['participants'] = array($_GET['member_id']);
1519 }
1520 else
1521 {
1522 $_POST['participants'] = array_unique(array_merge((array) $_POST['admins'],
1523 (array) $_POST['members'],
1524 (array) $_POST['roles'],
1525 (array) $_POST['waiting'],
1526 (array) $_POST['subscribers']));
1527 }
1528 if (!count($_POST['participants']))
1529 {
1530 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
1531 $this->membersObject();
1532 return false;
1533 }
1534 foreach($_POST['participants'] as $usr_id)
1535 {
1536 $rcps[] = ilObjUser::_lookupLogin($usr_id);
1537 }
1538
1539 require_once 'Services/Mail/classes/class.ilMailFormCall.php';
1542 $this,
1543 'members',
1544 array(),
1545 array('type' => 'new', 'sig' => $this->createMailSignature())));
1546 return true;
1547 }
static getRedirectTarget($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
static setRecipients(array $recipients)

References $_GET, $_POST, ilObjUser\_lookupLogin(), createMailSignature(), ilMailFormCall\getRedirectTarget(), membersObject(), ilUtil\redirect(), ilUtil\sendFailure(), and ilMailFormCall\setRecipients().

+ Here is the call graph for this function:

◆ setShowHidePrefs()

ilObjGroupGUI::setShowHidePrefs ( )

set preferences (show/hide tabel content)

@access public

Returns

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

1556 {
1557 global $ilUser;
1558
1559 if(isset($_GET['admin_hide']))
1560 {
1561 $ilUser->writePref('grp_admin_hide',(int) $_GET['admin_hide']);
1562 }
1563 if(isset($_GET['member_hide']))
1564 {
1565 $ilUser->writePref('grp_member_hide',(int) $_GET['member_hide']);
1566 }
1567 if(isset($_GET['subscriber_hide']))
1568 {
1569 $ilUser->writePref('grp_subscriber_hide',(int) $_GET['subscriber_hide']);
1570 }
1571 if(isset($_GET['wait_hide']))
1572 {
1573 $ilUser->writePref('grp_wait_hide',(int) $_GET['wait_hide']);
1574 }
1575 }

References $_GET, and $ilUser.

Referenced by membersObject().

+ Here is the caller graph for this function:

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

@access protected

Parameters

return

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

2869 {
2870 global $rbacsystem,$ilUser,$ilAccess;
2871
2872 switch($a_tab)
2873 {
2874 case 'members':
2875 // for admins
2876 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2877 {
2878 $this->tabs_gui->addSubTabTarget("grp_edit_members",
2879 $this->ctrl->getLinkTarget($this,'members'),
2880 "members",
2881 get_class($this));
2882 }
2883 // for all
2884 $this->tabs_gui->addSubTabTarget("grp_members_gallery",
2885 $this->ctrl->getLinkTarget($this,'membersGallery'),
2886 "membersGallery", get_class($this));
2887
2888 // members map
2889 include_once("./Services/Maps/classes/class.ilMapUtil.php");
2890 if (ilMapUtil::isActivated() &&
2891 $this->object->getEnableGroupMap())
2892 {
2893 $this->tabs_gui->addSubTabTarget("grp_members_map",
2894 $this->ctrl->getLinkTarget($this,'membersMap'),
2895 "membersMap", get_class($this));
2896 }
2897
2898 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2899 {
2900 $this->tabs_gui->addSubTabTarget("events",
2901 $this->ctrl->getLinkTargetByClass('ilsessionoverviewgui','listSessions'),
2902 "", 'ilsessionoverviewgui');
2903 }
2904
2905 include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2906 if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()))
2907 {
2908 $this->tabs_gui->addSubTabTarget('grp_export_members',
2909 $this->ctrl->getLinkTargetByClass('ilmemberexportgui','show'),
2910 "", 'ilmemberexportgui');
2911 }
2912
2913 break;
2914
2915 case 'settings':
2916 $this->tabs_gui->addSubTabTarget("grp_settings",
2917 $this->ctrl->getLinkTarget($this,'edit'),
2918 "edit", get_class($this));
2919
2920 $this->tabs_gui->addSubTabTarget("grp_info_settings",
2921 $this->ctrl->getLinkTarget($this,'editInfo'),
2922 "editInfo", get_class($this));
2923
2924 // custom icon
2925 if ($this->ilias->getSetting("custom_icons"))
2926 {
2927 $this->tabs_gui->addSubTabTarget("grp_icon_settings",
2928 $this->ctrl->getLinkTarget($this,'editGroupIcons'),
2929 "editGroupIcons", get_class($this));
2930 }
2931
2932 include_once("./Services/Maps/classes/class.ilMapUtil.php");
2934 {
2935 $this->tabs_gui->addSubTabTarget("grp_map_settings",
2936 $this->ctrl->getLinkTarget($this,'editMapSettings'),
2937 "editMapSettings", get_class($this));
2938 }
2939
2940 $this->tabs_gui->addSubTabTarget('groupings',
2941 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
2942 'listGroupings',
2943 get_class($this));
2944
2945 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2946 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2947 // only show if export permission is granted
2948 if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2949 {
2950 $this->tabs_gui->addSubTabTarget('grp_custom_user_fields',
2951 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
2952 '',
2953 'ilobjectcustomuserfieldsgui');
2954 }
2955
2956
2957
2958 break;
2959
2960
2961 }
2962 }

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

Referenced by confirmAssignFromWaitingListObject(), confirmAssignSubscribersObject(), confirmDeleteMembersObject(), confirmRefuseFromListObject(), confirmRefuseSubscribersObject(), editGroupIconsObject(), editInfoObject(), editMapSettingsObject(), editMembersObject(), editObject(), executeCommand(), membersGalleryObject(), membersMapObject(), and membersObject().

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

1783 {
1784 global $ilUser,$tree, $ilCtrl;
1785
1786 $this->checkPermission('leave');
1787
1788 $this->object->members_obj->delete($ilUser->getId());
1789
1790 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1791 $this->object->members_obj->sendNotification(
1793 $ilUser->getId()
1794 );
1795 $this->object->members_obj->sendNotification(
1797 $ilUser->getId()
1798 );
1799
1800 ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'),true);
1801 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
1802 $tree->getParentId($this->object->getRefId()));
1803 $ilCtrl->redirectByClass("ilrepositorygui", "");
1804 }

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

+ Here is the call graph for this function:

◆ updateGroupIconsObject()

ilObjGroupGUI::updateGroupIconsObject ( )

update group icons

@access public

Returns

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

624 {
625 global $ilSetting;
626
627 $this->checkPermission('write');
628
629 $form = $this->initGroupIconsForm();
630 if($form->checkInput())
631 {
632 //save custom icons
633 if ($ilSetting->get("custom_icons"))
634 {
635 if($_POST["cont_icon_delete"])
636 {
637 $this->object->removeCustomIcon();
638 }
639 $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
640 }
641 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
642 $this->ctrl->redirect($this,"editGroupIcons");
643 }
644
645 $form->setValuesByPost();
646 $this->editGroupIconsObject($form);
647 }
editGroupIconsObject($a_form=null)
edit container icons

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

+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

@access public

Parameters

return

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

470 {
471 $type = $this->object->getGroupType() ?
472 $this->object->getGroupType() :
473 $this->object->readGroupStatus();
474
475 if($type == GRP_TYPE_PUBLIC)
476 {
477 $this->object->setGroupType(GRP_TYPE_CLOSED);
478 }
479 else
480 {
481 $this->object->setGroupType(GRP_TYPE_PUBLIC);
482 }
483 $this->object->updateGroupType();
484 $this->object->update();
485 ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
486 $this->ctrl->redirect($this,'edit');
487 }

References GRP_TYPE_CLOSED, GRP_TYPE_PUBLIC, and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

update info

@access public

Returns

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

817 {
818 $this->checkPermission('write');
819
820 $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
821 $this->object->update();
822
823 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
824 $this->editInfoObject();
825 return true;
826 }
editInfoObject()
edit info

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

+ Here is the call graph for this function:

◆ updateMembersObject()

ilObjGroupGUI::updateMembersObject ( )

update members

@access public

Parameters

return

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

1630 {
1631 $this->checkPermission('write');
1632
1633 if(!count($_POST['participants']))
1634 {
1635 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1636 $this->membersObject();
1637 return false;
1638 }
1639
1640 // Check minimum one admin
1641 $has_admin = false;
1642 $admin_role = $this->object->getDefaultAdminRole();
1643 foreach(ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins() as $admin_id)
1644 {
1645 if(!isset($_POST['roles'][$admin_id]))
1646 {
1647 $has_admin = true;
1648 break;
1649 }
1650 if(in_array($admin_role,$_POST['roles'][$admin_id]))
1651 {
1652 $has_admin = true;
1653 break;
1654 }
1655 }
1656
1657 if(!$has_admin and ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getCountAdmins())
1658 {
1659 ilUtil::sendFailure($this->lng->txt('grp_min_one_admin'));
1660 $_POST['members'] = $_POST['participants'];
1661 $this->editMembersObject();
1662 return false;
1663 }
1664
1665 $admin_role = $this->object->getDefaultAdminRole();
1666
1667 $notifications = $_POST['notification'] ? $_POST['notification'] : array();
1668 foreach($_POST['participants'] as $usr_id)
1669 {
1670 // Check if a status changed mail is required
1671 $notification = false;
1672 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array) $_POST['roles'][$usr_id]))
1673 {
1674 $notification = true;
1675 }
1676 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array) $_POST['roles'][$usr_id]))
1677 {
1678 $notification = true;
1679 }
1680
1681 // TODO: check no role, owner
1682 $this->object->members_obj->updateRoleAssignments($usr_id,(array) $_POST['roles'][$usr_id]);
1683
1684 // Disable notification for all of them
1685 $this->object->members_obj->updateNotification($usr_id,0);
1686
1687 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1688 {
1689 $this->object->members_obj->updateNotification($usr_id,1);
1690 }
1691
1692 if($notification)
1693 {
1694 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1695 $this->object->members_obj->sendNotification(
1697 $usr_id
1698 );
1699 }
1700 }
1701 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1702 $this->ctrl->redirect($this, "members");
1703 return true;
1704 }

References $_POST, ilGroupParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), editMembersObject(), membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_STATUS_CHANGED.

+ Here is the call graph for this function:

◆ updateObject()

ilObjGroupGUI::updateObject ( )

update GroupObject

Parameters
boolupdate group type @access public

Reimplemented from ilObjectGUI.

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

496 {
497 global $ilErr;
498
499 $this->checkPermission('write');
500
501
502 $this->initForm();
503 $this->form->checkInput();
504
505 $old_type = $this->object->getGroupType();
506
507 $this->load();
508 $ilErr->setMessage('');
509
510 if(!$this->object->validate())
511 {
512 $err = $this->lng->txt('err_check_input');
514 $err = $ilErr->getMessage();
515 ilUtil::sendInfo($err);
516 $this->editObject();
517 return true;
518 }
519
520 $modified = false;
521 if($this->object->isGroupTypeModified($old_type))
522 {
523 $modified = true;
524 $this->object->setGroupType($old_type);
525 }
526
527 $this->object->update();
528
529
530 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
532 $this->object->getId(),
533 $this->form,
534 array(
539 )
540 );
541
542 // Save sorting
543 $this->saveSortingSettings($this->form);
544
545 // BEGIN ChangeEvents: Record update Object.
546 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
547 global $ilUser;
548 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
549 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
550 // END PATCH ChangeEvents: Record update Object.
551
552 // Update ecs export settings
553 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
554 $ecs = new ilECSGroupSettings($this->object);
555 $ecs->handleSettingsUpdate();
556
557 if($modified)
558 {
559 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
560 ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
561 $confirm = new ilConfirmationGUI();
562 $confirm->setFormAction($this->ctrl->getFormAction($this));
563 $confirm->addItem(
564 'grp_type',
565 $this->object->getGroupType(),
566 $this->lng->txt('grp_info_new_grp_type').': '.($this->object->getGroupType() == GRP_TYPE_CLOSED ? $this->lng->txt('il_grp_status_open') : $this->lng->txt('il_grp_status_closed'))
567 );
568 $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
569 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
570
571 $this->tpl->setContent($confirm->getHTML());
572 return true;
573 }
574 else
575 {
576 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
577 $this->ctrl->redirect($this,'edit');
578 return true;
579 }
580 }
_recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
_catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
editObject()
Edit object.
load()
load settings
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.

References $ilErr, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), editObject(), GRP_TYPE_CLOSED, initForm(), load(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\sendQuestion(), ilUtil\sendSuccess(), ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ updateStatusObject()

ilObjGroupGUI::updateStatusObject ( )

update status

@access public

Parameters

return

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

1714 {
1715 $this->checkPermission('write');
1716
1717 $notification = $_POST['notification'] ? $_POST['notification'] : array();
1718 foreach($this->object->members_obj->getAdmins() as $admin_id)
1719 {
1720 $this->object->members_obj->updateNotification($admin_id,(int) in_array($admin_id,$notification));
1721 }
1722 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1723 $this->membersObject();
1724 }

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

+ Here is the call graph for this function:

◆ viewObject()

ilObjGroupGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

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

295 {
296 global $tree,$rbacsystem,$ilUser;
297
298 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
299 ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
300 $this->object->getRefId(),'grp');
301
302 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
303 {
304 parent::viewObject();
305 return true;
306 }
307
308 if(!$this->checkAgreement())
309 {
310 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
311 $this->tabs_gui->setTabActive('view_content');
312 $this->ctrl->setReturn($this,'view');
313 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
314 $this->ctrl->setCmdClass(get_class($agreement));
315 $this->ctrl->forwardCommand($agreement);
316 return true;
317 }
318
319 $this->tabs_gui->setTabActive('view_content');
320 $this->renderObject();
321 }
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
checkAgreement()
Check agreement and redirect if it is not accepted.

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

Referenced by leaveObject().

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

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