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

Protected Member Functions

 initCreateForm ($a_new_type)
 Init object creation form.
 initInfoEditor ()
 init info editor
 initForm ($a_mode= 'edit')
 init create/edit form
 loadDate ($a_field)
 load date
 setSubTabs ($a_tab)
 set sub tabs
 createMailSignature ()
 Create a course mail signature.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link.
 initAttendanceList ()
 Init attendance list object.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __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
 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
 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.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form.
 afterUpdate ()
 Post (successful) object update hook.
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction.
 initFormPasswordInstruction ()
 Init password form.
 savePasswordObject ()
 Save password.
 fileManagerLaunchObject ()
 Launch jnlp.

Private Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 $multi_download_enabled = false

Detailed Description

Constructor & Destructor Documentation

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

Constructor public.

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

References ilContainerGUI\ilContainerGUI().

{
$this->type = "grp";
$this->ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
$this->lng->loadLanguageModule('grp');
}

+ Here is the call graph for this function:

Member Function Documentation

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

goto target group

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

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

{
global $ilAccess, $ilErr, $lng,$ilUser;
include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
if(substr($a_add,0,5) == 'rcode')
{
if($ilUser->getId() == ANONYMOUS_USER_ID)
{
// Redirect to login for anonymous
"login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
$ilUser->getCurrentLanguage()
);
}
// Redirects to target location after assigning user to course
$a_target,
substr($a_add,5)
);
}
if ($a_add == "mem" && $ilAccess->checkAccess("write", "", $a_target))
{
ilObjectGUI::_gotoRepositoryNode($a_target, "members");
}
if ($ilAccess->checkAccess("read", "", $a_target))
{
}
else
{
// to do: force flat view
if ($ilAccess->checkAccess("visible", "", $a_target))
{
ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
}
else
{
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
}
}
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjGroupGUI::addUserObject (   $user_ids,
  $a_type 
)

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

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

References $_SESSION, $GLOBALS, ilObjUser\_addDesktopItem(), ilForumNotification\checkForumsExistsInsert(), ilObjGroup\GRP_ADMIN, ilObjGroup\GRP_MEMBER, ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER.

{
if (empty($user_ids[0]))
{
$GLOBALS['lng']->loadLanguageModule('search');
ilUtil::sendFailure($this->lng->txt('search_err_user_not_exist'),true);
return false;
}
foreach ($user_ids as $new_member)
{
switch($a_type)
{
if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
{
$this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
}
break;
if (!$this->object->addMember($new_member,$this->object->getDefaultAdminRole()))
{
$this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
}
break;
}
ilObjUser::_addDesktopItem($new_member, $this->object->getRefId(), 'grp');
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$this->object->members_obj->sendNotification(
$new_member
);
include_once './Modules/Forum/classes/class.ilForumNotification.php';
ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $new_member);
}
unset($_SESSION["saved_post"]);
unset($_SESSION['grp_usr_search_result']);
ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
$this->ctrl->redirect($this,'members');
}

+ Here is the call graph for this function:

ilObjGroupGUI::assignFromWaitingListObject ( )

add from waiting list

public

Parameters
@return

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

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

{
$this->checkPermission('write');
if(!count($_POST["waiting"]))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"));
$this->membersObject();
return false;
}
include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
$waiting_list = new ilGroupWaitingList($this->object->getId());
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$added_users = 0;
foreach($_POST["waiting"] as $user_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
{
continue;
}
if($this->object->members_obj->isAssigned($user_id))
{
continue;
}
$this->object->members_obj->add($user_id,IL_GRP_MEMBER);
$this->object->members_obj->sendNotification(
$user_id
);
$waiting_list->removeFromList($user_id);
include_once('./Modules/Forum/classes/class.ilForumNotification.php');
ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $user_id);
++$added_users;
}
if($added_users)
{
ilUtil::sendSuccess($this->lng->txt("grp_users_added"));
$this->membersObject();
return true;
}
else
{
ilUtil::sendFailure($this->lng->txt("grp_users_already_assigned"));
$this->searchObject();
return false;
}
}

+ Here is the call graph for this function:

ilObjGroupGUI::assignMemberObject ( )

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

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

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

{
$user_ids = $_POST["id"];
if (empty($user_ids[0]))
{
// TODO: jumps back to grp content. go back to last search result
$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
}
foreach ($user_ids as $new_member)
{
if (!$this->object->addMember($new_member,$this->object->getDefaultMemberRole()))
{
$this->ilErr->raiseError("An Error occured while assigning user to group !",$this->ilErr->MESSAGE);
}
}
unset($_SESSION["saved_post"]);
ilUtil::sendSuccess($this->lng->txt("grp_msg_member_assigned"),true);
$this->ctrl->redirect($this,'members');
}

+ Here is the call graph for this function:

ilObjGroupGUI::assignSubscribersObject ( )

assign subscribers

public

Returns

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

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

{
$this->checkPermission('write');
if(!count($_POST['subscribers']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
foreach($_POST['subscribers'] as $usr_id)
{
$this->object->members_obj->sendNotification(
$usr_id
);
$this->object->members_obj->add($usr_id,IL_GRP_MEMBER);
$this->object->members_obj->deleteSubscriber($usr_id);
include_once('./Modules/Forum/classes/class.ilForumNotification.php');
}
ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_assigned"),true);
$this->ctrl->redirect($this,'members');
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::canceledObject ( )

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

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

References $_GET, and ilObjectGUI\$return_location.

{
$return_location = $_GET["cmd_return_location"];
if (strcmp($return_location, "") == 0)
{
}
$this->ctrl->redirect($this, $return_location);
}
ilObjGroupGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

private

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

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

Referenced by viewObject().

{
global $ilUser,$ilAccess;
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
return true;
}
// Disable aggrement if is not member of group
if(!$this->object->members_obj->isAssigned($ilUser->getId()))
{
return true;
}
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
{
return true;
}
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Services/Membership/classes/class.ilMemberAgreement.php');
// Check agreement
if(($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
{
return false;
}
// Check required fields
include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
{
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Referenced by exportMembersObject().

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

+ Here is the caller graph for this function:

ilObjGroupGUI::confirmDeleteMembersObject ( )

delete selected members

public

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

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

{
$this->checkPermission('write');
$participants_to_delete = (array) array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
if(!count($participants_to_delete))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
// Check last admin
$admins = (array) ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins();
$admins_after = (array) array_diff($admins, $participants_to_delete);
if(!count($admins_after) and count($admins))
{
ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
$this->membersObject();
return false;
}
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('grp_edit_members');
include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this,'deleteMembers'));
$confirm->setHeaderText($this->lng->txt('grp_dismiss_member'));
$confirm->setConfirm($this->lng->txt('confirm'),'deleteMembers');
$confirm->setCancel($this->lng->txt('cancel'),'members');
foreach($this->readMemberData(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles'])) as $participants)
{
$confirm->addItem('participants[]',
$participants['usr_id'],
$participants['lastname'].', '.$participants['firstname'].' ['.$participants['login'].']',
ilUtil::getImagePath('icon_usr.png'));
}
$this->tpl->setContent($confirm->getHTML());
}

+ Here is the call graph for this function:

ilObjGroupGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

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

References ilLink\_getLink().

Referenced by mailMembersObject(), and sendMailToSelectedUsersObject().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::deleteMembersObject ( )

delete members

public

Parameters
@return

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

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

{
$this->checkPermission('write');
if(!count($_POST['participants']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return true;
}
$this->object->members_obj->deleteParticipants($_POST['participants']);
// Send notification
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
include_once './Modules/Forum/classes/class.ilForumNotification.php';
foreach($_POST['participants'] as $part)
{
$this->object->members_obj->sendNotification(
$part
);
ilForumNotification::checkForumsExistsDelete($this->object->getRefId(), $part);
}
ilUtil::sendSuccess($this->lng->txt("grp_msg_membership_annulled"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::editGroupIconsObject (   $a_form = null)

edit container icons

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

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

Referenced by updateGroupIconsObject().

{
global $tpl;
$this->checkPermission('write');
$this->setSubTabs("settings");
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('grp_icon_settings');
if(!$a_form)
{
$a_form = $this->initGroupIconsForm();
}
$tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::editInfoObject ( )

edit info

public

Returns

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

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

Referenced by updateInfoObject().

{
global $ilErr,$ilAccess;
$this->checkPermission('write');
$this->setSubTabs('settings');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('grp_info_settings');
$this->initInfoEditor();
$this->tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::editMapSettingsObject ( )

Edit Map Settings.

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

References $ilCtrl, $ilUser, ilGoogleMapUtil\getDefaultSettings(), ilGoogleMapUtil\isActivated(), ilLocationInputGUI\setLatitude(), setSubTabs(), and ilCheckboxInputGUI\setValue().

{
global $ilUser, $ilCtrl, $ilUser, $ilAccess;
$this->setSubTabs("settings");
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('grp_map_settings');
include_once('./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php');
!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
return;
}
$latitude = $this->object->getLatitude();
$longitude = $this->object->getLongitude();
$zoom = $this->object->getLocationZoom();
// Get Default settings, when nothing is set
if ($latitude == 0 && $longitude == 0 && $zoom == 0)
{
$latitude = $def["latitude"];
$longitude = $def["longitude"];
$zoom = $def["zoom"];
}
//$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"), $this->lng->txt("personal_desktop"));
//$this->tpl->setVariable("HEADER", $this->lng->txt("personal_desktop"));
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($this->lng->txt("grp_map_settings"));
// enable map
$public = new ilCheckboxInputGUI($this->lng->txt("grp_enable_map"),
"enable_map");
$public->setValue("1");
$public->setChecked($this->object->getEnableGroupMap());
$form->addItem($public);
// map location
$loc_prop = new ilLocationInputGUI($this->lng->txt("grp_map_location"),
"location");
$loc_prop->setLatitude($latitude);
$loc_prop->setLongitude($longitude);
$loc_prop->setZoom($zoom);
$form->addItem($loc_prop);
$form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjGroupGUI::editMemberObject ( )

edit one member

public

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

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

{
$_POST['members'] = array((int) $_GET['member_id']);
}

+ Here is the call graph for this function:

ilObjGroupGUI::editMembersObject ( )

edit member(s)

public

Returns

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

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

Referenced by editMemberObject(), and updateMembersObject().

{
$this->checkPermission('write');
$post_participants = array_unique(array_merge((array) $_POST['admins'],(array) $_POST['members'], (array) $_POST['roles']));
$real_participants = ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getParticipants();
$participants = array_intersect((array) $post_participants, (array) $real_participants);
if(!count($participants))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('grp_edit_members');
include_once('./Modules/Group/classes/class.ilGroupEditParticipantsTableGUI.php');
$table_gui = new ilGroupEditParticipantsTableGUI($this);
$table_gui->setTitle($this->lng->txt('grp_mem_change_status'),'icon_usr.png',$this->lng->txt('grp_mem_change_status'));
$table_gui->setData($this->readMemberData($participants));
$this->tpl->setContent($table_gui->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::editObject ( )

Edit object.

public

Parameters
boolshow warning, if group type has been changed
Returns

Reimplemented from ilObjectGUI.

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

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

Referenced by updateObject().

{
$this->checkPermission("write");
$this->setSubTabs('settings');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('grp_settings');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.grp_edit.html','Modules/Group');
if($_GET['group_type_changed'])
{
$this->ctrl->clearParameters($this);
$this->tpl->setVariable('GRP_FORMACTION',$this->ctrl->getFormAction($this));
$this->tpl->setVariable('TXT_SW_GRP_TYPE_S',$this->lng->txt('grp_change_type'));
$this->tpl->setVariable('TXT_SW_GRP_TYPE_C',$this->lng->txt('cancel'));
$this->initForm('update_group_type');
}
else
{
$this->initForm('edit');
}
$this->tpl->setVariable('EDIT_FORM',$this->form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilObjGroupGUI::executeCommand ( )

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

Reimplemented from ilContainerGUI.

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

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

{
global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilCtrl;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
// show repository tree
$this->showRepTree(true);
// add entry to navigation history
if (!$this->getCreationMode() &&
$ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilNavigationHistory->addItem($_GET["ref_id"],
$ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset"), "grp");
}
switch($next_class)
{
case 'ilgroupregistrationgui':
$this->ctrl->setReturn($this,'');
$this->tabs_gui->setTabActive('join');
include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
$registration = new ilGroupRegistrationGUI($this->object);
$this->ctrl->forwardCommand($registration);
break;
case 'ilpermissiongui':
$this->tabs_gui->setTabActive('perm_settings');
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilrepositorysearchgui':
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search =& new ilRepositorySearchGUI();
$rep_search->setCallback($this,
'addUserObject',
array(
ilObjGroup::GRP_MEMBER => $this->lng->txt('il_grp_member'),
ilObjGroup::GRP_ADMIN => $this->lng->txt('il_grp_admin')
));
// Set tabs
$this->tabs_gui->setTabActive('members');
$this->ctrl->setReturn($this,'members');
$ret =& $this->ctrl->forwardCommand($rep_search);
$this->setSubTabs('members');
$this->tabs_gui->setSubTabActive('members');
break;
case "ilinfoscreengui":
$ret =& $this->infoScreen();
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$this->object->getRefId(),
$_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
$this->tabs_gui->setTabActive('learning_progress');
break;
case 'ilobjcoursegroupinggui':
$this->setSubTabs('settings');
include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
$this->ctrl->setReturn($this,'edit');
$crs_grp_gui =& new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
$this->ctrl->forwardCommand($crs_grp_gui);
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('groupings');
break;
case 'ilcoursecontentgui':
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->forwardCommand($course_content_obj);
break;
case 'ilpublicuserprofilegui':
require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('group_members');
$this->tabs_gui->setSubTabActive('grp_members_gallery');
$profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
$profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, "membersGallery"));
$html = $this->ctrl->forwardCommand($profile_gui);
$this->tpl->setVariable("ADM_CONTENT", $html);
break;
case "ilcolumngui":
$this->tabs_gui->setTabActive('none');
$this->checkPermission("read");
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
$this->renderObject();
break;
// container page editing
case "ilcontainerpagegui":
if ($ret != "")
{
$this->tpl->setContent($ret);
}
break;
case 'ilobjectcopygui':
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('grp');
$this->ctrl->forwardCommand($cp);
break;
case "ilobjstylesheetgui":
break;
case 'ilobjectcustomuserfieldsgui':
include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
$cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
$this->setSubTabs('settings');
$this->tabs_gui->setTabActive('settings');
$this->ctrl->forwardCommand($cdf_gui);
break;
case 'ilmemberagreementgui':
include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
$this->ctrl->setReturn($this,'');
$this->tabs_gui->setTabActive('view_content');
$agreement = new ilMemberAgreementGUI($this->object->getRefId());
$this->ctrl->forwardCommand($agreement);
break;
case 'ilexportgui':
$this->tabs_gui->setTabActive('export');
include_once './Services/Export/classes/class.ilExportGUI.php';
$exp = new ilExportGUI($this);
$exp->addFormat('xml');
$this->ctrl->forwardCommand($exp);
break;
case 'ilmemberexportgui':
include_once('./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('export_members');
$export = new ilMemberExportGUI($this->object->getRefId());
$this->ctrl->forwardCommand($export);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
case 'ilobjectservicesettingsgui':
$this->ctrl->setReturn($this,'edit');
$this->setSubTabs("settings");
$this->tabs_gui->activateTab('settings');
$this->tabs_gui->activateSubTab('tool_settings');
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this,
$this->object->getId(),
array(
));
$this->ctrl->forwardCommand($service);
break;
case 'ilsessionoverviewgui':
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('events');
include_once './Modules/Group/classes/class.ilGroupParticipants.php';
$prt = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
include_once('./Modules/Session/classes/class.ilSessionOverviewGUI.php');
$overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt);
$this->ctrl->forwardCommand($overview);
break;
default:
// check visible permission
if (!$this->getCreationMode() and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp'))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
// #9401 - see also ilStartupGUI::_checkGoto()
if($cmd == 'infoScreenGoto')
{
if($this->object->isRegistrationEnabled())
{
$cmd = 'join';
}
else
{
$cmd = 'infoScreen';
}
}
// check read permission
if ((!$this->getCreationMode()
&& !$rbacsystem->checkAccess('read',$this->object->getRefId()) && $cmd != 'infoScreen')
|| $cmd == 'join')
{
// no join permission -> redirect to info screen
if (!$rbacsystem->checkAccess('join',$this->object->getRefId()))
{
$this->ctrl->redirect($this, "infoScreen");
}
else // no read -> show registration
{
include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
$this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
}
}
if(!$cmd)
{
$cmd = 'view';
}
$cmd .= 'Object';
$this->$cmd();
break;
}
$this->addHeaderAction();
}

+ Here is the call graph for this function:

ilObjGroupGUI::exportMembersObject ( )

Exports group members to Microsoft Excel file.

Exports group members to Microsoft Excel file

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

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

{
$title = preg_replace("/\s/", "_", $this->object->getTitle());
include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
$adapter = new ilExcelWriterAdapter("export_" . $title . ".xls");
$workbook = $adapter->getWorkbook();
// Creating a worksheet
$format_bold =& $workbook->addFormat();
$format_bold->setBold();
$format_percent =& $workbook->addFormat();
$format_percent->setNumFormat("0.00%");
$format_datetime =& $workbook->addFormat();
$format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
$format_title =& $workbook->addFormat();
$format_title->setBold();
$format_title->setColor('black');
$format_title->setPattern(1);
$format_title->setFgColor('silver');
$worksheet =& $workbook->addWorksheet();
$column = 0;
$profile_data = array("email", "gender", "firstname", "lastname", "person_title", "institution",
"department", "street", "zipcode","city", "country", "phone_office", "phone_home", "phone_mobile",
"fax", "matriculation");
foreach ($profile_data as $data)
{
$worksheet->writeString(0, $column++, $this->cleanString($this->lng->txt($data)), $format_title);
}
$member_ids = $this->object->getGroupMemberIds();
$row = 1;
foreach ($member_ids as $member_id)
{
$column = 0;
$member =& $this->ilias->obj_factory->getInstanceByObjId($member_id);
if ($member->getPref("public_email")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getEmail()));
}
else
{
$column++;
}
$worksheet->writeString($row, $column++, $this->cleanString($this->lng->txt("gender_" . $member->getGender())));
$worksheet->writeString($row, $column++, $this->cleanString($member->getFirstname()));
$worksheet->writeString($row, $column++, $this->cleanString($member->getLastname()));
$worksheet->writeString($row, $column++, $this->cleanString($member->getUTitle()));
if ($member->getPref("public_institution")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getInstitution()));
}
else
{
$column++;
}
if ($member->getPref("public_department")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getDepartment()));
}
else
{
$column++;
}
if ($member->getPref("public_street")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getStreet()));
}
else
{
$column++;
}
if ($member->getPref("public_zip")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getZipcode()));
}
else
{
$column++;
}
if ($member->getPref("public_city")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getCity()));
}
else
{
$column++;
}
if ($member->getPref("public_country")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getCountry()));
}
else
{
$column++;
}
if ($member->getPref("public_phone_office")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneOffice()));
}
else
{
$column++;
}
if ($member->getPref("public_phone_home")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneHome()));
}
else
{
$column++;
}
if ($member->getPref("public_phone_mobile")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getPhoneMobile()));
}
else
{
$column++;
}
if ($member->getPref("public_fax")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getFax()));
}
else
{
$column++;
}
if ($member->getPref("public_matriculation")=="y")
{
$worksheet->writeString($row, $column++, $this->cleanString($member->getMatriculation()));
}
else
{
$column++;
}
$row++;
}
$workbook->close();
}

+ Here is the call graph for this function:

ilObjGroupGUI::exportObject ( )

Creates the output form for group member export.

Creates the output form for group member export

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

References ilObjectGUI\getFormAction().

{
$this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.grp_members_export.html",
"Modules/Group");
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("FORMACTION", $this->getFormAction("export",$this->ctrl->getFormAction($this)));
$this->tpl->setVariable("BUTTON_EXPORT", $this->lng->txt("export_group_members"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjGroupGUI::getAttendanceListUserData (   $a_user_id)

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

References ilObjectGUI\$data.

{
$data = $this->members_data[$a_user_id];
$data['access'] = $data['access_time'];
$data['progress'] = $this->lng->txt($data['progress']);
return $data;
}
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 2040 of file class.ilObjGroupGUI.php.

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

{
global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
$ilHelp->setScreenIdComponent("grp");
if ($rbacsystem->checkAccess('read',$this->ref_id))
{
$tabs_gui->addTab("view_content", $lng->txt("content"),
$this->ctrl->getLinkTarget($this, ""));
}
if ($rbacsystem->checkAccess('visible',$this->ref_id))
{
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"),
"infoScreen",
"", "",false);
}
if ($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this),
"");
}
$is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
// Members
$mem_cmd = $ilAccess->checkAccess('write','',$this->ref_id) ? "members" : "membersGallery";
if($mem_cmd != "membersGallery" || $is_participant)
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, $mem_cmd),
array(),
get_class($this));
}
// learning progress
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$tabs_gui->addTarget(
'export',
$this->ctrl->getLinkTargetByClass('ilexportgui',''),
'export',
'ilexportgui'
);
}
/*
if ($rbacsystem->checkAccess('write',$this->object->getRefId()))
{
$tabs_gui->addTarget('export',
$this->ctrl->getLinkTarget($this,'listExportFiles'),
array('listExportFiles','exportXML','confirmDeleteExportFile','downloadExportFile'),
get_class($this));
}
*/
// parent tabs (all container: edit_permission, clipboard, trash
parent::getTabs($tabs_gui);
if($ilAccess->checkAccess('join','',$this->object->getRefId()) and
!$this->object->members_obj->isAssigned($ilUser->getId()))
{
include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
if(ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
{
$tabs_gui->addTab(
'leave',
$this->lng->txt('membership_leave'),
$this->ctrl->getLinkTargetByClass('ilgroupregistrationgui','show','')
);
}
else
{
$tabs_gui->addTarget("join",
$this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
'show',
"");
}
}
if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
$this->object->members_obj->isMember($ilUser->getId()))
{
$tabs_gui->addTarget("grp_btn_unsubscribe",
$this->ctrl->getLinkTarget($this, "leave"),
'',
"");
}
}

+ Here is the call graph for this function:

ilObjGroupGUI::importFileObject2 ( )

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

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

{
if(!is_array($_FILES['xmldoc']))
{
ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
$this->createObject();
return false;
}
include_once './Modules/Group/classes/class.ilObjGroup.php';
if($ref_id = ilObjGroup::_importFromFile($_FILES['xmldoc'],(int) $_GET['ref_id']))
{
$this->ctrl->setParameter($this, "ref_id", $ref_id);
ilUtil::sendSuccess($this->lng->txt("import_grp_finished"),true);
ilUtil::redirect($this->ctrl->getLinkTarget($this,'edit','',false,false));
}
ilUtil::sendFailure($this->lng->txt("import_file_not_valid"));
$this->createObject();
}

+ Here is the call graph for this function:

ilObjGroupGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreenObject().

{
global $rbacsystem, $ilUser, $ilSetting;
$this->tabs_gui->setTabActive('info_short');
if(!$rbacsystem->checkAccess("visible", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
if(strlen($this->object->getInformation()))
{
$info->addSection($this->lng->txt('grp_general_informations'));
$info->addProperty($this->lng->txt('grp_information'), nl2br(
ilUtil::makeClickable ($this->object->getInformation(), true)));
}
$info->enablePrivateNotes();
$info->enableLearningProgress(true);
$info->addSection($this->lng->txt('group_registration'));
$info->showLDAPRoleGroupMappingInfo();
if(!$this->object->isRegistrationEnabled())
{
$info->addProperty($this->lng->txt('group_registration_mode'),
$this->lng->txt('grp_reg_deac_info_screen'));
}
else
{
switch($this->object->getRegistrationType())
{
$info->addProperty($this->lng->txt('group_registration_mode'),
$this->lng->txt('grp_reg_direct_info_screen'));
break;
$info->addProperty($this->lng->txt('group_registration_mode'),
$this->lng->txt('grp_reg_req_info_screen'));
break;
$info->addProperty($this->lng->txt('group_registration_mode'),
$this->lng->txt('grp_reg_passwd_info_screen'));
break;
}
/*
$info->addProperty($this->lng->txt('group_registration_time'),
ilDatePresentation::formatPeriod(
$this->object->getRegistrationStart(),
$this->object->getRegistrationEnd()));
*/
if($this->object->isRegistrationUnlimited())
{
$info->addProperty($this->lng->txt('group_registration_time'),
$this->lng->txt('grp_registration_unlimited'));
}
elseif($this->object->getRegistrationStart()->getUnixTime() < time())
{
$info->addProperty($this->lng->txt("group_registration_time"),
$this->lng->txt('cal_until').' '.
ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
}
elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
{
$info->addProperty($this->lng->txt("group_registration_time"),
$this->lng->txt('cal_from').' '.
ilDatePresentation::formatDate($this->object->getRegistrationStart()));
}
if ($this->object->isMembershipLimited())
{
$info->addProperty($this->lng->txt("mem_free_places"),
max(0,$this->object->getMaxMembers() - $this->object->members_obj->getCountMembers()));
}
}
// Confirmation
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
if($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport())
{
include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
$field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
$this->lng->loadLanguageModule('ps');
$info->addSection($this->lng->txt('grp_user_agreement_info'));
$info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
{
$info->addProperty($this->lng->txt('ps_grp_user_fields'),$fields);
}
}
// forward the command
$this->ctrl->forwardCommand($info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References infoScreen().

{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}

+ Here is the call graph for this function:

ilObjGroupGUI::initAttendanceList ( )
protected

Init attendance list object.

Returns
ilAttendanceList

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

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

Referenced by printMembersObject(), and printMembersOutputObject().

{
include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
$members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
$waiting_list = new ilGroupWaitingList($this->object->getId());
include_once 'Services/Membership/classes/class.ilAttendanceList.php';
$list = new ilAttendanceList($this, $members_obj, $waiting_list);
$list->setId('grpmemlst');
$list->setTitle($this->lng->txt('grp_members_print_title'),
$this->lng->txt('obj_grp').': '.$this->object->getTitle());
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
$this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
ilObjUserTracking::_enabledUserRelatedData());
if($this->show_tracking)
{
include_once('./Services/Object/classes/class.ilObjectLP.php');
$olp = ilObjectLP::getInstance($this->object->getId());
$this->show_tracking = $olp->isActive();
}
if($this->show_tracking)
{
$this->lng->loadLanguageModule('trac');
$list->addPreset('progress', $this->lng->txt('learning_progress'), true);
}
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($privacy->enabledGroupAccessTimes())
{
$list->addPreset('access', $this->lng->txt('last_access'), true);
}
return $list;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::initCreateForm (   $a_new_type)
protected

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

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

References initForm().

{
if(!is_object($this->object))
{
$this->object = new ilObjGroup();
}
$this->initForm('create');
return $this->form;
}

+ Here is the call graph for this function:

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

init create/edit form

protected

Parameters
stringedit or create
Returns

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

References $ilUser, $pass, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilLink\_getLink(), ilRadioOption\addSubItem(), 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(), ilContainerSortingSettings\lookupSortModeFromParentContainer(), ilObjGroup\MAIL_ALLOWED_ALL, ilObjGroup\MAIL_ALLOWED_TUTORS, ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilDateDurationInputGUI\setStartText(), ilTextInputGUI\setSubmitFormOnEnter(), ilRadioOption\setTitle(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilTextAreaInputGUI\setValue(), ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObject\TITLE_LENGTH, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

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

{
global $ilUser,$tpl,$tree;
if(is_object($this->form))
{
return true;
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
switch($a_mode)
{
case 'edit':
$this->form->setFormAction($this->ctrl->getFormAction($this,'update'));
break;
default:
$this->form->setTableWidth('600px');
$this->form->setFormAction($this->ctrl->getFormAction($this,'save'));
break;
}
// title
$title = new ilTextInputGUI($this->lng->txt('title'),'title');
$title->setSubmitFormOnEnter(true);
$title->setValue($this->object->getTitle());
$title->setSize(min(40, ilObject::TITLE_LENGTH));
$title->setMaxLength(ilObject::TITLE_LENGTH);
$title->setRequired(true);
$this->form->addItem($title);
// desc
$desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
$desc->setValue($this->object->getLongDescription());
$desc->setRows(2);
$desc->setCols(40);
$this->form->addItem($desc);
// Group type
$grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'),'grp_type');
if($a_mode == 'edit')
{
$type = ($this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus());
}
else
{
$type = ($this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC);
}
$grp_type->setValue($type);
$grp_type->setRequired(true);
// PUBLIC GROUP
$opt_public = new ilRadioOption($this->lng->txt('grp_public'),GRP_TYPE_PUBLIC,$this->lng->txt('grp_public_info'));
$grp_type->addOption($opt_public);
// CLOSED GROUP
$opt_closed = new ilRadioOption($this->lng->txt('grp_closed'),GRP_TYPE_CLOSED,$this->lng->txt('grp_closed_info'));
$grp_type->addOption($opt_closed);
if($a_mode == 'update_group_type')
{
$grp_type->setAlert($this->lng->txt('grp_type_changed_info'));
}
$this->form->addItem($grp_type);
if($a_mode == 'edit')
{
// Group registration ############################################################
$pres = new ilFormSectionHeaderGUI();
$pres->setTitle($this->lng->txt('grp_setting_header_registration'));
$this->form->addItem($pres);
// Registration type
$reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'),'registration_type');
$reg_type->setValue($this->object->getRegistrationType());
$opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'),GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
$reg_type->addOption($opt_dir);
$opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'),GRP_REGISTRATION_PASSWORD);
$pass = new ilTextInputGUI($this->lng->txt("password"),'password');
$pass->setInfo($this->lng->txt('grp_reg_password_info'));
$pass->setValue($this->object->getPassword());
$pass->setSize(10);
$pass->setMaxLength(32);
$opt_pass->addSubItem($pass);
$reg_type->addOption($opt_pass);
$opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'),GRP_REGISTRATION_REQUEST,$this->lng->txt('grp_reg_request_info'));
$reg_type->addOption($opt_req);
$opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'),GRP_REGISTRATION_DEACTIVATED,$this->lng->txt('grp_reg_disabled_info'));
$reg_type->addOption($opt_deact);
// Registration codes
$reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'),'reg_code_enabled');
$reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
$reg_code->setValue(1);
$reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
$this->form->addItem($reg_type);
// Registration codes
if(!$this->object->getRegistrationAccessCode())
{
include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
$this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
}
$reg_link = new ilHiddenInputGUI('reg_code');
$reg_link->setValue($this->object->getRegistrationAccessCode());
$this->form->addItem($reg_link);
$link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
include_once './Services/Link/classes/class.ilLink.php';
$val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
$link->setHTML('<font class="small">'.$val.'</font>');
$reg_code->addSubItem($link);
$this->form->addItem($reg_code);
// time limit
$time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'),'reg_limit_time');
// $time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
$time_limit->setChecked($this->object->isRegistrationUnlimited() ? false : true);
$this->lng->loadLanguageModule('dateplaner');
include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
$tpl->addJavaScript('./Services/Form/js/date_duration.js');
$dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_period'),'reg');
$dur->setStartText($this->lng->txt('cal_start'));
$dur->setEndText($this->lng->txt('cal_end'));
$dur->setMinuteStepSize(5);
$dur->setShowDate(true);
$dur->setShowTime(true);
$dur->setStart($this->object->getRegistrationStart());
$dur->setEnd($this->object->getRegistrationEnd());
$time_limit->addSubItem($dur);
$this->form->addItem($time_limit);
// max member
$lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'),'registration_membership_limited');
$lim->setValue(1);
// $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
$lim->setChecked($this->object->isMembershipLimited());
$max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'),'registration_max_members');
$max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
//$max->setTitle($this->lng->txt('members'));
$max->setSize(3);
$max->setMaxLength(4);
$max->setInfo($this->lng->txt('grp_reg_max_members_info'));
$lim->addSubItem($max);
$wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
$wait->setValue(1);
//$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
$wait->setInfo($this->lng->txt('grp_waiting_list_info'));
$wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
$lim->addSubItem($wait);
$this->form->addItem($lim);
// Group presentation
$hasParentCourse = $tree->checkForParentType($this->object->getRefId(),'crs');
$pres = new ilFormSectionHeaderGUI();
$pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
$this->form->addItem($pres);
// presentation type
$view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'),'view_mode');
if($hasParentCourse)
{
switch($this->object->getViewMode())
{
$course_view_mode = ': '.$this->lng->txt('cntr_view_sessions');
break;
$course_view_mode = ': '.$this->lng->txt('cntr_view_simple');
break;
$course_view_mode = ': '.$this->lng->txt('cntr_view_by_type');
break;
}
$opt = new ilRadioOption($this->lng->txt('grp_view_inherit').$course_view_mode,ilContainer::VIEW_INHERIT);
$opt->setInfo($this->lng->txt('grp_view_inherit_info'));
$view_type->addOption($opt);
}
if($hasParentCourse &&
$this->object->getViewMode(false) == ilContainer::VIEW_INHERIT)
{
$view_type->setValue(ilContainer::VIEW_INHERIT);
}
else
{
$view_type->setValue($this->object->getViewMode(true));
}
$opt = new ilRadioOption($this->lng->txt('cntr_view_simple'),ilContainer::VIEW_SIMPLE);
$opt->setInfo($this->lng->txt('grp_view_info_simple'));
$view_type->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
$opt->setInfo($this->lng->txt('grp_view_info_by_type'));
$view_type->addOption($opt);
$this->form->addItem($view_type);
$sog = new ilRadioGroupInputGUI($this->lng->txt('sorting_header'),'sor');
include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
$sort = new ilContainerSortingSettings($this->object->getId());
$sog->setValue($sort->getSortMode());
$sog->setRequired(true);
if($hasParentCourse)
{
$sde = new ilRadioOption();
$sde->setValue(ilContainer::SORT_INHERIT);
$title = $this->lng->txt('sort_inherit_prefix');
$title .= ' ('.ilContainerSortingSettings::sortModeToString(
$sde->setTitle($title);
$sde->setInfo($this->lng->txt('sorting_info_inherit'));
$sog->addOption($sde);
}
$sma = new ilRadioOption();
$sma->setValue(ilContainer::SORT_TITLE);
$sma->setTitle($this->lng->txt('sorting_title_header'));
$sma->setInfo($this->lng->txt('sorting_info_title'));
$sog->addOption($sma);
$sti = new ilRadioOption();
$sti->setValue(ilContainer::SORT_MANUAL);
$sti->setTitle($this->lng->txt('sorting_manual_header'));
$sti->setInfo($this->lng->txt('sorting_info_manual'));
$sog->addOption($sti);
$this->form->addItem($sog);
// additional features
$feat = new ilFormSectionHeaderGUI();
$feat->setTitle($this->lng->txt('obj_features'));
$this->form->addItem($feat);
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this->object->getId(),
$this->form,
array(
)
);
// Notification Settings
/*$notification = new ilFormSectionHeaderGUI();
$notification->setTitle($this->lng->txt('grp_notification'));
$this->form->addItem($notification);*/
// Show members type
$mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
$mail_type->setValue($this->object->getMailToMembersType());
$mail_tutors = new ilRadioOption($this->lng->txt('grp_mail_tutors_only'), ilObjGroup::MAIL_ALLOWED_TUTORS,
$this->lng->txt('grp_mail_tutors_only_info'));
$mail_type->addOption($mail_tutors);
$mail_all = new ilRadioOption($this->lng->txt('grp_mail_all'), ilObjGroup::MAIL_ALLOWED_ALL,
$this->lng->txt('grp_mail_all_info'));
$mail_type->addOption($mail_all);
$this->form->addItem($mail_type);
}
switch($a_mode)
{
case 'create':
$this->form->setTitle($this->lng->txt('grp_new'));
$this->form->setTitleIcon(ilUtil::getImagePath('icon_grp.png'));
$this->form->addCommandButton('save',$this->lng->txt('grp_new'));
$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
return true;
case 'edit':
$this->form->setTitle($this->lng->txt('grp_edit'));
$this->form->setTitleIcon(ilUtil::getImagePath('icon_grp.png'));
// Edit ecs export settings
include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
$ecs = new ilECSGroupSettings($this->object);
$ecs->addSettingsToForm($this->form, 'grp');
$this->form->addCommandButton('update',$this->lng->txt('save'));
$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
return true;
case 'update_group_type':
$grp_type->setValue(
$type == GRP_TYPE_PUBLIC ?
);
$this->form->setTitle($this->lng->txt('grp_edit'));
$this->form->setTitleIcon(ilUtil::getImagePath('icon_grp.png'));
return true;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::initGroupIconsForm ( )

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

References ilContainerGUI\showCustomIconsEditing().

Referenced by editGroupIconsObject(), and updateGroupIconsObject().

{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$this->showCustomIconsEditing(1, $form);
// $form->setTitle($this->lng->txt('edit_grouping'));
$form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

{
$lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
if($ilSetting->get("crsgrp_ntf") &&
ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
{
if(!$ilUser->getPref("grpcrs_ntf_".$this->ref_id))
{
$lg->addHeaderIcon("not_icon",
ilUtil::getImagePath("notification_off.png"),
$this->lng->txt("grp_notification_deactivated"));
$this->ctrl->setParameter($this, "grp_ntf", 1);
$caption = "grp_activate_notification";
}
else
{
$lg->addHeaderIcon("not_icon",
ilUtil::getImagePath("notification_on.png"),
$this->lng->txt("grp_notification_activated"));
$this->ctrl->setParameter($this, "grp_ntf", 0);
$caption = "grp_deactivate_notification";
}
$lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
$caption);
$this->ctrl->setParameter($this, "grp_ntf", "");
}
return $lg;
}

+ Here is the call graph for this function:

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

protected

Returns

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

References ilFormPropertyGUI\setInfo().

Referenced by editInfoObject().

{
if(is_object($this->form))
{
return true;
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this,'updateInfo'));
$this->form->setTitle($this->lng->txt('grp_general_informations'));
$this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
$this->form->addCommandButton('cancel',$this->lng->txt('cancel'));
$area = new ilTextAreaInputGUI($this->lng->txt('grp_information'),'important');
$area->setInfo($this->lng->txt('grp_information_info'));
$area->setValue($this->object->getInformation());
$area->setRows(8);
$area->setCols(80);
$this->form->addItem($area);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::leaveObject ( )

leave Group public

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

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

{
global $ilUser;
$this->checkPermission('leave');
$part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
if($part->isLastAdmin($ilUser->getId()))
{
ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
$this->viewObject();
return false;
}
$this->tabs_gui->setTabActive('grp_btn_unsubscribe');
include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
$cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setCancel($this->lng->txt("cancel"), "cancel");
$cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjGroupGUI::load ( )

load settings

public

Returns

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

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

Referenced by updateObject().

{
$this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
$this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
$this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
$this->object->setRegistrationType(ilUtil::stripSlashes($_POST['registration_type']));
$this->object->setPassword(ilUtil::stripSlashes($_POST['password']));
$this->object->enableUnlimitedRegistration((bool) !$_POST['reg_limit_time']);
$this->object->setRegistrationStart($this->loadDate('start'));
$this->object->setRegistrationEnd($this->loadDate('end'));
$this->object->enableMembershipLimitation((bool) $_POST['registration_membership_limited']);
$this->object->setMaxMembers((int) $_POST['registration_max_members']);
$this->object->enableWaitingList((bool) $_POST['waiting_list']);
$this->object->enableRegistrationAccessCode((bool) $_POST['reg_code_enabled']);
$this->object->setRegistrationAccessCode(ilUtil::stripSlashes($_POST['reg_code']));
$this->object->setViewMode(ilUtil::stripSlashes($_POST['view_mode']));
$this->object->setMailToMembersType((int) $_POST['mail_type']);
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::loadDate (   $a_field)
protected

load date

protected

Parameters
@return

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

References $_POST, $ilUser, and IL_CAL_FKT_GETDATE.

Referenced by load().

{
global $ilUser;
include_once('./Services/Calendar/classes/class.ilDateTime.php');
$dt['year'] = (int) $_POST['reg'][$a_field]['date']['y'];
$dt['mon'] = (int) $_POST['reg'][$a_field]['date']['m'];
$dt['mday'] = (int) $_POST['reg'][$a_field]['date']['d'];
$dt['hours'] = (int) $_POST['reg'][$a_field]['time']['h'];
$dt['minutes'] = (int) $_POST['reg'][$a_field]['time']['m'];
$dt['seconds'] = (int) $_POST['reg'][$a_field]['time']['s'];
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
return $date;
}

+ Here is the caller graph for this function:

ilObjGroupGUI::mailMembersObject ( )

Form for mail to group members.

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

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

{
global $rbacreview, $ilObjDataCache, $ilias;
include_once('./Services/AccessControl/classes/class.ilObjRole.php');
$this->lng->loadLanguageModule('mail');
if(!isset($_GET['returned_from_mail']))
{
ilUtil::sendInfo($this->lng->txt('mail_select_recipients'));
}
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html','Services/Contact');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$this->tpl->setVariable("MAILACTION", ilMailFormCall::getLinkTarget($this, 'mailMembers', array(), array('type' => 'role','sig' => $this->createMailSignature())));
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.png'));
$this->tpl->setVariable("TXT_MARKED_ENTRIES",$this->lng->txt('marked_entries'));
$this->tpl->setVariable("OK",$this->lng->txt('next'));
// Get role mailbox addresses
$role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
$role_ids = $rbacreview->getRolesOfRoleFolder($role_folder['ref_id'], false);
$role_addrs = array();
// Sort by relevance
$sorted_role_ids = array();
$counter = 2;
foreach($role_ids as $role_id)
{
switch(substr(ilObject::_lookupTitle($role_id),0,8))
{
case 'il_grp_a':
$sorted_role_ids[1] = $role_id;
break;
case 'il_grp_m':
$sorted_role_ids[0] = $role_id;
break;
default:
$sorted_role_ids[$counter++] = $role_id;
break;
}
}
ksort($sorted_role_ids,SORT_NUMERIC);
foreach ((array) $sorted_role_ids as $role_id)
{
$this->tpl->setCurrentBlock("mailbox_row");
$role_addr = $rbacreview->getRoleMailboxAddress($role_id);
// check if role title is unique. if not force use pear mail for roles
$ids_for_role_title = ilObject::_getIdsForTitle(ilObject::_lookupTitle($role_id), 'role');
if(count($ids_for_role_title) >= 2)
{
$ilias->setSetting('pear_mail_enable', 1);
}
$this->tpl->setVariable("CHECK_MAILBOX",ilUtil::formCheckbox(1,'roles[]',
htmlspecialchars($role_addr)
));
if (ilMail::_usePearMail() && substr($role_addr, 0, 4) != '#il_')
{
// if pear mail is enabled, mailbox addresses are already localized in the language of the user
$this->tpl->setVariable("MAILBOX",$role_addr);
}
else
{
// if pear mail is not enabled, we need to localize mailbox addresses in the language of the user
$this->tpl->setVariable("MAILBOX",ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)) . " (".$role_addr.")");
}
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjGroupGUI::membersGalleryObject ( )

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

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

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

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

{
global $rbacsystem, $ilAccess, $ilUser;
$is_admin = (bool) $rbacsystem->checkAccess("write", $this->object->getRefId());
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.crs_members_gallery.html','Modules/Course');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$member_ids = $this->object->getGroupMemberIds();
$admin_ids = $this->object->getGroupAdminIds();
// fetch all users data in one shot to improve performance
$members = $this->object->getGroupMemberData($member_ids);
// MEMBERS
if(count($members))
{
$ordered_members = array();
foreach($members as $member)
{
// get user object
if(!($usr_obj = ilObjectFactory::getInstanceByObjId($member["id"],false)))
{
continue;
}
if(!$usr_obj->getActive())
{
continue;
}
// please do not use strtoupper on first/last name for output
// this messes up with some unicode characters, i guess
// depending on php verion, alex
array_push($ordered_members,array("id" => $member["id"],
"login" => $usr_obj->getLogin(),
"lastname" => $usr_obj->getLastName(),
"firstname" => $usr_obj->getFirstName(),
"sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
"usr_obj" => $usr_obj));
}
$ordered_members=ilUtil::sortArray($ordered_members,"sortlastname","asc");
foreach($ordered_members as $member) {
$usr_obj = $member["usr_obj"];
$public_profile = $usr_obj->getPref("public_profile");
if ($public_profile == "g")
{
$public_profile = "y";
}
// SET LINK TARGET FOR USER PROFILE
$this->ctrl->setParameterByClass("ilpublicuserprofilegui", "user", $member["id"]);
$profile_target = $this->ctrl->getLinkTargetByClass("ilpublicuserprofilegui","getHTML");
// GET USER IMAGE
$file = $usr_obj->getPersonalPicturePath("xsmall");
switch(in_array($member["id"],$admin_ids))
{
//admins
case 1:
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("member_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("member_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("member");
break;
case 0:
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("member_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("member_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("member");
break;
}
if (in_array($member["id"],$admin_ids)) {
$this->tpl->setVariable("MEMBER_CLASS", "il_Admin");
}
else {
$this->tpl->setVariable("MEMBER_CLASS", "il_Member");
}
// do not show name, if public profile is not activated
if ($public_profile == "y")
{
$this->tpl->setVariable("FIRSTNAME", $member["firstname"]);
$this->tpl->setVariable("LASTNAME", $member["lastname"]);
}
$this->tpl->setVariable("LOGIN", $usr_obj->getLogin());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("members");
//$this->tpl->setVariable("MEMBERS_TABLE_HEADER",$this->lng->txt('crs_members_title'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TITLE",$this->lng->txt('crs_members_print_title'));
$this->tpl->setVariable("CSS_PATH",ilUtil::getStyleSheetLocation());
}

+ Here is the call graph for this function:

ilObjGroupGUI::membersMapObject ( )

Members map.

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

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

{
global $tpl;
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (!ilGoogleMapUtil::isActivated() || !$this->object->getEnableGroupMap())
{
return;
}
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
$map = new ilGoogleMapGUI();
$map->setMapId("group_map");
$map->setWidth("700px");
$map->setHeight("500px");
$map->setLatitude($this->object->getLatitude());
$map->setLongitude($this->object->getLongitude());
$map->setZoom($this->object->getLocationZoom());
$map->setEnableTypeControl(true);
$map->setEnableNavigationControl(true);
$map->setEnableCentralMarker(true);
$member_ids = $this->object->getGroupMemberIds();
$admin_ids = $this->object->getGroupAdminIds();
// fetch all users data in one shot to improve performance
$members = $this->object->getGroupMemberData($member_ids);
foreach($member_ids as $user_id)
{
$map->addUserMarker($user_id);
}
$tpl->setContent($map->getHTML());
$tpl->setLeftContent($map->getUserListHTML());
}

+ Here is the call graph for this function:

ilObjGroupGUI::membersObject ( )

edit members

public

Returns

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

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

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

{
global $ilUser, $ilToolbar, $lng, $ilCtrl;
include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
include_once('./Modules/Group/classes/class.ilGroupParticipantsTableGUI.php');
$this->checkPermission('write');
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
$this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
ilObjUserTracking::_enabledUserRelatedData());
if($this->show_tracking)
{
include_once('./Services/Object/classes/class.ilObjectLP.php');
$olp = ilObjectLP::getInstance($this->object->getId());
$this->show_tracking = $olp->isActive();
}
$part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('grp_edit_members');
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.grp_edit_members.html','Modules/Group');
$this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
// add members
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
$this,
$ilToolbar,
array(
'auto_complete_name' => $lng->txt('user'),
'user_type' => array(
ilObjGroup::GRP_MEMBER => $lng->txt("member"),
ilObjGroup::GRP_ADMIN => $lng->txt("administrator")
),
'submit_name' => $lng->txt('add')
)
);
// spacer
$ilToolbar->addSeparator();
// search button
$ilToolbar->addButton($this->lng->txt("grp_search_users"),
$this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
$ilToolbar->addSeparator();
// print button
$ilToolbar->addButton($this->lng->txt("grp_print_list"),
$this->ctrl->getLinkTarget($this, 'printMembers'));
$this->setShowHidePrefs();
// Waiting list table
include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
$waiting_list = new ilGroupWaitingList($this->object->getId());
if(count($wait = $waiting_list->getAllUsers()))
{
include_once('./Services/Membership/classes/class.ilWaitingListTableGUI.php');
if($ilUser->getPref('grp_wait_hide'))
{
$table_gui = new ilWaitingListTableGUI($this,$waiting_list,false);
$this->ctrl->setParameter($this,'wait_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilWaitingListTableGUI($this,$waiting_list,true);
$this->ctrl->setParameter($this,'wait_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setUsers($wait);
$table_gui->setTitle($this->lng->txt('grp_header_waiting_list'),'icon_usr.png',$this->lng->txt('group_new_registrations'));
$this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
}
// Subscriber table
if($part->getSubscribers())
{
include_once('./Services/Membership/classes/class.ilSubscriberTableGUI.php');
if($ilUser->getPref('grp_subscriber_hide'))
{
$table_gui = new ilSubscriberTableGUI($this,false);
$this->ctrl->setParameter($this,'subscriber_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilSubscriberTableGUI($this,true);
$this->ctrl->setParameter($this,'subscriber_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->readSubscriberData();
$table_gui->setTitle($this->lng->txt('group_new_registrations'),'icon_usr.png',$this->lng->txt('group_new_registrations'));
$this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
}
if(count($part->getAdmins()))
{
if($ilUser->getPref('grp_admin_hide'))
{
$table_gui = new ilGroupParticipantsTableGUI($this,'admin',false,false);
$this->ctrl->setParameter($this,'admin_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilGroupParticipantsTableGUI($this,'admin',true,false);
$this->ctrl->setParameter($this,'admin_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle($this->lng->txt('grp_admins'),'icon_usr.png',$this->lng->txt('grp_admins'));
$table_gui->parse($this->readMemberData($part->getAdmins()));
$this->tpl->setVariable('ADMINS',$table_gui->getHTML());
}
if($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
{
if($ilUser->getPref('grp_member_hide'))
{
$table_gui = new ilGroupParticipantsTableGUI($this,'member',false,$this->show_tracking,$this->object->getDEfaultMemberRole());
$this->ctrl->setParameter($this,'member_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilGroupParticipantsTableGUI($this,'member',true,$this->show_tracking,$this->object->getDefaultMemberRole());
$this->ctrl->setParameter($this,'member_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle($this->lng->txt('grp_members'),'icon_usr.png',$this->lng->txt('grp_members'));
$table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($this->object->getDefaultMemberRole()),
null, $table_gui->getSelectedColumns()));
$this->tpl->setCurrentBlock('member_block');
$this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
$this->tpl->parseCurrentBlock();
}
foreach(ilGroupParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
{
// Do not show table if no user is assigned
if(!($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))))
{
continue;
}
if($ilUser->getPref('grp_role_hide'.$role_id))
{
$table_gui = new ilGroupParticipantsTableGUI($this,'role',false,$this->show_tracking,$role_id);
$this->ctrl->setParameter($this,'role_hide_'.$role_id,0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilGroupParticipantsTableGUI($this,'role',true,$this->show_tracking,$role_id);
$this->ctrl->setParameter($this,'role_hide_'.$role_id,1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle(ilObject::_lookupTitle($role_id),'icon_usr.gif',ilObject::_lookupTitle($role_id));
$table_gui->parse($this->readMemberData($GLOBALS['rbacreview']->assignedUsers($role_id)));
$this->tpl->setCurrentBlock('member_block');
$this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable('TXT_SELECTED_USER',$this->lng->txt('grp_selected_users'));
$this->tpl->setVariable('BTN_FOOTER_EDIT',$this->lng->txt('edit'));
$this->tpl->setVariable('BTN_FOOTER_VAL',$this->lng->txt('remove'));
$this->tpl->setVariable('BTN_FOOTER_MAIL',$this->lng->txt('grp_mem_send_mail'));
$this->tpl->setVariable('ARROW_DOWN',ilUtil::getImagePath('arrow_downright.png'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Modify Item ListGUI for presentation in container.

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

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

{
global $tree;
// if folder is in a course, modify item list gui according to course requirements
if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),'crs'))
{
include_once("./Modules/Course/classes/class.ilObjCourse.php");
include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
$course_obj_id = ilObject::_lookupObjId($course_ref_id);
ilObjCourseGUI::_modifyItemGUI($a_item_list_gui,'ilcoursecontentgui',$a_item_data, $a_show_path,
ilObjCourse::_lookupAboStatus($course_obj_id), $course_ref_id, $course_obj_id,
$this->object->getRefId());
}
}

+ Here is the call graph for this function:

ilObjGroupGUI::prepareOutput ( )

Handle member view.

Returns

Reimplemented from ilObjectGUI.

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

References ilObjectGUI\getCreationMode().

Referenced by executeCommand().

{
global $rbacsystem;
if(!$this->getCreationMode())
{
/*
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
$settings = ilMemberViewSettings::getInstance();
if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
{
$settings->setContainer($this->object->getRefId());
$rbacsystem->initMemberView();
}
*/
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::printMembersObject ( )

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

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

{
global $ilTabs;
$this->checkPermission('write');
$ilTabs->clearTargets();
$ilTabs->setBackTarget($this->lng->txt('back'),
$this->ctrl->getLinkTarget($this, 'members'));
$list = $this->initAttendanceList();
$form = $list->initForm('printMembersOutput');
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjGroupGUI::printMembersOutputObject ( )

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

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

{
$list = $this->initAttendanceList();
$list->initFromForm();
$list->setCallback(array($this, 'getAttendanceListUserData'));
$part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
$this->members_data = $this->readMemberData($part->getParticipants());
$list->getNonMemberUserData($this->members_data);
echo $list->getFullscreenHTML();
exit();
}

+ Here is the call graph for this function:

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

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

References $failed, $usr_id, 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().

{
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($this->show_tracking)
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
$in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
}
if($privacy->enabledGroupAccessTimes())
{
include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
$progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
}
$do_prtf = (is_array($selected_columns) &&
in_array('prtf', $selected_columns) &&
is_array($ids));
if($do_prtf)
{
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$this->ctrl->getLinkTarget($this, "members"));
}
foreach($ids as $usr_id)
{
$name = ilObjUser::_lookupName($usr_id);
$tmp_data['firstname'] = $name['firstname'];
$tmp_data['lastname'] = $name['lastname'];
$tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
$tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
$tmp_data['usr_id'] = $usr_id;
$tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
if($this->show_tracking)
{
if(in_array($usr_id,$completed))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
}
elseif(in_array($usr_id,$in_progress))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
}
elseif(in_array($usr_id,$failed))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
}
else
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
}
}
if($privacy->enabledGroupAccessTimes())
{
if(isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts'])
{
$tmp_data['access_time'] = ilDatePresentation::formatDate(
$tmp_date = new ilDateTime($progress[$usr_id]['ts'],IL_CAL_UNIX));
$tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
}
else
{
$tmp_data['access_time'] = $this->lng->txt('no_date');
$tmp_data['access_time_unix'] = 0;
}
}
if($do_prtf)
{
$tmp_data['prtf'] = $all_prtf[$usr_id];
}
$members[$usr_id] = $tmp_data;
}
return $members ? $members : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::refuseApplicantsObject ( )

adds applicant to group as member public

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

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

{
$user_ids = $_POST["user_id"];
if (empty($user_ids[0]))
{
$this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
}
include_once 'Services/Mail/classes/class.ilMail.php';
$mail = new ilMail($_SESSION["AccountId"]);
foreach ($user_ids as $new_member)
{
$user =& $this->ilias->obj_factory->getInstanceByObjId($new_member);
$this->object->deleteApplicationListEntry($new_member);
$mail->sendMail($user->getLogin(),"","","Membership application refused: Group ".$this->object->getTitle(),"Your application has been refused.",array(),array('system'));
}
ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"),true);
$this->ctrl->redirect($this,'members');
}

+ Here is the call graph for this function:

ilObjGroupGUI::refuseFromListObject ( )

refuse from waiting list

public

Returns

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

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

{
$this->checkPermission('write');
if(!count($_POST['waiting']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
$waiting_list = new ilGroupWaitingList($this->object->getId());
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
foreach($_POST["waiting"] as $user_id)
{
$waiting_list->removeFromList($user_id);
$this->object->members_obj->sendNotification(
$user_id
);
}
ilUtil::sendSuccess($this->lng->txt('grp_users_removed_from_list'));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::refuseSubscribersObject ( )

refuse subscribers

public

Returns

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

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

{
global $lng;
$this->checkPermission('write');
if(!count($_POST['subscribers']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
foreach($_POST['subscribers'] as $usr_id)
{
$this->object->members_obj->sendNotification(
$usr_id
);
$this->object->members_obj->deleteSubscriber($usr_id);
}
ilUtil::sendSuccess($this->lng->txt("grp_msg_applicants_removed"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::renderObject ( )

Render group.

Reimplemented from ilContainerGUI.

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

References $ret.

Referenced by executeCommand(), and viewObject().

{
global $ilTabs;
$ilTabs->activateTab("view_content");
return $ret;
}

+ Here is the caller graph for this function:

ilObjGroupGUI::saveMapSettingsObject ( )

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

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

{
global $ilCtrl, $ilUser;
$this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
$this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
$this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
$this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
$this->object->update();
$ilCtrl->redirect($this, "editMapSettings");
}

+ Here is the call graph for this function:

ilObjGroupGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

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

{
global $ilUser;
$ilUser->setPref("grpcrs_ntf_".$this->ref_id, (bool)$_REQUEST["grp_ntf"]);
$ilUser->writePrefs();
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "infoScreen");
}

+ Here is the call graph for this function:

ilObjGroupGUI::saveObject ( )

save object

ilTree public

Returns

Reimplemented from ilObjectGUI.

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

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

{
$this->object = new ilObjGroup();
// we reduced the form, only 3 values left
// $this->load();
$grp_type = ilUtil::stripSlashes($_POST['grp_type']);
switch($grp_type)
{
$this->object->setRegistrationType(GRP_REGISTRATION_DIRECT);
break;
default:
$this->object->setRegistrationType(GRP_REGISTRATION_DEACTIVATED);
break;
}
$this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
$this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
$this->object->setGroupType(ilUtil::stripSlashes($_POST['grp_type']));
$this->object->setViewMode(ilContainer::VIEW_INHERIT);
$ilErr->setMessage('');
if(!$this->object->validate())
{
$err = $this->lng->txt('err_check_input');
$err = $ilErr->getMessage();
$this->createObject();
return true;
}
$this->object->create();
$this->putObjectInTree($this->object, $_GET["ref_id"]);
$this->object->initGroupStatus($this->object->getGroupType());
// check for parent group or course => SORT_INHERIT
if(
$GLOBALS['tree']->checkForParentType($this->object->getRefId(),'crs') ||
$GLOBALS['tree']->checkForParentType($this->object->getRefId(),'grp')
)
{
}
// Save sorting
include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
$sort = new ilContainerSortingSettings($this->object->getId());
$sort->setSortMode($sort_mode);
$sort->update();
// Add user as admin and enable notification
include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
$members_obj = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
$members_obj->add($ilUser->getId(),IL_GRP_ADMIN);
$members_obj->updateNotification($ilUser->getId(),1);
ilUtil::sendSuccess($this->lng->txt("grp_added"),true);
$this->ctrl->setParameter($this,'ref_id',$this->object->getRefId());
$this->ctrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjGroupGUI::sendMailToSelectedUsersObject ( )

show send mail

public

Parameters
@return

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

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

{
if(isset($_GET['member_id']))
{
$_POST['participants'] = array($_GET['member_id']);
}
else
{
$_POST['participants'] = array_unique(array_merge((array) $_POST['admins'],
(array) $_POST['members'],
(array) $_POST['roles'],
(array) $_POST['waiting'],
(array) $_POST['subscribers']));
}
if (!count($_POST['participants']))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"));
$this->membersObject();
return false;
}
foreach($_POST['participants'] as $usr_id)
{
$rcps[] = ilObjUser::_lookupLogin($usr_id);
}
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$this,
'members',
array(),
array('type' => 'new', 'rcp_to' => implode(',',$rcps),'sig' => $this->createMailSignature())));
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::setShowHidePrefs ( )

set preferences (show/hide tabel content)

public

Returns

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

References $_GET, and $ilUser.

Referenced by membersObject().

{
global $ilUser;
if(isset($_GET['admin_hide']))
{
$ilUser->writePref('grp_admin_hide',(int) $_GET['admin_hide']);
}
if(isset($_GET['member_hide']))
{
$ilUser->writePref('grp_member_hide',(int) $_GET['member_hide']);
}
if(isset($_GET['subscriber_hide']))
{
$ilUser->writePref('grp_subscriber_hide',(int) $_GET['subscriber_hide']);
}
if(isset($_GET['wait_hide']))
{
$ilUser->writePref('grp_wait_hide',(int) $_GET['wait_hide']);
}
}

+ Here is the caller graph for this function:

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

protected

Parameters
@return

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

References $ilUser, ilPrivacySettings\_getInstance(), ilCourseDefinedFieldDefinition\_hasFields(), ilGoogleMapUtil\isActivated(), and ilObjGroup\MAIL_ALLOWED_ALL.

Referenced by confirmDeleteMembersObject(), editGroupIconsObject(), editInfoObject(), editMapSettingsObject(), editMembersObject(), editObject(), executeCommand(), mailMembersObject(), membersGalleryObject(), membersMapObject(), and membersObject().

{
global $rbacsystem,$ilUser,$ilAccess;
switch($a_tab)
{
case 'members':
// for admins
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("grp_edit_members",
$this->ctrl->getLinkTarget($this,'members'),
"members",
get_class($this));
}
// for all
$this->tabs_gui->addSubTabTarget("grp_members_gallery",
$this->ctrl->getLinkTarget($this,'membersGallery'),
"membersGallery", get_class($this));
// members map
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
$this->object->getEnableGroupMap())
{
$this->tabs_gui->addSubTabTarget("grp_members_map",
$this->ctrl->getLinkTarget($this,'membersMap'),
"membersMap", get_class($this));
}
if(
$ilAccess->checkAccess('write','',$this->object->getRefId()) or
$this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL
)
{
$this->tabs_gui->addSubTabTarget("mail_members",
$this->ctrl->getLinkTarget($this,'mailMembers'),
"mailMembers", get_class($this));
}
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("events",
$this->ctrl->getLinkTargetByClass('ilsessionoverviewgui','listSessions'),
"", 'ilsessionoverviewgui');
}
include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget('grp_export_members',
$this->ctrl->getLinkTargetByClass('ilmemberexportgui','show'),
"", 'ilmemberexportgui');
}
break;
case 'settings':
$this->tabs_gui->addSubTabTarget("grp_settings",
$this->ctrl->getLinkTarget($this,'edit'),
"edit", get_class($this));
$this->tabs_gui->addSubTabTarget("grp_info_settings",
$this->ctrl->getLinkTarget($this,'editInfo'),
"editInfo", get_class($this));
// custom icon
if ($this->ilias->getSetting("custom_icons"))
{
$this->tabs_gui->addSubTabTarget("grp_icon_settings",
$this->ctrl->getLinkTarget($this,'editGroupIcons'),
"editGroupIcons", get_class($this));
}
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
{
$this->tabs_gui->addSubTabTarget("grp_map_settings",
$this->ctrl->getLinkTarget($this,'editMapSettings'),
"editMapSettings", get_class($this));
}
$this->tabs_gui->addSubTabTarget('groupings',
$this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
'listGroupings',
get_class($this));
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
// only show if export permission is granted
if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
{
$this->tabs_gui->addSubTabTarget('grp_custom_user_fields',
$this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
'',
'ilobjectcustomuserfieldsgui');
}
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjGroupGUI::unsubscribeObject ( )

unsubscribe from group

public

Returns

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

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

{
$this->checkPermission('leave');
$this->object->members_obj->delete($ilUser->getId());
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$this->object->members_obj->sendNotification(
$ilUser->getId()
);
$this->object->members_obj->sendNotification(
$ilUser->getId()
);
include_once './Modules/Forum/classes/class.ilForumNotification.php';
ilForumNotification::checkForumsExistsDelete($this->object->getRefId(), $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'),true);
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
$tree->getParentId($this->object->getRefId()));
$ilCtrl->redirectByClass("ilrepositorygui", "");
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateGroupIconsObject ( )

update group icons

public

Returns

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

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

{
$this->checkPermission('write');
$form = $this->initGroupIconsForm();
if($form->checkInput())
{
//save custom icons
if ($this->ilias->getSetting("custom_icons"))
{
if($_POST["cont_big_icon_delete"])
{
$this->object->removeBigIcon();
}
if($_POST["cont_small_icon_delete"])
{
$this->object->removeSmallIcon();
}
if($_POST["cont_tiny_icon_delete"])
{
$this->object->removeTinyIcon();
}
$this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
$_FILES["cont_small_icon"]['tmp_name'], $_FILES["cont_tiny_icon"]['tmp_name']);
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this,"editGroupIcons");
}
$form->setValuesByPost();
$this->editGroupIconsObject($form);
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

public

Parameters
@return

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

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

{
$type = $this->object->getGroupType() ?
$this->object->getGroupType() :
$this->object->readGroupStatus();
if($type == GRP_TYPE_PUBLIC)
{
$this->object->setGroupType(GRP_TYPE_CLOSED);
}
else
{
$this->object->setGroupType(GRP_TYPE_PUBLIC);
}
$this->object->updateGroupType();
$this->object->update();
ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
$this->ctrl->redirect($this,'edit');
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateInfoObject ( )

update info

public

Returns

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

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

{
$this->checkPermission('write');
$this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
$this->object->update();
ilUtil::sendSuccess($this->lng->txt("settings_saved"));
$this->editInfoObject();
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateMembersObject ( )

update members

public

Parameters
@return

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

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

{
$this->checkPermission('write');
if(!count($_POST['participants']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
// Check minimum one admin
$has_admin = false;
$admin_role = $this->object->getDefaultAdminRole();
foreach(ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getAdmins() as $admin_id)
{
if(!isset($_POST['roles'][$admin_id]))
{
$has_admin = true;
break;
}
if(in_array($admin_role,$_POST['roles'][$admin_id]))
{
$has_admin = true;
break;
}
}
if(!$has_admin and ilGroupParticipants::_getInstanceByObjId($this->object->getId())->getCountAdmins())
{
ilUtil::sendFailure($this->lng->txt('grp_min_one_admin'));
$_POST['members'] = $_POST['participants'];
return false;
}
$admin_role = $this->object->getDefaultAdminRole();
$notifications = $_POST['notification'] ? $_POST['notification'] : array();
foreach($_POST['participants'] as $usr_id)
{
// Check if a status changed mail is required
$notification = false;
if($this->object->members_obj->isAdmin($usr_id) and !in_array($admin_role,(array) $_POST['roles'][$usr_id]))
{
$notification = true;
}
if(!$this->object->members_obj->isAdmin($usr_id) and in_array($admin_role,(array) $_POST['roles'][$usr_id]))
{
$notification = true;
}
// TODO: check no role, owner
$this->object->members_obj->updateRoleAssignments($usr_id,(array) $_POST['roles'][$usr_id]);
// Disable notification for all of them
$this->object->members_obj->updateNotification($usr_id,0);
if($this->object->members_obj->isAdmin($usr_id) and in_array($usr_id,$notifications))
{
$this->object->members_obj->updateNotification($usr_id,1);
}
if($notification)
{
include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
$this->object->members_obj->sendNotification(
$usr_id
);
}
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateObject ( )

update GroupObject

Parameters
boolupdate group type public

Reimplemented from ilObjectGUI.

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

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

{
global $ilErr;
$this->checkPermission('write');
$this->initForm();
$this->form->checkInput();
$old_type = $this->object->getGroupType();
$this->load();
$ilErr->setMessage('');
if(!$this->object->validate())
{
$err = $this->lng->txt('err_check_input');
$err = $ilErr->getMessage();
$this->editObject();
return true;
}
$modified = false;
if($this->object->isGroupTypeModified($old_type) and !$update_group_type)
{
$modified = true;
$this->object->setGroupType($old_type);
}
$this->object->update();
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this->object->getId(),
$this->form,
array(
)
);
// Save sorting
include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
$sort = new ilContainerSortingSettings($this->object->getId());
$sort->setSortMode((int) $_POST['sor']);
$sort->update();
// BEGIN ChangeEvents: Record update Object.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
global $ilUser;
ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
// END PATCH ChangeEvents: Record update Object.
// Update ecs export settings
include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
$ecs = new ilECSGroupSettings($this->object);
$ecs->handleSettingsUpdate();
if($modified)
{
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this));
$confirm->addItem(
'grp_type',
$this->object->getGroupType(),
$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'))
);
$confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
$confirm->setCancel($this->lng->txt('cancel'), 'edit');
$this->tpl->setContent($confirm->getHTML());
return true;
}
else
{
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this,'edit');
return true;
}
}

+ Here is the call graph for this function:

ilObjGroupGUI::updateStatusObject ( )

update status

public

Parameters
@return

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

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

{
$this->checkPermission('write');
$notification = $_POST['notification'] ? $_POST['notification'] : array();
foreach($this->object->members_obj->getAdmins() as $admin_id)
{
$this->object->members_obj->updateNotification($admin_id,(int) in_array($admin_id,$notification));
}
ilUtil::sendSuccess($this->lng->txt('settings_saved'));
$this->membersObject();
}

+ Here is the call graph for this function:

ilObjGroupGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

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

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

Referenced by leaveObject().

{
global $tree,$rbacsystem,$ilUser;
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
$this->object->getRefId(),'grp');
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
return true;
}
if(!$this->checkAgreement())
{
include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
$this->tabs_gui->setTabActive('view_content');
$this->ctrl->setReturn($this,'view');
$agreement = new ilMemberAgreementGUI($this->object->getRefId());
$this->ctrl->setCmdClass(get_class($agreement));
$this->ctrl->forwardCommand($agreement);
return true;
}
$this->tabs_gui->setTabActive('view_content');
$this->renderObject();
}

+ 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: