ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 (ilPropertyFormGUI $a_form=null)
 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...
 
 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...
 
 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 (ilPropertyFormGUI $a_form)
 load settings More...
 
 prepareOutput ()
 Handle member view. More...
 
 createMailSignature ()
 Create a course mail signature. 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...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 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 ()
 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...
 
 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...
 
 jump2UsersGalleryObject ()
 
- 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, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 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
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 

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

33 {
34 $this->type = "grp";
35 $this->ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
36
37 $this->lng->loadLanguageModule('grp');
38 }
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 2336 of file class.ilObjGroupGUI.php.

2337 {
2338 global $ilAccess, $ilErr, $lng,$ilUser;
2339
2340 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2341 if(substr($a_add,0,5) == 'rcode')
2342 {
2343 if($ilUser->getId() == ANONYMOUS_USER_ID)
2344 {
2345 // Redirect to login for anonymous
2347 "login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
2348 $ilUser->getCurrentLanguage()
2349 );
2350 }
2351
2352 // Redirects to target location after assigning user to course
2354 $a_target,
2356 substr($a_add,5)
2357 );
2358 }
2359
2360 if ($a_add == "mem" && $ilAccess->checkAccess("write", "", $a_target))
2361 {
2362 ilObjectGUI::_gotoRepositoryNode($a_target, "members");
2363 }
2364
2365 if ($ilAccess->checkAccess("read", "", $a_target))
2366 {
2368 }
2369 else
2370 {
2371 // to do: force flat view
2372 if ($ilAccess->checkAccess("visible", "", $a_target))
2373 {
2374 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
2375 }
2376 else
2377 {
2378 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
2379 {
2380 ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
2383 }
2384 }
2385 }
2386 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2387 }
$_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 3157 of file class.ilObjGroupGUI.php.

3158 {
3159 global $ilAccess, $ilUser, $rbacsystem;
3160 include_once 'Services/Mail/classes/class.ilMail.php';
3161 $mail = new ilMail($ilUser->getId());
3162
3163 if(
3164 ($ilAccess->checkAccess('write','',$this->object->getRefId()) or
3165 $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) and
3166 $rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId()))
3167 {
3168
3169 if($a_separator)
3170 {
3171 $ilToolbar->addSeparator();
3172 }
3173
3174 if($back_cmd)
3175 {
3176 $this->ctrl->setParameter($this, "back_cmd", $back_cmd);
3177 }
3178
3179 $ilToolbar->addButton($this->lng->txt("mail_members"),
3180 $this->ctrl->getLinkTargetByClass('ilMailMemberSearchGUI','')
3181 );
3182 }
3183 }
Class Mail this class handles base functions for mail handling.
const MAIL_ALLOWED_ALL

References $ilUser, and ilObjGroup\MAIL_ALLOWED_ALL.

Referenced by executeCommand(), 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 1755 of file class.ilObjGroupGUI.php.

1756 {
1757 if (empty($user_ids[0]))
1758 {
1759 $GLOBALS['lng']->loadLanguageModule('search');
1760 ilUtil::sendFailure($this->lng->txt('search_err_user_not_exist'),true);
1761 return false;
1762 }
1763
1764 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1765 $assigned = FALSE;
1766 foreach((array) $user_ids as $new_member)
1767 {
1768 if($part->isAssigned($new_member))
1769 {
1770 continue;
1771 }
1772 switch($a_type)
1773 {
1774 case $this->object->getDefaultAdminRole():
1775 $part->add($new_member, IL_GRP_ADMIN);
1776 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1777 $part->sendNotification(
1779 $new_member
1780 );
1781 $assigned = TRUE;
1782 break;
1783
1784 case $this->object->getDefaultMemberRole():
1785 $part->add($new_member, IL_GRP_MEMBER);
1786 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1787 $part->sendNotification(
1789 $new_member
1790 );
1791 $assigned = TRUE;
1792 break;
1793
1794 default:
1795 if(in_array($a_type,$this->object->getLocalGroupRoles(true)))
1796 {
1797 $part->add($new_member,IL_GRP_MEMBER);
1798 $part->updateRoleAssignments($new_member,(array) $a_type);
1799 }
1800 else
1801 {
1802 ilUtil::sendFailure($this->lng->txt("grp_cannot_find_role"),true);
1803 return false;
1804 }
1805 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1806 $part->sendNotification(
1808 $new_member
1809 );
1810 $assigned = TRUE;
1811 break;
1812 }
1813 }
1814
1815 if($assigned)
1816 {
1817 ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
1818 }
1819 else
1820 {
1821 ilUtil::sendSuccess($this->lng->txt('grp_users_already_assigned'),TRUE);
1822 }
1823 $this->ctrl->redirect($this,'members');
1824 }
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['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

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

1250 {
1251 $this->checkPermission('write');
1252
1253 if(!count($_POST["waiting"]))
1254 {
1255 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
1256 $this->membersObject();
1257 return false;
1258 }
1259
1260 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1261 $waiting_list = new ilGroupWaitingList($this->object->getId());
1262
1263 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1264
1265 $added_users = 0;
1266 foreach($_POST["waiting"] as $user_id)
1267 {
1268 if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
1269 {
1270 continue;
1271 }
1272 if($this->object->members_obj->isAssigned($user_id))
1273 {
1274 continue;
1275 }
1276 $this->object->members_obj->add($user_id,IL_GRP_MEMBER);
1277 $this->object->members_obj->sendNotification(
1279 $user_id
1280 );
1281 $waiting_list->removeFromList($user_id);
1282
1283 ++$added_users;
1284 }
1285 if($added_users)
1286 {
1287 ilUtil::sendSuccess($this->lng->txt("grp_users_added"), true);
1288 $this->ctrl->redirect($this, "members");
1289
1290 return true;
1291 }
1292 else
1293 {
1294 ilUtil::sendFailure($this->lng->txt("grp_users_already_assigned"));
1295 $this->searchObject();
1296
1297 return false;
1298 }
1299 }
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 1727 of file class.ilObjGroupGUI.php.

1728 {
1729 $user_ids = $_POST["id"];
1730
1731 if (empty($user_ids[0]))
1732 {
1733 // TODO: jumps back to grp content. go back to last search result
1734 $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1735 }
1736
1737 foreach ($user_ids as $new_member)
1738 {
1739 if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
1740 {
1741 $this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
1742 }
1743 }
1744
1745 unset($_SESSION["saved_post"]);
1746
1747 ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
1748 $this->ctrl->redirect($this,'members');
1749 }
$_SESSION["AccountId"]

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

1179 {
1181
1182 $this->checkPermission('write');
1183
1184 if(!count($_POST['subscribers']))
1185 {
1186 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1187 $this->membersObject();
1188 return false;
1189 }
1190
1191 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1192 foreach($_POST['subscribers'] as $usr_id)
1193 {
1194 $this->object->members_obj->sendNotification(
1196 $usr_id
1197 );
1198
1199 $this->object->members_obj->add($usr_id,IL_GRP_MEMBER);
1200 $this->object->members_obj->deleteSubscriber($usr_id);
1201
1202 }
1203 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_assigned"),true);
1204 $this->ctrl->redirect($this,'members');
1205 return true;
1206 }
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 1650 of file class.ilObjGroupGUI.php.

1651 {
1652 $return_location = $_GET["cmd_return_location"];
1653 if (strcmp($return_location, "") == 0)
1654 {
1655 $return_location = "";
1656 }
1657
1658 $this->ctrl->redirect($this, $return_location);
1659 }

References $_GET, and ilObjectGUI\$return_location.

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

@access private

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

2921 {
2922 global $ilUser,$ilAccess;
2923
2924 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2925 {
2926 return true;
2927 }
2928
2929 // Disable aggrement if is not member of group
2930 if(!$this->object->members_obj->isAssigned($ilUser->getId()))
2931 {
2932 return true;
2933 }
2934
2935 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
2936 if(ilMemberViewSettings::getInstance()->isActive())
2937 {
2938 return true;
2939 }
2940
2941 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2942 include_once('Services/Membership/classes/class.ilMemberAgreement.php');
2944
2945 // Check agreement
2946 if(($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2947 and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
2948 {
2949 return false;
2950 }
2951 // Check required fields
2952 include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2953 if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
2954 {
2955 return false;
2956 }
2957 return true;
2958 }
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 2158 of file class.ilObjGroupGUI.php.

2159 {
2160 return str_replace(array("��","��","��","��","��","��","��"), array("ae","oe","ue","ss","Ae","Oe","Ue"), $str);
2161 }

Referenced by exportMembersObject().

+ Here is the caller graph for this function:

◆ confirmAssignFromWaitingListObject()

ilObjGroupGUI::confirmAssignFromWaitingListObject ( )

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

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

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

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

1342 {
1343 $this->checkPermission('write');
1344
1345 $participants_to_delete = (array) array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
1346
1347 if(!count($participants_to_delete))
1348 {
1349 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1350 $this->membersObject();
1351 return false;
1352 }
1353
1354 // Check last admin
1355 $admins = (array) ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins();
1356
1357 $admins_after = (array) array_diff($admins, $participants_to_delete);
1358 if(!count($admins_after) and count($admins))
1359 {
1360 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
1361 $this->membersObject();
1362 return false;
1363 }
1364
1365 $this->setSubTabs('members');
1366 $this->tabs_gui->setTabActive('members');
1367 $this->tabs_gui->setSubTabActive('grp_edit_members');
1368
1369 include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
1370 $confirm = new ilConfirmationGUI();
1371 $confirm->setFormAction($this->ctrl->getFormAction($this,'deleteMembers'));
1372 $confirm->setHeaderText($this->lng->txt('grp_dismiss_member'));
1373 $confirm->setConfirm($this->lng->txt('confirm'),'deleteMembers');
1374 $confirm->setCancel($this->lng->txt('cancel'),'members');
1375
1376 foreach($this->readMemberData(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles'])) as $participants)
1377 {
1378 $confirm->addItem('participants[]',
1379 $participants['usr_id'],
1380 $participants['lastname'].', '.$participants['firstname'].' ['.$participants['login'].']',
1381 ilUtil::getImagePath('icon_usr.svg'));
1382 }
1383
1384 $this->tpl->setContent($confirm->getHTML());
1385 }
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 3269 of file class.ilObjGroupGUI.php.

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

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

3194 {
3195 if(!is_array($_POST["subscribers"]))
3196 {
3197 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
3198 $this->membersObject();
3199
3200 return false;
3201 }
3202
3203 $this->lng->loadLanguageModule('mmbr');
3204
3205 $this->checkPermission('write');
3206 $this->setSubTabs('members');
3207 $this->tabs_gui->setTabActive('members');
3208 $this->tabs_gui->setSubTabActive('grp_edit_members');
3209
3210 include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
3211 $c_gui = new ilConfirmationGUI();
3212
3213 // set confirm/cancel commands
3214 $c_gui->setFormAction($this->ctrl->getFormAction($this, "refuseSubscribers"));
3215 $c_gui->setHeaderText($this->lng->txt("info_refuse_sure"));
3216 $c_gui->setCancel($this->lng->txt("cancel"), "members");
3217 $c_gui->setConfirm($this->lng->txt("confirm"), "refuseSubscribers");
3218
3219 foreach($_POST["subscribers"] as $subscribers)
3220 {
3221 $name = ilObjUser::_lookupName($subscribers);
3222
3223 $c_gui->addItem('subscribers[]',
3224 $name['user_id'],
3225 $name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
3226 ilUtil::getImagePath('icon_usr.svg'));
3227 }
3228
3229 $this->tpl->setContent($c_gui->getHTML());
3230 }

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

+ Here is the call graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )

Create a course mail signature.

Returns
string

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

2988 {
2989 $link = chr(13).chr(10).chr(13).chr(10);
2990 $link .= $this->lng->txt('grp_mail_permanent_link');
2991 $link .= chr(13).chr(10).chr(13).chr(10);
2992 include_once 'Services/Link/classes/class.ilLink.php';
2993 $link .= ilLink::_getLink($this->object->getRefId());
2994 return rawurlencode(base64_encode($link));
2995 }

References ilLink\_getLink().

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

1395 {
1396 $this->checkPermission('write');
1397
1398 if(!count($_POST['participants']))
1399 {
1400 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1401 $this->membersObject();
1402 return true;
1403 }
1404
1405 $this->object->members_obj->deleteParticipants($_POST['participants']);
1406
1407 // Send notification
1408 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1409 foreach($_POST['participants'] as $part)
1410 {
1411 $this->object->members_obj->sendNotification(
1413 $part
1414 );
1415 }
1416
1417
1418 ilUtil::sendSuccess($this->lng->txt("grp_msg_membership_annulled"), true);
1419 $this->ctrl->redirect($this, "members");
1420 return true;
1421 }

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

642 {
643 global $tpl;
644
645 $this->checkPermission('write');
646
647 $this->setSubTabs("settings");
648 $this->tabs_gui->setTabActive('settings');
649 $this->tabs_gui->setSubTabActive('grp_icon_settings');
650
651 if(!$a_form)
652 {
653 $a_form = $this->initGroupIconsForm();
654 }
655
656 $tpl->setContent($a_form->getHTML());
657 }

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

825 {
826 global $ilErr,$ilAccess;
827
828 $this->checkPermission('write');
829
830 $this->setSubTabs('settings');
831 $this->tabs_gui->setTabActive('settings');
832 $this->tabs_gui->setSubTabActive('grp_info_settings');
833
834 $form = $this->initInfoEditor();
835 $this->tpl->setContent($form->getHTML());
836 }
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 708 of file class.ilObjGroupGUI.php.

709 {
710 global $ilUser, $ilCtrl, $ilUser, $ilAccess;
711
712 $this->setSubTabs("settings");
713 $this->tabs_gui->setTabActive('settings');
714 $this->tabs_gui->setSubTabActive('grp_map_settings');
715
716 include_once('./Services/Maps/classes/class.ilMapUtil.php');
717 if (!ilMapUtil::isActivated() ||
718 !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
719 {
720 return;
721 }
722
723 $latitude = $this->object->getLatitude();
724 $longitude = $this->object->getLongitude();
725 $zoom = $this->object->getLocationZoom();
726
727 // Get Default settings, when nothing is set
728 if ($latitude == 0 && $longitude == 0 && $zoom == 0)
729 {
731 $latitude = $def["latitude"];
732 $longitude = $def["longitude"];
733 $zoom = $def["zoom"];
734 }
735
736
737 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
738 $form = new ilPropertyFormGUI();
739 $form->setFormAction($ilCtrl->getFormAction($this));
740
741 $form->setTitle($this->lng->txt("grp_map_settings"));
742
743 // enable map
744 $public = new ilCheckboxInputGUI($this->lng->txt("grp_enable_map"),
745 "enable_map");
746 $public->setValue("1");
747 $public->setChecked($this->object->getEnableGroupMap());
748 $form->addItem($public);
749
750 // map location
751 $loc_prop = new ilLocationInputGUI($this->lng->txt("grp_map_location"),
752 "location");
753 $loc_prop->setLatitude($latitude);
754 $loc_prop->setLongitude($longitude);
755 $loc_prop->setZoom($zoom);
756 $form->addItem($loc_prop);
757
758 $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
759
760 $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
761 }
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 1498 of file class.ilObjGroupGUI.php.

1499 {
1500 $_POST['members'] = array((int) $_GET['member_id']);
1501 $this->editMembersObject();
1502 }
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 1510 of file class.ilObjGroupGUI.php.

1511 {
1512 $this->checkPermission('write');
1513
1514 $post_participants = array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
1515 $real_participants = ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getParticipants();
1516 $participants = array_intersect((array) $post_participants, (array) $real_participants);
1517
1518 if(!count($participants))
1519 {
1520 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1521 $this->membersObject();
1522 return false;
1523 }
1524
1525 $this->setSubTabs('members');
1526 $this->tabs_gui->setTabActive('members');
1527 $this->tabs_gui->setSubTabActive('grp_edit_members');
1528
1529 include_once('./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
1530 $table_gui = new ilGroupEditParticipantsTableGUI($this);
1531 $table_gui->setTitle($this->lng->txt('grp_mem_change_status'),'icon_usr.svg',$this->lng->txt('grp_mem_change_status'));
1532 $table_gui->setData($this->readMemberData($participants));
1533
1534 $this->tpl->setContent($table_gui->getHTML());
1535 return true;
1536 }

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 ( ilPropertyFormGUI  $a_form = null)

Edit object.

@access public

Parameters
ilPropertyFormGUI
Returns

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

489 {
490 $this->checkPermission("write");
491
492 $this->setSubTabs('settings');
493 $this->tabs_gui->setTabActive('settings');
494 $this->tabs_gui->setSubTabActive('grp_settings');
495
496 if(!$a_form)
497 {
498 $a_form = $this->initForm('edit');
499 }
500
501 $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
502 }
initForm($a_mode='edit')
init create/edit form

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

+ Here is the call graph for this function:

◆ executeCommand()

& ilObjGroupGUI::executeCommand ( )

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

Reimplemented from ilContainerGUI.

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

41 {
42 global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilCtrl, $ilToolbar;
43
44 $next_class = $this->ctrl->getNextClass($this);
45 $cmd = $this->ctrl->getCmd();
46 $this->prepareOutput();
47
48 // show repository tree
49 $this->showRepTree();
50
51 // add entry to navigation history
52 if (!$this->getCreationMode() &&
53 $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
54 {
55 include_once("./Services/Link/classes/class.ilLink.php");
56 $ilNavigationHistory->addItem($_GET["ref_id"],
57 ilLink::_getLink($_GET["ref_id"], "grp"), "grp");
58 }
59
60 switch($next_class)
61 {
62 case 'ilgroupregistrationgui':
63 $this->ctrl->setReturn($this,'');
64 $this->tabs_gui->setTabActive('join');
65 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
66 $registration = new ilGroupRegistrationGUI($this->object);
67 $this->ctrl->forwardCommand($registration);
68 break;
69
70 case 'ilusersgallerygui':
71 $is_participant = (bool)ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
72 if(!$ilAccess->checkAccess('write', '', $this->ref_id) && !$is_participant)
73 {
74 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
75 }
76
77 $this->addMailToMemberButton($ilToolbar, 'jump2UsersGallery');
78
79 require_once 'Services/User/classes/class.ilUsersGalleryParticipants.php';
80 require_once 'Services/User/classes/class.ilUsersGalleryGUI.php';
81 $this->setSubTabs('members');
82 $this->tabs_gui->setTabActive('members');
83 $this->tabs_gui->setSubTabActive('grp_members_gallery');
84
85 $provider = new ilUsersGalleryParticipants($this->object->members_obj);
86 $gallery_gui = new ilUsersGalleryGUI($provider);
87 $this->ctrl->forwardCommand($gallery_gui);
88 break;
89
90 case 'ilpermissiongui':
91 $this->tabs_gui->setTabActive('perm_settings');
92 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
93 $perm_gui =& new ilPermissionGUI($this);
94 $ret =& $this->ctrl->forwardCommand($perm_gui);
95 break;
96
97 case 'ilrepositorysearchgui':
98
99 if(!$this->checkPermissionBool('write'))
100 {
101 $GLOBALS['ilErr']->raiseError($GLOBALS['lng']->txt('permission_denied'), $GLOBALS['ilErr']->WARNING);
102 }
103 include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
104 $rep_search =& new ilRepositorySearchGUI();
105 $rep_search->setCallback($this,
106 'addUserObject',
107 $this->getLocalRoles()
108 );
109
110 // Set tabs
111 $this->tabs_gui->setTabActive('members');
112 $this->ctrl->setReturn($this,'members');
113 $ret =& $this->ctrl->forwardCommand($rep_search);
114 $this->setSubTabs('members');
115 $this->tabs_gui->setSubTabActive('members');
116 break;
117
118 case "ilinfoscreengui":
119 $ret =& $this->infoScreen();
120 break;
121
122 case "illearningprogressgui":
123 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
124
126 $this->object->getRefId(),
127 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
128 $this->ctrl->forwardCommand($new_gui);
129 $this->tabs_gui->setTabActive('learning_progress');
130 break;
131
132 case 'ilobjcoursegroupinggui':
133 $this->setSubTabs('settings');
134
135 include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
136 $this->ctrl->setReturn($this,'edit');
137 $crs_grp_gui =& new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
138 $this->ctrl->forwardCommand($crs_grp_gui);
139
140 $this->tabs_gui->setTabActive('settings');
141 $this->tabs_gui->setSubTabActive('groupings');
142 break;
143
144 case 'ilcoursecontentgui':
145
146 include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
147 $course_content_obj = new ilCourseContentGUI($this);
148 $this->ctrl->forwardCommand($course_content_obj);
149 break;
150
151 case 'ilpublicuserprofilegui':
152 require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
153 $this->setSubTabs('members');
154 $this->tabs_gui->setTabActive('group_members');
155 $this->tabs_gui->setSubTabActive('grp_members_gallery');
156 $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
157 $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass("ilUsersGalleryGUI",'view'));
158 $html = $this->ctrl->forwardCommand($profile_gui);
159 $this->tpl->setVariable("ADM_CONTENT", $html);
160 break;
161
162 case "ilcolumngui":
163 $this->tabs_gui->setTabActive('none');
164 $this->checkPermission("read");
165 include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
166 $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
167 ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
168 $this->renderObject();
169 break;
170
171 // container page editing
172 case "ilcontainerpagegui":
173 $ret = $this->forwardToPageObject();
174 if ($ret != "")
175 {
176 $this->tpl->setContent($ret);
177 }
178 break;
179
180 case 'ilobjectcopygui':
181 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
182 $cp = new ilObjectCopyGUI($this);
183 $cp->setType('grp');
184 $this->ctrl->forwardCommand($cp);
185 break;
186
187 case "ilobjstylesheetgui":
188 $this->forwardToStyleSheet();
189 break;
190
191 case 'ilobjectcustomuserfieldsgui':
192 if(isset($_REQUEST['member_id']))
193 {
194 $this->ctrl->setReturn($this,'members');
195 }
196 include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
197 $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
198 $this->setSubTabs('settings');
199 $this->tabs_gui->setTabActive('settings');
200 $this->ctrl->forwardCommand($cdf_gui);
201 break;
202
203 case 'ilmemberagreementgui':
204 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
205 $this->ctrl->setReturn($this,'');
206 $this->tabs_gui->setTabActive('view_content');
207 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
208 $this->ctrl->forwardCommand($agreement);
209 break;
210
211 case 'ilexportgui':
212 $this->tabs_gui->setTabActive('export');
213 include_once './Services/Export/classes/class.ilExportGUI.php';
214 $exp = new ilExportGUI($this);
215 $exp->addFormat('xml');
216 $this->ctrl->forwardCommand($exp);
217 break;
218
219 case 'ilmemberexportgui':
220 include_once('./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
221
222 $this->setSubTabs('members');
223 $this->tabs_gui->setTabActive('members');
224 $this->tabs_gui->setSubTabActive('grp_export_members');
225 $export = new ilMemberExportGUI($this->object->getRefId());
226 $this->ctrl->forwardCommand($export);
227 break;
228
229 case "ilcommonactiondispatchergui":
230 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
232 $this->ctrl->forwardCommand($gui);
233 break;
234
235 case 'ilobjectservicesettingsgui':
236 $this->ctrl->setReturn($this,'edit');
237 $this->setSubTabs("settings");
238 $this->tabs_gui->activateTab('settings');
239 $this->tabs_gui->activateSubTab('tool_settings');
240
241 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
242 $service = new ilObjectServiceSettingsGUI(
243 $this,
244 $this->object->getId(),
245 array(
247 ));
248 $this->ctrl->forwardCommand($service);
249 break;
250
251 case 'ilsessionoverviewgui':
252 $this->setSubTabs('members');
253 $this->tabs_gui->setTabActive('members');
254 $this->tabs_gui->setSubTabActive('events');
255
256 include_once './Modules/Group/classes/class.ilGroupParticipants.php';
257 $prt = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
258
259 include_once('./Modules/Session/classes/class.ilSessionOverviewGUI.php');
260 $overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt);
261 $this->ctrl->forwardCommand($overview);
262 break;
263 case 'ilmailmembersearchgui':
264 include_once 'Services/Mail/classes/class.ilMail.php';
265 $mail = new ilMail($ilUser->getId());
266
267 if(!($ilAccess->checkAccess('write','',$this->object->getRefId()) ||
268 $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) &&
269 $rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId()))
270 {
271 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
272 }
273
274 $this->tabs_gui->setTabActive('members');
275
276 include_once './Services/Contact/classes/class.ilMailMemberSearchGUI.php';
277 include_once './Services/Contact/classes/class.ilMailMemberGroupRoles.php';
278
279 $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberGroupRoles());
280 $mail_search->setObjParticipants(ilCourseParticipants::_getInstanceByObjId($this->object->getId()));
281 $this->ctrl->forwardCommand($mail_search);
282 break;
283 default:
284
285 // check visible permission
286 if (!$this->getCreationMode() and
287 !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp') and
288 !$ilAccess->checkAccess('read','',$this->object->getRefId(),'grp') )
289 {
290 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
291 }
292
293 // #9401 - see also ilStartupGUI::_checkGoto()
294 if($cmd == 'infoScreenGoto')
295 {
296 if($this->object->isRegistrationEnabled())
297 {
298 $cmd = 'join';
299 }
300 else
301 {
302 $cmd = 'infoScreen';
303 }
304 }
305
306 // check read permission
307 if ((!$this->getCreationMode()
308 && !$rbacsystem->checkAccess('read',$this->object->getRefId()) && $cmd != 'infoScreen')
309 || $cmd == 'join')
310 {
311 // no join permission -> redirect to info screen
312 if (!$rbacsystem->checkAccess('join',$this->object->getRefId()))
313 {
314 $this->ctrl->redirect($this, "infoScreen");
315 }
316 else // no read -> show registration
317 {
318 include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
319 $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
320 }
321 }
322 if(!$cmd)
323 {
324 $cmd = 'view';
325 }
326 $cmd .= 'Object';
327 $this->$cmd();
328 break;
329 }
330
331 $this->addHeaderAction();
332 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
& forwardToPageObject()
forward command to page object
forwardToStyleSheet()
Forward to style object.
Class ilCourseContentGUI.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Export User Interface Class.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
GUI class for group registrations.
Class ilObjUserTrackingGUI.
Class ilMailMemberCourseRoles.
Class ilMailMemberSearchGUI.
Class ilObjCourseGroupingGUI.
renderObject()
Render group.
infoScreen()
show information screen
addMailToMemberButton($ilToolbar, $back_cmd=null, $a_separator=false)
add Mail to Member button to toolbar
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.
@ilCtrl_Calls ilUsersGalleryGUI: ilPublicUserProfileGUI @ilCtrl_isCalledBy ilUsersGalleryGUI: ilObjCo...
Class ilUsersGalleryParticipants.
$html
Definition: example_001.php:87
$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, $html, $ilCtrl, $ilErr, $ilUser, League\OAuth2\Client\Provider\$provider, $ret, ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilGroupParticipants\_isParticipant(), ilObjectGUI\addHeaderAction(), addMailToMemberButton(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, 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 2012 of file class.ilObjGroupGUI.php.

2013 {
2014 $title = preg_replace("/\s/", "_", $this->object->getTitle());
2015 include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
2016 $adapter = new ilExcelWriterAdapter("export_" . $title . ".xls");
2017 $workbook = $adapter->getWorkbook();
2018 // Creating a worksheet
2019 $format_bold =& $workbook->addFormat();
2020 $format_bold->setBold();
2021 $format_percent =& $workbook->addFormat();
2022 $format_percent->setNumFormat("0.00%");
2023 $format_datetime =& $workbook->addFormat();
2024 $format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
2025 $format_title =& $workbook->addFormat();
2026 $format_title->setBold();
2027 $format_title->setColor('black');
2028 $format_title->setPattern(1);
2029 $format_title->setFgColor('silver');
2030 $worksheet =& $workbook->addWorksheet();
2031 $column = 0;
2032 $profile_data = array("email", "gender", "firstname", "lastname", "person_title", "institution",
2033 "department", "street", "zipcode","city", "country", "phone_office", "phone_home", "phone_mobile",
2034 "fax", "matriculation");
2035 foreach ($profile_data as $data)
2036 {
2037 $worksheet->writeString(0, $column++, $this->cleanString($this->lng->txt($data)), $format_title);
2038 }
2039 $member_ids = $this->object->getGroupMemberIds();
2040 $row = 1;
2041 foreach ($member_ids as $member_id)
2042 {
2043 $column = 0;
2044 $member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
2045 if ($member->getPref("public_email")=="y")
2046 {
2047 $worksheet->writeString($row, $column++, $this->cleanString($member->getEmail()));
2048 }
2049 else
2050 {
2051 $column++;
2052 }
2053 $worksheet->writeString($row, $column++, $this->cleanString($this->lng->txt("gender_" . $member->getGender())));
2054 $worksheet->writeString($row, $column++, $this->cleanString($member->getFirstname()));
2055 $worksheet->writeString($row, $column++, $this->cleanString($member->getLastname()));
2056 $worksheet->writeString($row, $column++, $this->cleanString($member->getUTitle()));
2057 if ($member->getPref("public_institution")=="y")
2058 {
2059 $worksheet->writeString($row, $column++, $this->cleanString($member->getInstitution()));
2060 }
2061 else
2062 {
2063 $column++;
2064 }
2065 if ($member->getPref("public_department")=="y")
2066 {
2067 $worksheet->writeString($row, $column++, $this->cleanString($member->getDepartment()));
2068 }
2069 else
2070 {
2071 $column++;
2072 }
2073 if ($member->getPref("public_street")=="y")
2074 {
2075 $worksheet->writeString($row, $column++, $this->cleanString($member->getStreet()));
2076 }
2077 else
2078 {
2079 $column++;
2080 }
2081 if ($member->getPref("public_zip")=="y")
2082 {
2083 $worksheet->writeString($row, $column++, $this->cleanString($member->getZipcode()));
2084 }
2085 else
2086 {
2087 $column++;
2088 }
2089 if ($member->getPref("public_city")=="y")
2090 {
2091 $worksheet->writeString($row, $column++, $this->cleanString($member->getCity()));
2092 }
2093 else
2094 {
2095 $column++;
2096 }
2097 if ($member->getPref("public_country")=="y")
2098 {
2099 $worksheet->writeString($row, $column++, $this->cleanString($member->getCountry()));
2100 }
2101 else
2102 {
2103 $column++;
2104 }
2105 if ($member->getPref("public_phone_office")=="y")
2106 {
2107 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneOffice()));
2108 }
2109 else
2110 {
2111 $column++;
2112 }
2113 if ($member->getPref("public_phone_home")=="y")
2114 {
2115 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneHome()));
2116 }
2117 else
2118 {
2119 $column++;
2120 }
2121 if ($member->getPref("public_phone_mobile")=="y")
2122 {
2123 $worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneMobile()));
2124 }
2125 else
2126 {
2127 $column++;
2128 }
2129 if ($member->getPref("public_fax")=="y")
2130 {
2131 $worksheet->writeString($row, $column++, $this->cleanString($member->getFax()));
2132 }
2133 else
2134 {
2135 $column++;
2136 }
2137 if ($member->getPref("public_matriculation")=="y")
2138 {
2139 $worksheet->writeString($row, $column++, $this->cleanString($member->getMatriculation()));
2140 }
2141 else
2142 {
2143 $column++;
2144 }
2145 $row++;
2146 }
2147 $workbook->close();
2148 }
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 1996 of file class.ilObjGroupGUI.php.

1997 {
1998 $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.grp_members_export.html",
1999 "Modules/Group");
2000 $this->tpl->setCurrentBlock("adm_content");
2001 $this->tpl->setVariable("FORMACTION", $this->getFormAction("export",$this->ctrl->getFormAction($this)));
2002 $this->tpl->setVariable("BUTTON_EXPORT", $this->lng->txt("export_group_members"));
2003 $this->tpl->parseCurrentBlock();
2004 }
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 3102 of file class.ilObjGroupGUI.php.

3103 {
3104 $data = $this->members_data[$a_user_id];
3105 $data['access'] = $data['access_time'];
3106 $data['progress'] = $this->lng->txt($data['progress']);
3107
3108 return $data;
3109 }

References ilObjectGUI\$data.

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )
protected

returns all local roles [role_id] => title

Returns
array

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

3130 {
3131 $local_roles = $this->object->getLocalGroupRoles(false);
3132 $grp_member = $this->object->getDefaultMemberRole();
3133 $grp_roles = array();
3134
3135 //put the group member role to the top of the crs_roles array
3136 if(in_array($grp_member, $local_roles))
3137 {
3138 $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search ($grp_member, $local_roles));
3139 unset($local_roles[$grp_roles[$grp_member]]);
3140 }
3141
3142 foreach($local_roles as $title => $role_id)
3143 {
3144 $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
3145 }
3146 return $grp_roles;
3147 }
_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 1854 of file class.ilObjGroupGUI.php.

1855 {
1856 global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
1857
1858 $ilHelp->setScreenIdComponent("grp");
1859
1860 if ($rbacsystem->checkAccess('read',$this->ref_id))
1861 {
1862 $tabs_gui->addTab("view_content", $lng->txt("content"),
1863 $this->ctrl->getLinkTarget($this, ""));
1864 }
1865 if ($rbacsystem->checkAccess('visible',$this->ref_id))
1866 {
1867 $tabs_gui->addTarget("info_short",
1868 $this->ctrl->getLinkTargetByClass(
1869 array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"),
1870 "infoScreen",
1871 "", "",false);
1872 }
1873
1874
1875 if ($ilAccess->checkAccess('write','',$this->object->getRefId()))
1876 {
1877 $tabs_gui->addTarget("settings",
1878 $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this),
1879 "");
1880 }
1881
1882
1883 $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
1884
1885 // Members
1886 if($ilAccess->checkAccess('write', '', $this->ref_id))
1887 {
1888 $tabs_gui->addTarget('members', $this->ctrl->getLinkTarget($this, 'members'), array(), get_class($this));
1889 }
1890 else if($is_participant)
1891 {
1892 $this->tabs_gui->addTarget(
1893 'members',
1894 $this->ctrl->getLinkTargetByClass('ilUsersGalleryGUI','view'),
1895 '',
1896 'ilUsersGalleryGUI'
1897 );
1898 }
1899 // learning progress
1900 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1901 if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
1902 {
1903 $tabs_gui->addTarget('learning_progress',
1904 $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'),''),
1905 '',
1906 array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
1907 }
1908
1909
1910 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1911 {
1912 $tabs_gui->addTarget(
1913 'export',
1914 $this->ctrl->getLinkTargetByClass('ilexportgui',''),
1915 'export',
1916 'ilexportgui'
1917 );
1918 }
1919
1920 /*
1921 if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
1922 {
1923
1924
1925 $tabs_gui->addTarget('export',
1926 $this->ctrl->getLinkTarget($this,'listExportFiles'),
1927 array('listExportFiles','exportXML','confirmDeleteExportFile','downloadExportFile'),
1928 get_class($this));
1929 }
1930 */
1931 // parent tabs (all container: edit_permission, clipboard, trash
1932 parent::getTabs($tabs_gui);
1933
1934 if($ilAccess->checkAccess('join','',$this->object->getRefId()) and
1935 !$this->object->members_obj->isAssigned($ilUser->getId()))
1936 {
1937 include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
1938 if(ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
1939 {
1940 $tabs_gui->addTab(
1941 'leave',
1942 $this->lng->txt('membership_leave'),
1943 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui','show','')
1944 );
1945
1946 }
1947 else
1948 {
1949
1950 $tabs_gui->addTarget("join",
1951 $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1952 'show',
1953 "");
1954 }
1955 }
1956 if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
1957 $this->object->members_obj->isMember($ilUser->getId()))
1958 {
1959 $tabs_gui->addTarget("grp_btn_unsubscribe",
1960 $this->ctrl->getLinkTarget($this, "leave"),
1961 '',
1962 "");
1963 }
1964 }
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 1968 of file class.ilObjGroupGUI.php.

1969 {
1970 if(!is_array($_FILES['xmldoc']))
1971 {
1972 ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
1973 $this->createObject();
1974 return false;
1975 }
1976
1977 include_once './Modules/Group/classes/class.ilObjGroup.php';
1978
1979 if($ref_id = ilObjGroup::_importFromFile($_FILES['xmldoc'],(int) $_GET['ref_id']))
1980 {
1981 $this->ctrl->setParameter($this, "ref_id", $ref_id);
1982 ilUtil::sendSuccess($this->lng->txt("import_grp_finished"),true);
1983 ilUtil::redirect($this->ctrl->getLinkTarget($this,'edit','',false,false));
1984 }
1985
1986 ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
1987 $this->createObject();
1988 }
_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 2183 of file class.ilObjGroupGUI.php.

2184 {
2185 global $rbacsystem, $ilUser, $ilSetting;
2186
2187 $this->tabs_gui->setTabActive('info_short');
2188
2189 if(!$rbacsystem->checkAccess("visible", $this->ref_id))
2190 {
2191 $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
2192 }
2193
2194 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
2195 $info = new ilInfoScreenGUI($this);
2196
2197 if(strlen($this->object->getInformation()))
2198 {
2199 $info->addSection($this->lng->txt('grp_general_informations'));
2200 $info->addProperty($this->lng->txt('grp_information'), nl2br(
2201 ilUtil::makeClickable ($this->object->getInformation(), true)));
2202 }
2203
2204 $info->enablePrivateNotes();
2205 $info->enableLearningProgress(true);
2206
2207 $info->addSection($this->lng->txt('group_registration'));
2208 $info->showLDAPRoleGroupMappingInfo();
2209
2210 if(!$this->object->isRegistrationEnabled())
2211 {
2212 $info->addProperty($this->lng->txt('group_registration_mode'),
2213 $this->lng->txt('grp_reg_deac_info_screen'));
2214
2215 }
2216 else
2217 {
2218 switch($this->object->getRegistrationType())
2219 {
2221 $info->addProperty($this->lng->txt('group_registration_mode'),
2222 $this->lng->txt('grp_reg_direct_info_screen'));
2223 break;
2224
2226 $info->addProperty($this->lng->txt('group_registration_mode'),
2227 $this->lng->txt('grp_reg_req_info_screen'));
2228 break;
2229
2231 $info->addProperty($this->lng->txt('group_registration_mode'),
2232 $this->lng->txt('grp_reg_passwd_info_screen'));
2233 break;
2234
2235 }
2236 /*
2237 $info->addProperty($this->lng->txt('group_registration_time'),
2238 ilDatePresentation::formatPeriod(
2239 $this->object->getRegistrationStart(),
2240 $this->object->getRegistrationEnd()));
2241 */
2242 if($this->object->isRegistrationUnlimited())
2243 {
2244 $info->addProperty($this->lng->txt('group_registration_time'),
2245 $this->lng->txt('grp_registration_unlimited'));
2246 }
2247 elseif($this->object->getRegistrationStart()->getUnixTime() < time())
2248 {
2249 $info->addProperty($this->lng->txt("group_registration_time"),
2250 $this->lng->txt('cal_until').' '.
2251 ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
2252 }
2253 elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
2254 {
2255 $info->addProperty($this->lng->txt("group_registration_time"),
2256 $this->lng->txt('cal_from').' '.
2257 ilDatePresentation::formatDate($this->object->getRegistrationStart()));
2258 }
2259 if ($this->object->isMembershipLimited())
2260 {
2261 if($this->object->getMinMembers())
2262 {
2263 $info->addProperty($this->lng->txt("mem_min_users"),
2264 $this->object->getMinMembers());
2265 }
2266 if($this->object->getMaxMembers())
2267 {
2268 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
2269 $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
2270
2271 $info->addProperty(
2272 $this->lng->txt('mem_free_places'),
2273 $reg_info['reg_info_free_places']
2274 );
2275 }
2276 }
2277
2278 if($this->object->getCancellationEnd())
2279 {
2280 $info->addProperty($this->lng->txt('grp_cancellation_end'),
2281 ilDatePresentation::formatDate( $this->object->getCancellationEnd()));
2282 }
2283 }
2284
2285 // Confirmation
2286 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2288
2289 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2290 if($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport())
2291 {
2292 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
2293
2294 $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
2295
2296 $this->lng->loadLanguageModule('ps');
2297 $info->addSection($this->lng->txt('grp_user_agreement_info'));
2298 $info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
2299
2300 if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
2301 {
2302 $info->addProperty($this->lng->txt('ps_grp_user_fields'),$fields);
2303 }
2304 }
2305
2306
2307 // forward the command
2308 $this->ctrl->forwardCommand($info);
2309 }
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
$info
Definition: example_052.php:80
global $ilSetting
Definition: privfeed.php:40

References $ilSetting, $ilUser, $info, 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 2173 of file class.ilObjGroupGUI.php.

2174 {
2175 $this->ctrl->setCmd("showSummary");
2176 $this->ctrl->setCmdClass("ilinfoscreengui");
2177 $this->infoScreen();
2178 }

References infoScreen().

+ Here is the call graph for this function:

◆ initAttendanceList()

ilObjGroupGUI::initAttendanceList ( )
protected

Init attendance list object.

Returns
ilAttendanceList

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

3063 {
3064 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
3065 $members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
3066
3067 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
3068 $waiting_list = new ilGroupWaitingList($this->object->getId());
3069
3070 include_once 'Services/Membership/classes/class.ilAttendanceList.php';
3071 $list = new ilAttendanceList($this, $members_obj, $waiting_list);
3072 $list->setId('grpmemlst');
3073
3074 $list->setTitle($this->lng->txt('grp_members_print_title'),
3075 $this->lng->txt('obj_grp').': '.$this->object->getTitle());
3076
3077 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
3078 $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
3079 ilObjUserTracking::_enabledUserRelatedData());
3080 if($this->show_tracking)
3081 {
3082 include_once('./Services/Object/classes/class.ilObjectLP.php');
3083 $olp = ilObjectLP::getInstance($this->object->getId());
3084 $this->show_tracking = $olp->isActive();
3085 }
3086 if($this->show_tracking)
3087 {
3088 $this->lng->loadLanguageModule('trac');
3089 $list->addPreset('progress', $this->lng->txt('learning_progress'), true);
3090 }
3091
3092 include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
3094 if($privacy->enabledGroupAccessTimes())
3095 {
3096 $list->addPreset('access', $this->lng->txt('last_access'), true);
3097 }
3098
3099 return $list;
3100 }
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 395 of file class.ilObjGroupGUI.php.

396 {
397 if(!is_object($this->object))
398 {
399 $this->object = new ilObjGroup();
400 }
401
402 return $this->initForm('create');
403 }
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 2397 of file class.ilObjGroupGUI.php.

2398 {
2399 global $ilUser,$tpl,$tree;
2400
2401 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2402
2403 $form = new ilPropertyFormGUI();
2404 switch($a_mode)
2405 {
2406 case 'edit':
2407 $form->setFormAction($this->ctrl->getFormAction($this,'update'));
2408 break;
2409
2410 default:
2411 $form->setTableWidth('600px');
2412 $form->setFormAction($this->ctrl->getFormAction($this,'save'));
2413 break;
2414 }
2415
2416 // title
2417 $title = new ilTextInputGUI($this->lng->txt('title'),'title');
2418 $title->setSubmitFormOnEnter(true);
2419 $title->setValue($this->object->getTitle());
2420 $title->setSize(min(40, ilObject::TITLE_LENGTH));
2421 $title->setMaxLength(ilObject::TITLE_LENGTH);
2422 $title->setRequired(true);
2423 $form->addItem($title);
2424
2425 // desc
2426 $desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
2427 $desc->setValue($this->object->getLongDescription());
2428 $desc->setRows(2);
2429 $desc->setCols(40);
2430 $form->addItem($desc);
2431
2432 // Group type
2433 $grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'),'grp_type');
2434
2435 if($a_mode == 'edit')
2436 {
2437 $type = ($this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus());
2438 }
2439 else
2440 {
2441 $type = ($this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC);
2442 }
2443
2444 $grp_type->setValue($type);
2445 $grp_type->setRequired(true);
2446
2447
2448 // PUBLIC GROUP
2449 $opt_public = new ilRadioOption($this->lng->txt('grp_public'),GRP_TYPE_PUBLIC,$this->lng->txt('grp_public_info'));
2450 $grp_type->addOption($opt_public);
2451
2452
2453 // CLOSED GROUP
2454 $opt_closed = new ilRadioOption($this->lng->txt('grp_closed'),GRP_TYPE_CLOSED,$this->lng->txt('grp_closed_info'));
2455 $grp_type->addOption($opt_closed);
2456
2457 $form->addItem($grp_type);
2458
2459 if($a_mode == 'edit')
2460 {
2461 // Group registration ############################################################
2462 $pres = new ilFormSectionHeaderGUI();
2463 $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
2464 $form->addItem($pres);
2465
2466 // Registration type
2467 $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'),'registration_type');
2468 $reg_type->setValue($this->object->getRegistrationType());
2469
2470 $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'),GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
2471 $reg_type->addOption($opt_dir);
2472
2473 $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'),GRP_REGISTRATION_PASSWORD);
2474 $pass = new ilTextInputGUI($this->lng->txt("password"),'password');
2475 $pass->setInfo($this->lng->txt('grp_reg_password_info'));
2476 $pass->setValue($this->object->getPassword());
2477 $pass->setSize(10);
2478 $pass->setMaxLength(32);
2479 $opt_pass->addSubItem($pass);
2480 $reg_type->addOption($opt_pass);
2481
2482 $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'),GRP_REGISTRATION_REQUEST,$this->lng->txt('grp_reg_request_info'));
2483 $reg_type->addOption($opt_req);
2484
2485 $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'),GRP_REGISTRATION_DEACTIVATED,$this->lng->txt('grp_reg_disabled_info'));
2486 $reg_type->addOption($opt_deact);
2487
2488 // Registration codes
2489 $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'),'reg_code_enabled');
2490 $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
2491 $reg_code->setValue(1);
2492 $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
2493 $form->addItem($reg_type);
2494
2495 // Registration codes
2496 if(!$this->object->getRegistrationAccessCode())
2497 {
2498 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2499 $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
2500 }
2501 $reg_link = new ilHiddenInputGUI('reg_code');
2502 $reg_link->setValue($this->object->getRegistrationAccessCode());
2503 $form->addItem($reg_link);
2504
2505 $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
2506 include_once './Services/Link/classes/class.ilLink.php';
2507 $val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
2508 $link->setHTML('<font class="small">'.$val.'</font>');
2509 $reg_code->addSubItem($link);
2510 $form->addItem($reg_code);
2511
2512
2513 // time limit
2514 $time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'),'reg_limit_time');
2515// $time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
2516 $time_limit->setChecked($this->object->isRegistrationUnlimited() ? false : true);
2517
2518 $this->lng->loadLanguageModule('dateplaner');
2519 include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
2520 $tpl->addJavaScript('./Services/Form/js/date_duration.js');
2521 $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_period'),'reg');
2522 $dur->setStartText($this->lng->txt('cal_start'));
2523 $dur->setEndText($this->lng->txt('cal_end'));
2524 $dur->setShowTime(true);
2525 $dur->setStart($this->object->getRegistrationStart());
2526 $dur->setEnd($this->object->getRegistrationEnd());
2527
2528 $time_limit->addSubItem($dur);
2529 $form->addItem($time_limit);
2530
2531 // cancellation limit
2532 $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
2533 $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
2534 $cancel_end = $this->object->getCancellationEnd();
2535 $cancel->enableDateActivation('', 'cancel_end_tgl', (bool)$cancel_end);
2536 if($cancel_end)
2537 {
2538 $cancel->setDate($cancel_end);
2539 }
2540 $form->addItem($cancel);
2541
2542 // max member
2543 $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'),'registration_membership_limited');
2544 $lim->setValue(1);
2545// $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
2546 $lim->setChecked($this->object->isMembershipLimited());
2547
2548 $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'),'registration_min_members');
2549 $min->setSize(3);
2550 $min->setMaxLength(4);
2551 $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
2552 $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
2553 $lim->addSubItem($min);
2554
2555 $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'),'registration_max_members');
2556 $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
2557 //$max->setTitle($this->lng->txt('members'));
2558 $max->setSize(3);
2559 $max->setMaxLength(4);
2560 $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
2561 $lim->addSubItem($max);
2562
2563 /*
2564 $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
2565 $wait->setValue(1);
2566 //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
2567 $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
2568 $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
2569 $lim->addSubItem($wait);
2570 $form->addItem($lim);
2571 */
2572
2573 $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
2574
2575 $option = new ilRadioOption($this->lng->txt('none'), 0);
2576 $wait->addOption($option);
2577
2578 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
2579 $option->setInfo($this->lng->txt('grp_waiting_list_info'));
2580 $wait->addOption($option);
2581
2582 $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
2583 $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
2584 $wait->addOption($option);
2585
2586 if($this->object->hasWaitingListAutoFill())
2587 {
2588 $wait->setValue(2);
2589 }
2590 else if($this->object->isWaitingListEnabled())
2591 {
2592 $wait->setValue(1);
2593 }
2594
2595 $lim->addSubItem($wait);
2596
2597 $form->addItem($lim);
2598
2599
2600 // Group presentation
2601 $hasParentMembership =
2602 (
2603 $tree->checkForParentType($this->object->getRefId(),'crs',true) ||
2604 $tree->checkForParentType($this->object->getRefId(),'grp',true)
2605 );
2606
2607 $pres = new ilFormSectionHeaderGUI();
2608 $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
2609 $form->addItem($pres);
2610
2611 // presentation type
2612 $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'),'view_mode');
2613 if($hasParentMembership)
2614 {
2615 switch($this->object->getViewMode())
2616 {
2618 $course_view_mode = ': '.$this->lng->txt('cntr_view_sessions');
2619 break;
2620
2622 $course_view_mode = ': '.$this->lng->txt('cntr_view_simple');
2623 break;
2624
2626 $course_view_mode = ': '.$this->lng->txt('cntr_view_by_type');
2627 break;
2628 }
2629
2630 $opt = new ilRadioOption($this->lng->txt('grp_view_inherit').$course_view_mode,ilContainer::VIEW_INHERIT);
2631 $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
2632 $view_type->addOption($opt);
2633 }
2634
2635 if($hasParentMembership &&
2636 $this->object->getViewMode(false) == ilContainer::VIEW_INHERIT)
2637 {
2638 $view_type->setValue(ilContainer::VIEW_INHERIT);
2639 }
2640 else
2641 {
2642 $view_type->setValue($this->object->getViewMode(true));
2643 }
2644
2645 $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'),ilContainer::VIEW_SIMPLE);
2646 $opt->setInfo($this->lng->txt('grp_view_info_simple'));
2647 $view_type->addOption($opt);
2648
2649 $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
2650 $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
2651 $view_type->addOption($opt);
2652 $form->addItem($view_type);
2653
2654
2655 // Sorting
2656 $sorting_settings = array();
2657 if($hasParentMembership)
2658 {
2659 $sorting_settings[] = ilContainer::SORT_INHERIT;
2660 }
2661 $sorting_settings[] = ilContainer::SORT_TITLE;
2662 $sorting_settings[] = ilContainer::SORT_CREATION;
2663 $sorting_settings[] = ilContainer::SORT_MANUAL;
2664 $this->initSortingForm($form, $sorting_settings);
2665
2666 // additional features
2667 $feat = new ilFormSectionHeaderGUI();
2668 $feat->setTitle($this->lng->txt('obj_features'));
2669 $form->addItem($feat);
2670
2671 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2673 $this->object->getId(),
2674 $form,
2675 array(
2680 )
2681 );
2682
2683 // Notification Settings
2684 /*$notification = new ilFormSectionHeaderGUI();
2685 $notification->setTitle($this->lng->txt('grp_notification'));
2686 $form->addItem($notification);*/
2687
2688 // Show members type
2689 $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
2690 $mail_type->setValue($this->object->getMailToMembersType());
2691
2692 $mail_tutors = new ilRadioOption($this->lng->txt('grp_mail_tutors_only'), ilObjGroup::MAIL_ALLOWED_TUTORS,
2693 $this->lng->txt('grp_mail_tutors_only_info'));
2694 $mail_type->addOption($mail_tutors);
2695
2696 $mail_all = new ilRadioOption($this->lng->txt('grp_mail_all'), ilObjGroup::MAIL_ALLOWED_ALL,
2697 $this->lng->txt('grp_mail_all_info'));
2698 $mail_type->addOption($mail_all);
2699 $form->addItem($mail_type);
2700 }
2701
2702 switch($a_mode)
2703 {
2704 case 'create':
2705 $form->setTitle($this->lng->txt('grp_new'));
2706 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
2707
2708 $form->addCommandButton('save',$this->lng->txt('grp_new'));
2709 $form->addCommandButton('cancel',$this->lng->txt('cancel'));
2710 break;
2711
2712 case 'edit':
2713 $form->setTitle($this->lng->txt('grp_edit'));
2714 $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
2715
2716 // Edit ecs export settings
2717 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
2718 $ecs = new ilECSGroupSettings($this->object);
2719 $ecs->addSettingsToForm($form, 'grp');
2720
2721 $form->addCommandButton('update',$this->lng->txt('save'));
2722 $form->addCommandButton('cancel',$this->lng->txt('cancel'));
2723 break;
2724 }
2725 return $form;
2726 }
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)
This class represents a date/time property in a property form.
Class ilECSGroupSettings.
This class represents a section header in a property form.
This class represents a hidden form property in a property form.
static generateCode()
Generate new registration key.
const MAIL_ALLOWED_TUTORS
static 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 659 of file class.ilObjGroupGUI.php.

660 {
661 include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
662 $form = new ilPropertyFormGUI();
663 $form->setFormAction($this->ctrl->getFormAction($this));
664
665 $this->showCustomIconsEditing(1, $form);
666
667 // $form->setTitle($this->lng->txt('edit_grouping'));
668 $form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
669
670 return $form;
671 }
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 2997 of file class.ilObjGroupGUI.php.

2998 {
2999 global $ilSetting, $ilUser;
3000
3001 $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3002
3003 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
3004 if(ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
3005 {
3006 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
3008 {
3009 $noti = new ilMembershipNotifications($this->ref_id);
3010 if(!$noti->isCurrentUserActive())
3011 {
3012 $lg->addHeaderIcon("not_icon",
3013 ilUtil::getImagePath("notification_off.svg"),
3014 $this->lng->txt("grp_notification_deactivated"));
3015
3016 $this->ctrl->setParameter($this, "grp_ntf", 1);
3017 $caption = "grp_activate_notification";
3018 }
3019 else
3020 {
3021 $lg->addHeaderIcon("not_icon",
3022 ilUtil::getImagePath("notification_on.svg"),
3023 $this->lng->txt("grp_notification_activated"));
3024
3025 $this->ctrl->setParameter($this, "grp_ntf", 0);
3026 $caption = "grp_deactivate_notification";
3027 }
3028
3029 if($noti->canCurrentUserEdit())
3030 {
3031 $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
3032 $caption);
3033 }
3034
3035 $this->ctrl->setParameter($this, "grp_ntf", "");
3036 }
3037 }
3038
3039 return $lg;
3040 }
Membership notification settings.
$lg
Definition: example_018.php:62

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

+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

@access protected

Returns

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

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

Referenced by editInfoObject().

+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

3189 {
3190 $this->ctrl->redirectByClass('ilUsersGalleryGUI');
3191 }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group @access public

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

1668 {
1669 global $ilUser;
1670
1671 $this->checkPermission('leave');
1672
1673 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1674 if($part->isLastAdmin($ilUser->getId()))
1675 {
1676 ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
1677 $this->viewObject();
1678 return false;
1679 }
1680
1681 $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
1682
1683 include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1684 $cgui = new ilConfirmationGUI();
1685 $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1686 $cgui->setFormAction($this->ctrl->getFormAction($this));
1687 $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1688 $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1689 $this->tpl->setContent($cgui->getHTML());
1690 }
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 ( ilPropertyFormGUI  $a_form)

load settings

@access public

Returns

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

2735 {
2736 $this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
2737 $this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
2738 $this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
2739 $this->object->setRegistrationType(ilUtil::stripSlashes($_POST['registration_type']));
2740 $this->object->setPassword(ilUtil::stripSlashes($_POST['password']));
2741 $this->object->enableUnlimitedRegistration((bool) !$_POST['reg_limit_time']);
2742 $this->object->setRegistrationStart($this->loadDate('start'));
2743 $this->object->setRegistrationEnd($this->loadDate('end'));
2744 $this->object->enableMembershipLimitation((bool) $_POST['registration_membership_limited']);
2745 $this->object->setMinMembers((int) $_POST['registration_min_members']);
2746 $this->object->setMaxMembers((int) $_POST['registration_max_members']);
2747 $this->object->enableRegistrationAccessCode((bool) $_POST['reg_code_enabled']);
2748 $this->object->setRegistrationAccessCode(ilUtil::stripSlashes($_POST['reg_code']));
2749 $this->object->setViewMode(ilUtil::stripSlashes($_POST['view_mode']));
2750 $this->object->setMailToMembersType((int) $_POST['mail_type']);
2751
2752 $cancel_end = $a_form->getItemByPostVar('cancel_end');
2753 if($_POST[$cancel_end->getActivationPostVar()])
2754 {
2755 $dt = $cancel_end->getDate()->get(IL_CAL_DATETIME);
2756 $this->object->setCancellationEnd(new ilDate($dt, IL_CAL_DATETIME));
2757 }
2758 else
2759 {
2760 $this->object->setCancellationEnd(null);
2761 }
2762
2763 switch((int)$_POST['waiting_list'])
2764 {
2765 case 2:
2766 $this->object->enableWaitingList(true);
2767 $this->object->setWaitingListAutoFill(true);
2768 break;
2769
2770 case 1:
2771 $this->object->enableWaitingList(true);
2772 $this->object->setWaitingListAutoFill(false);
2773 break;
2774
2775 default:
2776 $this->object->enableWaitingList(false);
2777 $this->object->setWaitingListAutoFill(false);
2778 break;
2779 }
2780
2781 return true;
2782 }
const IL_CAL_DATETIME
Class for single dates.
loadDate($a_field)
load date
getItemByPostVar($a_post_var)
Get Item by POST variable.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, ilPropertyFormGUI\getItemByPostVar(), IL_CAL_DATETIME, 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 2791 of file class.ilObjGroupGUI.php.

2792 {
2793 global $ilUser;
2794
2795 include_once('./Services/Calendar/classes/class.ilDateTime.php');
2796
2797 $dt['year'] = (int) $_POST['reg'][$a_field]['date']['y'];
2798 $dt['mon'] = (int) $_POST['reg'][$a_field]['date']['m'];
2799 $dt['mday'] = (int) $_POST['reg'][$a_field]['date']['d'];
2800 $dt['hours'] = (int) $_POST['reg'][$a_field]['time']['h'];
2801 $dt['minutes'] = (int) $_POST['reg'][$a_field]['time']['m'];
2802 $dt['seconds'] = (int) $_POST['reg'][$a_field]['time']['s'];
2803
2804 $date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
2805 return $date;
2806 }
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:

◆ membersMapObject()

ilObjGroupGUI::membersMapObject ( )

Members map.

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

780 {
781 global $tpl;
782
783 $this->setSubTabs('members');
784 $this->tabs_gui->setTabActive('members');
785
786 include_once("./Services/Maps/classes/class.ilMapUtil.php");
787 if (!ilMapUtil::isActivated() || !$this->object->getEnableGroupMap())
788 {
789 return;
790 }
791
792 $map = ilMapUtil::getMapGUI();
793 $map->setMapId("group_map")
794 ->setWidth("700px")
795 ->setHeight("500px")
796 ->setLatitude($this->object->getLatitude())
797 ->setLongitude($this->object->getLongitude())
798 ->setZoom($this->object->getLocationZoom())
799 ->setEnableTypeControl(true)
800 ->setEnableNavigationControl(true)
801 ->setEnableCentralMarker(true);
802
803
804 $member_ids = $this->object->getGroupMemberIds();
805 $admin_ids = $this->object->getGroupAdminIds();
806
807 // fetch all users data in one shot to improve performance
808 $members = $this->object->getGroupMemberData($member_ids);
809 foreach($member_ids as $user_id)
810 {
811 $map->addUserMarker($user_id);
812 }
813 $tpl->setContent($map->getHTML());
814 $tpl->setLeftContent($map->getUserListHTML());
815 }
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 972 of file class.ilObjGroupGUI.php.

973 {
974 global $ilUser, $ilToolbar, $lng, $ilCtrl;
975
976 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
977 include_once('./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
978
979 $this->checkPermission('write');
980
981 include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
982 $this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
983 ilObjUserTracking::_enabledUserRelatedData());
984 if($this->show_tracking)
985 {
986 include_once('./Services/Object/classes/class.ilObjectLP.php');
987 $olp = ilObjectLP::getInstance($this->object->getId());
988 $this->show_tracking = $olp->isActive();
989 }
990
991 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
992
993 $this->setSubTabs('members');
994 $this->tabs_gui->setTabActive('members');
995 $this->tabs_gui->setSubTabActive('grp_edit_members');
996
997 $this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.grp_edit_members.html','Modules/Group');
998 $this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
999
1000 // add members
1001 include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
1003 $this,
1004 $ilToolbar,
1005 array(
1006 'auto_complete_name' => $lng->txt('user'),
1007 'user_type' => $this->getLocalRoles(),
1008 'submit_name' => $lng->txt('add')
1009 )
1010 );
1011
1012 // spacer
1013 $ilToolbar->addSeparator();
1014
1015 // search button
1016 $ilToolbar->addButton($this->lng->txt("grp_search_users"),
1017 $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
1018
1019 $ilToolbar->addSeparator();
1020
1021 // print button
1022 $ilToolbar->addButton($this->lng->txt("grp_print_list"),
1023 $this->ctrl->getLinkTarget($this, 'printMembers'));
1024
1025 $this->addMailToMemberButton($ilToolbar, "members", true);
1026
1027 $this->setShowHidePrefs();
1028
1029
1030 // Waiting list table
1031 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1032 $waiting_list = new ilGroupWaitingList($this->object->getId());
1033 if(count($wait = $waiting_list->getAllUsers()))
1034 {
1035 include_once('./Services/Membership/classes/class.ilWaitingListTableGUI.php');
1036 if($ilUser->getPref('grp_wait_hide'))
1037 {
1038 $table_gui = new ilWaitingListTableGUI($this,$waiting_list,false);
1039 $this->ctrl->setParameter($this,'wait_hide',0);
1040 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1041 $this->lng->txt('show'));
1042 $this->ctrl->clearParameters($this);
1043 }
1044 else
1045 {
1046 $table_gui = new ilWaitingListTableGUI($this,$waiting_list,true);
1047 $this->ctrl->setParameter($this,'wait_hide',1);
1048 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1049 $this->lng->txt('hide'));
1050 $this->ctrl->clearParameters($this);
1051 }
1052 $table_gui->setUsers($wait);
1053 $table_gui->setTitle($this->lng->txt('grp_header_waiting_list'),'icon_usr.svg',$this->lng->txt('group_new_registrations'));
1054 $this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
1055 }
1056
1057
1058 // Subscriber table
1059 if($part->getSubscribers())
1060 {
1061 include_once('./Services/Membership/classes/class.ilSubscriberTableGUI.php');
1062 if($ilUser->getPref('grp_subscriber_hide'))
1063 {
1064 $table_gui = new ilSubscriberTableGUI($this,false);
1065 $this->ctrl->setParameter($this,'subscriber_hide',0);
1066 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1067 $this->lng->txt('show'));
1068 $this->ctrl->clearParameters($this);
1069 }
1070 else
1071 {
1072 $table_gui = new ilSubscriberTableGUI($this,true);
1073 $this->ctrl->setParameter($this,'subscriber_hide',1);
1074 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1075 $this->lng->txt('hide'));
1076 $this->ctrl->clearParameters($this);
1077 }
1078 $table_gui->readSubscriberData();
1079 $table_gui->setTitle($this->lng->txt('group_new_registrations'),'icon_usr.svg',$this->lng->txt('group_new_registrations'));
1080 $this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
1081 }
1082
1083 if(count($part->getAdmins()))
1084 {
1085 if($ilUser->getPref('grp_admin_hide'))
1086 {
1087 $table_gui = new ilGroupParticipantsTableGUI($this,'admin',false,false);
1088 $this->ctrl->setParameter($this,'admin_hide',0);
1089 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1090 $this->lng->txt('show'));
1091 $this->ctrl->clearParameters($this);
1092 }
1093 else
1094 {
1095 $table_gui = new ilGroupParticipantsTableGUI($this,'admin',true,false);
1096 $this->ctrl->setParameter($this,'admin_hide',1);
1097 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1098 $this->lng->txt('hide'));
1099 $this->ctrl->clearParameters($this);
1100 }
1101 $table_gui->setTitle($this->lng->txt('grp_admins'),'icon_usr.svg',$this->lng->txt('grp_admins'));
1102 $table_gui->parse($this->readMemberData($part->getAdmins()));
1103 $this->tpl->setVariable('ADMINS',$table_gui->getHTML());
1104 }
1105
1106 if($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
1107 {
1108 if($ilUser->getPref('grp_member_hide'))
1109 {
1110 $table_gui = new ilGroupParticipantsTableGUI($this,'member',false,$this->show_tracking,$this->object->getDEfaultMemberRole());
1111 $this->ctrl->setParameter($this,'member_hide',0);
1112 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1113 $this->lng->txt('show'));
1114 $this->ctrl->clearParameters($this);
1115 }
1116 else
1117 {
1118 $table_gui = new ilGroupParticipantsTableGUI($this,'member',true,$this->show_tracking,$this->object->getDefaultMemberRole());
1119 $this->ctrl->setParameter($this,'member_hide',1);
1120 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1121 $this->lng->txt('hide'));
1122 $this->ctrl->clearParameters($this);
1123 }
1124
1125 $table_gui->setTitle($this->lng->txt('grp_members'),'icon_usr.svg',$this->lng->txt('grp_members'));
1126 $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($this->object->getDefaultMemberRole()),
1127 null, $table_gui->getSelectedColumns()));
1128 $this->tpl->setCurrentBlock('member_block');
1129 $this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
1130 $this->tpl->parseCurrentBlock();
1131 }
1132
1133 foreach(ilGroupParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
1134 {
1135 // Do not show table if no user is assigned
1136 if(!($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))))
1137 {
1138 continue;
1139 }
1140 if($ilUser->getPref('grp_role_hide'.$role_id))
1141 {
1142 $table_gui = new ilGroupParticipantsTableGUI($this,'role',false,$this->show_tracking,$role_id);
1143 $this->ctrl->setParameter($this,'role_hide_'.$role_id,0);
1144 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1145 $this->lng->txt('show'));
1146 $this->ctrl->clearParameters($this);
1147 }
1148 else
1149 {
1150 $table_gui = new ilGroupParticipantsTableGUI($this,'role',true,$this->show_tracking,$role_id);
1151 $this->ctrl->setParameter($this,'role_hide_'.$role_id,1);
1152 $table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
1153 $this->lng->txt('hide'));
1154 $this->ctrl->clearParameters($this);
1155 }
1156
1157 $table_gui->setTitle(ilObject::_lookupTitle($role_id),'icon_usr.gif',ilObject::_lookupTitle($role_id));
1158 $table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($role_id)));
1159 $this->tpl->setCurrentBlock('member_block');
1160 $this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
1161 $this->tpl->parseCurrentBlock();
1162 }
1163
1164 $this->tpl->setVariable('TXT_SELECTED_USER',$this->lng->txt('grp_selected_users'));
1165 $this->tpl->setVariable('BTN_FOOTER_EDIT',$this->lng->txt('edit'));
1166 $this->tpl->setVariable('BTN_FOOTER_VAL',$this->lng->txt('remove'));
1167 $this->tpl->setVariable('BTN_FOOTER_MAIL',$this->lng->txt('grp_mem_send_mail'));
1168 $this->tpl->setVariable('ARROW_DOWN',ilUtil::getImagePath('arrow_downright.svg'));
1169
1170 }
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(), $a_sticky=false)
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 379 of file class.ilObjGroupGUI.php.

380 {
381 global $tree;
382
383 // if folder is in a course, modify item list gui according to course requirements
384 if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),'crs'))
385 {
386 include_once("./Modules/Course/classes/class.ilObjCourse.php");
387 include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
388 $course_obj_id = ilObject::_lookupObjId($course_ref_id);
389 ilObjCourseGUI::_modifyItemGUI($a_item_list_gui,'ilcoursecontentgui',$a_item_data, $a_show_path,
390 ilObjCourse::_lookupAboStatus($course_obj_id), $course_ref_id, $course_obj_id,
391 $this->object->getRefId());
392 }
393 }
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 2965 of file class.ilObjGroupGUI.php.

2966 {
2967 global $rbacsystem;
2968 if(!$this->getCreationMode())
2969 {
2970 /*
2971 include_once './Services/Container/classes/class.ilMemberViewSettings.php';
2972 $settings = ilMemberViewSettings::getInstance();
2973 if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
2974 {
2975 $settings->setContainer($this->object->getRefId());
2976 $rbacsystem->initMemberView();
2977 }
2978 */
2979 }
2980 parent::prepareOutput();
2981 }

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

3043 {
3044 global $ilTabs;
3045
3046 $this->checkPermission('write');
3047
3048 $ilTabs->clearTargets();
3049 $ilTabs->setBackTarget($this->lng->txt('back'),
3050 $this->ctrl->getLinkTarget($this, 'members'));
3051
3052 $list = $this->initAttendanceList();
3053 $form = $list->initForm('printMembersOutput');
3054 $this->tpl->setContent($form->getHTML());
3055 }
initAttendanceList()
Init attendance list object.

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

+ Here is the call graph for this function:

◆ printMembersOutputObject()

ilObjGroupGUI::printMembersOutputObject ( )

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

3112 {
3113 $list = $this->initAttendanceList();
3114 $list->initFromForm();
3115 $list->setCallback(array($this, 'getAttendanceListUserData'));
3116
3117 $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
3118 $this->members_data = $this->readMemberData($part->getParticipants());
3119 $list->getNonMemberUserData($this->members_data);
3120
3121 echo $list->getFullscreenHTML();
3122 exit();
3123 }
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 882 of file class.ilObjGroupGUI.php.

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

1831 {
1832 $user_ids = $_POST["user_id"];
1833
1834 if (empty($user_ids[0]))
1835 {
1836 $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1837 }
1838 include_once 'Services/Mail/classes/class.ilMail.php';
1839 $mail = new ilMail($_SESSION["AccountId"]);
1840
1841 foreach ($user_ids as $new_member)
1842 {
1843 $user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
1844
1845 $this->object->deleteApplicationListEntry($new_member);
1846 $mail->sendMail($user->getLogin(),"","","Membership application refused: Group ".$this->object->getTitle(),"Your application has been refused.",array(),array('system'));
1847 }
1848
1849 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"),true);
1850 $this->ctrl->redirect($this,'members');
1851 }

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

1308 {
1309 $this->checkPermission('write');
1310
1311 if(!count($_POST['waiting']))
1312 {
1313 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1314 $this->membersObject();
1315 return false;
1316 }
1317
1318 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1319 $waiting_list = new ilGroupWaitingList($this->object->getId());
1320
1321 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1322 foreach($_POST["waiting"] as $user_id)
1323 {
1324 $waiting_list->removeFromList($user_id);
1325 $this->object->members_obj->sendNotification(
1327 $user_id
1328 );
1329 }
1330
1331 ilUtil::sendSuccess($this->lng->txt('grp_users_removed_from_list'), true);
1332 $this->ctrl->redirect($this, "members");
1333 return true;
1334 }

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

1215 {
1216 global $lng;
1217
1218 $this->checkPermission('write');
1219
1220 if(!count($_POST['subscribers']))
1221 {
1222 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1223 $this->membersObject();
1224 return false;
1225 }
1226
1227 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1228 foreach($_POST['subscribers'] as $usr_id)
1229 {
1230 $this->object->members_obj->sendNotification(
1232 $usr_id
1233 );
1234 $this->object->members_obj->deleteSubscriber($usr_id);
1235 }
1236 ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"));
1237 $this->membersObject();
1238 return true;
1239
1240 }

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

367 {
368 global $ilTabs;
369
370 $ilTabs->activateTab("view_content");
371 $ret = parent::renderObject();
372 return $ret;
373
374 }

References $ret.

Referenced by executeCommand(), and viewObject().

+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

764 {
765 global $ilCtrl, $ilUser;
766
767 $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
768 $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
769 $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
770 $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
771 $this->object->update();
772
773 $ilCtrl->redirect($this, "editMapSettings");
774 }

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

2315 {
2316 include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
2317 $noti = new ilMembershipNotifications($this->ref_id);
2318 if($noti->canCurrentUserEdit())
2319 {
2320 if((bool)$_REQUEST["grp_ntf"])
2321 {
2322 $noti->activateUser();
2323 }
2324 else
2325 {
2326 $noti->deactivateUser();
2327 }
2328 }
2329 ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
2330 $this->ctrl->redirect($this, "infoScreen");
2331 }

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

413 {
415
416 $this->object = new ilObjGroup();
417
418 // we reduced the form, only 3 values left
419 // $this->load();
420
421 $grp_type = ilUtil::stripSlashes($_POST['grp_type']);
422 switch($grp_type)
423 {
424 case GRP_TYPE_PUBLIC:
425 $this->object->setRegistrationType(GRP_REGISTRATION_DIRECT);
426 break;
427
428 default:
429 $this->object->setRegistrationType(GRP_REGISTRATION_DEACTIVATED);
430 break;
431 }
432 $this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
433 $this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
434 $this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
435 $this->object->setViewMode(ilContainer::VIEW_INHERIT);
436
437 $ilErr->setMessage('');
438
439 if(!$this->object->validate())
440 {
441 $err = $this->lng->txt('err_check_input');
443 $err = $ilErr->getMessage();
444 ilUtil::sendInfo($err);
445 $this->createObject();
446 return true;
447 }
448
449 $this->object->create();
450 $this->putObjectInTree($this->object, $_GET["ref_id"]);
451 $this->object->initGroupStatus($this->object->getGroupType());
452
453 // check for parent group or course => SORT_INHERIT
454 $sort_mode = ilContainer::SORT_TITLE;
455 if(
456 $GLOBALS['tree']->checkForParentType($this->object->getRefId(),'crs',true) ||
457 $GLOBALS['tree']->checkForParentType($this->object->getRefId(),'grp',true)
458 )
459 {
460 $sort_mode = ilContainer::SORT_INHERIT;
461 }
462 // Save sorting
463 include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
464 $sort = new ilContainerSortingSettings($this->object->getId());
465 $sort->setSortMode($sort_mode);
466 $sort->update();
467
468
469 // Add user as admin and enable notification
470 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
471 $members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
472 $members_obj->add($ilUser->getId(),IL_GRP_ADMIN);
473 $members_obj->updateNotification($ilUser->getId(),$ilSetting->get('mail_grp_admin_notification', true));
474
475
476 ilUtil::sendSuccess($this->lng->txt("grp_added"),true);
477 $this->ctrl->setParameter($this,'ref_id',$this->object->getRefId());
478 $this->ctrl->redirect($this, "edit");
479 }
putObjectInTree(ilObject $a_obj, $a_parent_node_id=null)
Add object to tree at given position.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_GET, $_POST, $GLOBALS, $ilErr, $ilSetting, $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 1430 of file class.ilObjGroupGUI.php.

1431 {
1432 if(isset($_GET['member_id']))
1433 {
1434 $_POST['participants'] = array($_GET['member_id']);
1435 }
1436 else
1437 {
1438 $_POST['participants'] = array_unique(array_merge((array) $_POST['admins'],
1439 (array) $_POST['members'],
1440 (array) $_POST['roles'],
1441 (array) $_POST['waiting'],
1442 (array) $_POST['subscribers']));
1443 }
1444 if (!count($_POST['participants']))
1445 {
1446 ilUtil::sendFailure($this->lng->txt("no_checkbox"));
1447 $this->membersObject();
1448 return false;
1449 }
1450 foreach($_POST['participants'] as $usr_id)
1451 {
1452 $rcps[] = ilObjUser::_lookupLogin($usr_id);
1453 }
1454
1455 require_once 'Services/Mail/classes/class.ilMailFormCall.php';
1458 $this,
1459 'members',
1460 array(),
1461 array('type' => 'new', 'sig' => $this->createMailSignature())));
1462 return true;
1463 }
static getRedirectTarget($gui, $cmd, array $gui_params=array(), array $mail_params=array(), array $context_params=array())
static setRecipients(array $recipients)
createMailSignature()
Create a course mail signature.

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

1472 {
1473 global $ilUser;
1474
1475 if(isset($_GET['admin_hide']))
1476 {
1477 $ilUser->writePref('grp_admin_hide',(int) $_GET['admin_hide']);
1478 }
1479 if(isset($_GET['member_hide']))
1480 {
1481 $ilUser->writePref('grp_member_hide',(int) $_GET['member_hide']);
1482 }
1483 if(isset($_GET['subscriber_hide']))
1484 {
1485 $ilUser->writePref('grp_subscriber_hide',(int) $_GET['subscriber_hide']);
1486 }
1487 if(isset($_GET['wait_hide']))
1488 {
1489 $ilUser->writePref('grp_wait_hide',(int) $_GET['wait_hide']);
1490 }
1491 }

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

2816 {
2817 global $rbacsystem,$ilUser,$ilAccess;
2818
2819 switch($a_tab)
2820 {
2821 case 'members':
2822 // for admins
2823 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2824 {
2825 $this->tabs_gui->addSubTabTarget("grp_edit_members",
2826 $this->ctrl->getLinkTarget($this,'members'),
2827 "members",
2828 get_class($this));
2829 }
2830 // for all
2831 $this->tabs_gui->addSubTabTarget(
2832 'grp_members_gallery',
2833 $this->ctrl->getLinkTargetByClass('ilUsersGalleryGUI','view'),
2834 '',
2835 'ilUsersGalleryGUI'
2836 );
2837
2838 // members map
2839 include_once("./Services/Maps/classes/class.ilMapUtil.php");
2840 if (ilMapUtil::isActivated() &&
2841 $this->object->getEnableGroupMap())
2842 {
2843 $this->tabs_gui->addSubTabTarget("grp_members_map",
2844 $this->ctrl->getLinkTarget($this,'membersMap'),
2845 "membersMap", get_class($this));
2846 }
2847
2848 if($ilAccess->checkAccess('write','',$this->object->getRefId()))
2849 {
2850 $this->tabs_gui->addSubTabTarget("events",
2851 $this->ctrl->getLinkTargetByClass('ilsessionoverviewgui','listSessions'),
2852 "", 'ilsessionoverviewgui');
2853 }
2854
2855 include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
2856 if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()))
2857 {
2858 $this->tabs_gui->addSubTabTarget('grp_export_members',
2859 $this->ctrl->getLinkTargetByClass('ilmemberexportgui','show'),
2860 "", 'ilmemberexportgui');
2861 }
2862
2863 break;
2864
2865 case 'settings':
2866 $this->tabs_gui->addSubTabTarget("grp_settings",
2867 $this->ctrl->getLinkTarget($this,'edit'),
2868 "edit", get_class($this));
2869
2870 $this->tabs_gui->addSubTabTarget("grp_info_settings",
2871 $this->ctrl->getLinkTarget($this,'editInfo'),
2872 "editInfo", get_class($this));
2873
2874 // custom icon
2875 if ($this->ilias->getSetting("custom_icons"))
2876 {
2877 $this->tabs_gui->addSubTabTarget("grp_icon_settings",
2878 $this->ctrl->getLinkTarget($this,'editGroupIcons'),
2879 "editGroupIcons", get_class($this));
2880 }
2881
2882 include_once("./Services/Maps/classes/class.ilMapUtil.php");
2884 {
2885 $this->tabs_gui->addSubTabTarget("grp_map_settings",
2886 $this->ctrl->getLinkTarget($this,'editMapSettings'),
2887 "editMapSettings", get_class($this));
2888 }
2889
2890 $this->tabs_gui->addSubTabTarget('groupings',
2891 $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
2892 'listGroupings',
2893 get_class($this));
2894
2895 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2896 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
2897 // only show if export permission is granted
2898 if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2899 {
2900 $this->tabs_gui->addSubTabTarget('grp_custom_user_fields',
2901 $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
2902 '',
2903 'ilobjectcustomuserfieldsgui');
2904 }
2905
2906
2907
2908 break;
2909
2910
2911 }
2912 }

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

Referenced by confirmAssignFromWaitingListObject(), confirmAssignSubscribersObject(), confirmDeleteMembersObject(), confirmRefuseFromListObject(), confirmRefuseSubscribersObject(), editGroupIconsObject(), editInfoObject(), editMapSettingsObject(), editMembersObject(), editObject(), executeCommand(), 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 1698 of file class.ilObjGroupGUI.php.

1699 {
1700 global $ilUser,$tree, $ilCtrl;
1701
1702 $this->checkPermission('leave');
1703
1704 $this->object->members_obj->delete($ilUser->getId());
1705
1706 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1707 $this->object->members_obj->sendNotification(
1709 $ilUser->getId()
1710 );
1711 $this->object->members_obj->sendNotification(
1713 $ilUser->getId()
1714 );
1715
1716 ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'),true);
1717 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
1718 $tree->getParentId($this->object->getRefId()));
1719 $ilCtrl->redirectByClass("ilrepositorygui", "");
1720 }

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

680 {
681 global $ilSetting;
682
683 $this->checkPermission('write');
684
685 $form = $this->initGroupIconsForm();
686 if($form->checkInput())
687 {
688 //save custom icons
689 if ($ilSetting->get("custom_icons"))
690 {
691 if($_POST["cont_icon_delete"])
692 {
693 $this->object->removeCustomIcon();
694 }
695 $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
696 }
697 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
698 $this->ctrl->redirect($this,"editGroupIcons");
699 }
700
701 $form->setValuesByPost();
702 $this->editGroupIconsObject($form);
703 }
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 511 of file class.ilObjGroupGUI.php.

512 {
513 $type = $this->object->getGroupType() ?
514 $this->object->getGroupType() :
515 $this->object->readGroupStatus();
516
517 if($type == GRP_TYPE_PUBLIC)
518 {
519 $this->object->setGroupType(GRP_TYPE_CLOSED);
520 }
521 else
522 {
523 $this->object->setGroupType(GRP_TYPE_PUBLIC);
524 }
525 $this->object->updateGroupType();
526 $this->object->update();
527 ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
528 $this->ctrl->redirect($this,'edit');
529 }

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

870 {
871 $this->checkPermission('write');
872
873 $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
874 $this->object->update();
875
876 ilUtil::sendSuccess($this->lng->txt("settings_saved"));
877 $this->editInfoObject();
878 return true;
879 }
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 1545 of file class.ilObjGroupGUI.php.

1546 {
1547 $this->checkPermission('write');
1548
1549 if(!count($_POST['participants']))
1550 {
1551 ilUtil::sendFailure($this->lng->txt('no_checkbox'));
1552 $this->membersObject();
1553 return false;
1554 }
1555
1556 // Check minimum one admin
1557 $has_admin = false;
1558 $admin_role = $this->object->getDefaultAdminRole();
1559 foreach(ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins() as $admin_id)
1560 {
1561 if(!isset($_POST['roles'][$admin_id]))
1562 {
1563 $has_admin = true;
1564 break;
1565 }
1566 if(in_array($admin_role,$_POST['roles'][$admin_id]))
1567 {
1568 $has_admin = true;
1569 break;
1570 }
1571 }
1572
1573 if(!$has_admin and ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getCountAdmins())
1574 {
1575 ilUtil::sendFailure($this->lng->txt('grp_min_one_admin'));
1576 $_POST['members'] = $_POST['participants'];
1577 $this->editMembersObject();
1578 return false;
1579 }
1580
1581 $admin_role = $this->object->getDefaultAdminRole();
1582
1583 $notifications = $_POST['notification'] ? $_POST['notification'] : array();
1584 foreach($_POST['participants'] as $usr_id)
1585 {
1586 // Check if a status changed mail is required
1587 $notification = false;
1588 if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array) $_POST['roles'][$usr_id]))
1589 {
1590 $notification = true;
1591 }
1592 if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array) $_POST['roles'][$usr_id]))
1593 {
1594 $notification = true;
1595 }
1596
1597 // TODO: check no role, owner
1598 $this->object->members_obj->updateRoleAssignments($usr_id,(array) $_POST['roles'][$usr_id]);
1599
1600 // Disable notification for all of them
1601 $this->object->members_obj->updateNotification($usr_id,0);
1602
1603 if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
1604 {
1605 $this->object->members_obj->updateNotification($usr_id,1);
1606 }
1607
1608 if($notification)
1609 {
1610 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1611 $this->object->members_obj->sendNotification(
1613 $usr_id
1614 );
1615 }
1616 }
1617 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1618 $this->ctrl->redirect($this, "members");
1619 return true;
1620 }

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

538 {
539 global $ilErr;
540
541 $this->checkPermission('write');
542
543
544 $form = $this->initForm();
545 $form->checkInput();
546
547 $old_type = $this->object->getGroupType();
548 $old_autofill = $this->object->hasWaitingListAutoFill();
549
550 $this->load($form);
551 $ilErr->setMessage('');
552
553 if(!$this->object->validate())
554 {
555 /*
556 $err = $this->lng->txt('err_check_input');
557 ilUtil::sendFailure($err);
558 $err = $ilErr->getMessage();
559 ilUtil::sendInfo($err);
560 */
561 ilUtil::sendFailure($ilErr->getMessage()); // #16975
562
563 // #17144
564 $form->setValuesByPost();
565 $this->editObject($form);
566 return true;
567 }
568
569 $modified = false;
570 if($this->object->isGroupTypeModified($old_type))
571 {
572 $modified = true;
573 $this->object->setGroupType($old_type);
574 }
575
576 $this->object->update();
577
578
579 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
581 $this->object->getId(),
582 $form,
583 array(
588 )
589 );
590
591 // Save sorting
592 $this->saveSortingSettings($form);
593
594 // if autofill has been activated trigger process
595 if(!$old_autofill &&
596 $this->object->hasWaitingListAutoFill())
597 {
598 $this->object->handleAutoFill();
599 }
600
601 // BEGIN ChangeEvents: Record update Object.
602 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
603 global $ilUser;
604 ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
605 ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
606 // END PATCH ChangeEvents: Record update Object.
607
608 // Update ecs export settings
609 include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
610 $ecs = new ilECSGroupSettings($this->object);
611 $ecs->handleSettingsUpdate();
612
613 if($modified)
614 {
615 include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
616 ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
617 $confirm = new ilConfirmationGUI();
618 $confirm->setFormAction($this->ctrl->getFormAction($this));
619 $confirm->addItem(
620 'grp_type',
621 $this->object->getGroupType(),
622 $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'))
623 );
624 $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
625 $confirm->setCancel($this->lng->txt('cancel'), 'edit');
626
627 $this->tpl->setContent($confirm->getHTML());
628 return true;
629 }
630 else
631 {
632 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
633 $this->ctrl->redirect($this,'edit');
634 return true;
635 }
636 }
_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.
load(ilPropertyFormGUI $a_form)
load settings
editObject()
edit object
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.

References $ilErr, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\editObject(), GRP_TYPE_CLOSED, initForm(), load(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), 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 1629 of file class.ilObjGroupGUI.php.

1630 {
1631 $this->checkPermission('write');
1632
1633 $notification = $_POST['notification'] ? $_POST['notification'] : array();
1634 foreach($this->object->members_obj->getAdmins() as $admin_id)
1635 {
1636 $this->object->members_obj->updateNotification($admin_id,(int) in_array($admin_id,$notification));
1637 }
1638 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1639 $this->membersObject();
1640 }

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

335 {
336 global $tree,$rbacsystem,$ilUser;
337
338 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
339 ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
340 $this->object->getRefId(),'grp');
341
342 if (strtolower($_GET["baseClass"]) == "iladministrationgui")
343 {
344 parent::viewObject();
345 return true;
346 }
347
348 if(!$this->checkAgreement())
349 {
350 include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
351 $this->tabs_gui->setTabActive('view_content');
352 $this->ctrl->setReturn($this,'view');
353 $agreement = new ilMemberAgreementGUI($this->object->getRefId());
354 $this->ctrl->setCmdClass(get_class($agreement));
355 $this->ctrl->forwardCommand($agreement);
356 return true;
357 }
358
359 $this->tabs_gui->setTabActive('view_content');
360 $this->renderObject();
361 }
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: