ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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. More...
 
 executeCommand ()
 
 viewObject ()
 
 renderObject ()
 Render group. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container type $tree. More...
 
 afterSave (\ilObject $new_object)
 After object creation. More...
 
 editObject (ilPropertyFormGUI $a_form=null)
 Edit object. More...
 
 updateGroupTypeObject ()
 change group type More...
 
 updateObject ()
 update group settings More...
 
 editGroupIconsObject ($a_form=null)
 edit container icons More...
 
 initGroupIconsForm ()
 
 updateGroupIconsObject ()
 update group icons More...
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 editInfoObject ()
 edit info More...
 
 updateInfoObject ()
 update info More...
 
 readMemberData ($ids, $selected_columns=null)
 
 leaveObject ()
 leave Group public More...
 
 unsubscribeObject ()
 unsubscribe from group More...
 
 addContentTab ()
 Add content tab. More...
 
 getTabs ()
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 saveNotificationObject ()
 :TEMP: Save notification setting (from infoscreen) More...
 
 prepareOutput ($a_show_subobjects=true)
 Handle member view. More...
 
 createMailSignature ()
 Create a course mail signature. More...
 
 addCustomData ($a_data)
 
 getLocalRoles ()
 returns all local roles [role_id] => title More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 getAllNestedCategories ($ref_id)
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container type $lng. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 

Static Public Member Functions

static _goto ($a_target, $a_add="")
 goto target group More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 

Protected Member Functions

 initInfoEditor ()
 init info editor More...
 
 membersObject ()
 Called from goto? More...
 
 initForm ($a_mode='edit')
 init create/edit form More...
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 

Private Member Functions

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

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor public.

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

References $ilSetting.

33  {
34  global $ilSetting;
35 
36  $this->type = "grp";
37  parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
38 
39  $this->lng->loadLanguageModule('grp');
40 
41  $this->setting = $ilSetting;
42  }
global $ilSetting
Definition: privfeed.php:17

Member Function Documentation

◆ _goto()

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

goto target group

Definition at line 1335 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().

Referenced by ilObjGroupReferenceGUI\_goto().

1336  {
1337  global $ilAccess, $ilErr, $lng,$ilUser;
1338 
1339  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1340  if(substr($a_add,0,5) == 'rcode')
1341  {
1342  if($ilUser->getId() == ANONYMOUS_USER_ID)
1343  {
1344  // Redirect to login for anonymous
1346  "login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
1347  $ilUser->getCurrentLanguage()
1348  );
1349  }
1350 
1351  // Redirects to target location after assigning user to course
1353  $a_target,
1355  substr($a_add,5)
1356  );
1357  }
1358 
1359  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target))
1360  {
1361  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1362  }
1363 
1364  if ($ilAccess->checkAccess("read", "", $a_target))
1365  {
1367  }
1368  else
1369  {
1370  // to do: force flat view
1371  if ($ilAccess->checkAccess("visible", "", $a_target))
1372  {
1373  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1374  }
1375  else
1376  {
1377  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1378  {
1379  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1380  ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
1382  }
1383  }
1384  }
1385  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1386  }
global $ilErr
Definition: raiseError.php:16
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContentTab()

ilObjGroupGUI::addContentTab ( )

Add content tab.

Parameters

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

Referenced by getTabs().

1030  {
1031  $this->tabs_gui->addTab("view_content", $this->lng->txt("content"),
1032  $this->ctrl->getLinkTarget($this, "view"));
1033  }
+ Here is the caller graph for this function:

◆ addCustomData()

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

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

References ilCourseUserData\_getValuesByObjId(), array, object, and string.

1902  {
1903  // object defined fields
1904  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1905  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
1906 
1907  $res_data = array();
1908  foreach($a_data as $usr_id => $user_data)
1909  {
1910  $res_data[$usr_id] = $user_data;
1911 
1912  // udf
1913  include_once './Services/User/classes/class.ilUserDefinedData.php';
1914  $udf_data = new ilUserDefinedData($usr_id);
1915  foreach($udf_data->getAll() as $field => $value)
1916  {
1917  list($f,$field_id) = explode('_', $field);
1918  $res_data[$usr_id]['udf_'.$field_id] = (string) $value;
1919  }
1920 
1921  foreach((array) $odfs[$usr_id] as $cdf_field => $cdf_value)
1922  {
1923  $res_data[$usr_id]['cdf_'.$cdf_field] = (string) $cdf_value;
1924  }
1925  }
1926 
1927  return $res_data;
1928  }
Class ilUserDefinedData.
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
Add rich text string
The name of the decorator.
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ afterSave()

ilObjGroupGUI::afterSave ( \ilObject  $new_object)

After object creation.

Parameters
\ilObject$new_object

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

References $GLOBALS, $ilSetting, $ilUser, ilGroupParticipants\_getInstanceByObjId(), ilObject\getId(), ilObject\getRefId(), GRP_REGISTRATION_DIRECT, IL_GRP_ADMIN, ilUtil\sendSuccess(), ilContainerSortingSettings\setSortMode(), ilContainer\SORT_INHERIT, ilContainer\SORT_TITLE, and ilObject\update().

417  {
418  global $ilUser, $ilSetting;
419 
420  $new_object->setRegistrationType(GRP_REGISTRATION_DIRECT);
421  $new_object->update();
422 
423  // check for parent group or course => SORT_INHERIT
424  $sort_mode = ilContainer::SORT_TITLE;
425  if(
426  $GLOBALS['tree']->checkForParentType($new_object->getRefId(),'crs',true) ||
427  $GLOBALS['tree']->checkForParentType($new_object->getRefId(),'grp',true)
428  )
429  {
430  $sort_mode = ilContainer::SORT_INHERIT;
431  }
432 
433  // Save sorting
434  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
435  $sort = new ilContainerSortingSettings($new_object->getId());
436  $sort->setSortMode($sort_mode);
437  $sort->update();
438 
439 
440  // Add user as admin and enable notification
441  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
442  $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
443  $members_obj->add($ilUser->getId(),IL_GRP_ADMIN);
444  $members_obj->updateNotification($ilUser->getId(),$ilSetting->get('mail_grp_admin_notification', true));
445 
446  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
447  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
448  $this->ctrl->redirect($this,'edit');
449  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
const IL_GRP_ADMIN
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$ilUser
Definition: imgupload.php:18
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
global $ilSetting
Definition: privfeed.php:17
const GRP_REGISTRATION_DIRECT
+ Here is the call graph for this function:

◆ checkAgreement()

ilObjGroupGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

private

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

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

Referenced by viewObject().

1775  {
1776  global $ilUser,$ilAccess;
1777 
1778  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1779  {
1780  return true;
1781  }
1782 
1783  // Disable aggrement if is not member of group
1784  if(!$this->object->members_obj->isAssigned($ilUser->getId()))
1785  {
1786  return true;
1787  }
1788 
1789  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1790  if(ilMemberViewSettings::getInstance()->isActive())
1791  {
1792  return true;
1793  }
1794 
1795  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1796  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
1797  $privacy = ilPrivacySettings::_getInstance();
1798 
1799  // Check agreement
1800  if(($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1801  and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
1802  {
1803  return false;
1804  }
1805  // Check required fields
1806  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
1807  if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
1808  {
1809  return false;
1810  }
1811  return true;
1812  }
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
$ilUser
Definition: imgupload.php:18
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _hasFields($a_container_id)
Check if there are any define fields.
Create new PHPExcel object
obj_idprivate
static getInstance()
Get instance.
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjGroupGUI::createMailSignature ( )

Create a course mail signature.

Returns
string

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

References ilLink\_getLink(), and object.

1842  {
1843  $link = chr(13).chr(10).chr(13).chr(10);
1844  $link .= $this->lng->txt('grp_mail_permanent_link');
1845  $link .= chr(13).chr(10).chr(13).chr(10);
1846  include_once 'Services/Link/classes/class.ilLink.php';
1847  $link .= ilLink::_getLink($this->object->getRefId());
1848  return rawurlencode(base64_encode($link));
1849  }
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ editGroupIconsObject()

ilObjGroupGUI::editGroupIconsObject (   $a_form = null)

edit container icons

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

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

Referenced by updateGroupIconsObject().

663  {
664  global $tpl;
665 
666  $this->checkPermission('write');
667 
668  $this->setSubTabs("settings");
669  $this->tabs_gui->setTabActive('settings');
670  $this->tabs_gui->setSubTabActive('grp_icon_settings');
671 
672  if(!$a_form)
673  {
674  $a_form = $this->initGroupIconsForm();
675  }
676 
677  $tpl->setContent($a_form->getHTML());
678  }
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

public

Returns

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

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

Referenced by updateInfoObject().

805  {
806  global $ilErr,$ilAccess;
807 
808  $this->checkPermission('write');
809 
810  $this->setSubTabs('settings');
811  $this->tabs_gui->setTabActive('settings');
812  $this->tabs_gui->setSubTabActive('grp_info_settings');
813 
814  $form = $this->initInfoEditor();
815  $this->tpl->setContent($form->getHTML());
816  }
global $ilErr
Definition: raiseError.php:16
initInfoEditor()
init info editor
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editMapSettingsObject()

ilObjGroupGUI::editMapSettingsObject ( )

Edit Map Settings.

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

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

730  {
731  global $ilUser, $ilCtrl, $ilUser, $ilAccess;
732 
733  $this->setSubTabs("settings");
734  $this->tabs_gui->setTabActive('settings');
735  $this->tabs_gui->setSubTabActive('grp_map_settings');
736 
737  include_once('./Services/Maps/classes/class.ilMapUtil.php');
738  if (!ilMapUtil::isActivated() ||
739  !$ilAccess->checkAccess("write", "", $this->object->getRefId()))
740  {
741  return;
742  }
743 
744  $latitude = $this->object->getLatitude();
745  $longitude = $this->object->getLongitude();
746  $zoom = $this->object->getLocationZoom();
747 
748  // Get Default settings, when nothing is set
749  if ($latitude == 0 && $longitude == 0 && $zoom == 0)
750  {
752  $latitude = $def["latitude"];
753  $longitude = $def["longitude"];
754  $zoom = $def["zoom"];
755  }
756 
757 
758  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
759  $form = new ilPropertyFormGUI();
760  $form->setFormAction($ilCtrl->getFormAction($this));
761 
762  $form->setTitle($this->lng->txt("grp_map_settings"));
763 
764  // enable map
765  $public = new ilCheckboxInputGUI($this->lng->txt("grp_enable_map"),
766  "enable_map");
767  $public->setValue("1");
768  $public->setChecked($this->object->getEnableGroupMap());
769  $form->addItem($public);
770 
771  // map location
772  $loc_prop = new ilLocationInputGUI($this->lng->txt("grp_map_location"),
773  "location");
774  $loc_prop->setLatitude($latitude);
775  $loc_prop->setLongitude($longitude);
776  $loc_prop->setZoom($zoom);
777  $form->addItem($loc_prop);
778 
779  $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
780 
781  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
782  }
setLatitude($a_latitude)
Set Latitude.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setSubTabs($a_tab)
set sub tabs
global $ilCtrl
Definition: ilias.php:18
setValue($a_value)
Set Value.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a location property in a property form.
$ilUser
Definition: imgupload.php:18
static isActivated()
Checks whether Map feature is activated.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ editObject()

ilObjGroupGUI::editObject ( ilPropertyFormGUI  $a_form = null)

Edit object.

public

Parameters
ilPropertyFormGUI
Returns

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

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

459  {
460  $this->checkPermission("write");
461 
462  $this->setSubTabs('settings');
463  $this->tabs_gui->setTabActive('settings');
464  $this->tabs_gui->setSubTabActive('grp_settings');
465 
466  if(!$a_form)
467  {
468  $a_form = $this->initForm('edit');
469  }
470 
471  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
472  }
initForm($a_mode='edit')
init create/edit form
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjGroupGUI::executeCommand ( )

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

References $_GET, $cmd, $html, $ilErr, $ilUser, League\OAuth2\Client\Provider\$provider, $ret, $t, ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilGroupParticipants\_isParticipant(), ilObjectGUI\addHeaderAction(), array, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, object, prepareOutput(), renderObject(), ilMailMemberSearchGUI\setObjParticipants(), setSubTabs(), ilContainerGUI\showPermanentLink(), and ilContainerGUI\showRepTree().

45  {
46  global $ilUser,$rbacsystem,$ilAccess, $ilNavigationHistory,$ilErr, $ilToolbar;
47 
48  $next_class = $this->ctrl->getNextClass($this);
49  $cmd = $this->ctrl->getCmd();
50  $this->prepareOutput();
51  // show repository tree
52  $this->showRepTree();
53 
54  // add entry to navigation history
55  if (!$this->getCreationMode() &&
56  $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
57  {
58  include_once("./Services/Link/classes/class.ilLink.php");
59  $ilNavigationHistory->addItem($_GET["ref_id"],
60  ilLink::_getLink($_GET["ref_id"], "grp"), "grp");
61  }
62 
63  // if news timeline is landing page, redirect if necessary
64  if ($next_class == "" && $cmd == "" && $this->object->isNewsTimelineLandingPageEffective()
65  && $ilAccess->checkAccess("read", "", $_GET["ref_id"]))
66  {
67  $this->ctrl->redirectbyclass("ilnewstimelinegui");
68  }
69 
70  switch($next_class)
71  {
72  case 'ilgroupmembershipgui':
73 
74  $this->tabs_gui->activateTab('members');
75 
76  include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
77  $mem_gui = new ilGroupMembershipGUI($this, $this->object);
78  $this->ctrl->forwardCommand($mem_gui);
79  break;
80 
81 
82  case 'ilgroupregistrationgui':
83  $this->ctrl->setReturn($this,'');
84  $this->tabs_gui->setTabActive('join');
85  include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
86  $registration = new ilGroupRegistrationGUI($this->object);
87  $this->ctrl->forwardCommand($registration);
88  break;
89 
90  case 'ilusersgallerygui':
91  $is_participant = (bool)ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
92  if(!$ilAccess->checkAccess('manage_members', '', $this->ref_id) &&
93  (
94  $this->object->getShowMembers() == $this->object->SHOW_MEMBERS_DISABLED ||
95  !$is_participant
96  ))
97  {
98  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
99  }
100 
101  $this->addMailToMemberButton($ilToolbar, 'jump2UsersGallery');
102 
103  require_once 'Services/User/classes/class.ilUsersGalleryParticipants.php';
104  require_once 'Services/User/classes/class.ilUsersGalleryGUI.php';
105  $this->setSubTabs('members');
106  $this->tabs_gui->setTabActive('members');
107  $this->tabs_gui->setSubTabActive('grp_members_gallery');
108 
109  $provider = new ilUsersGalleryParticipants($this->object->members_obj);
110  $gallery_gui = new ilUsersGalleryGUI($provider);
111  $this->ctrl->forwardCommand($gallery_gui);
112  break;
113 
114  case 'ilpermissiongui':
115  $this->tabs_gui->setTabActive('perm_settings');
116  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
117  $perm_gui = new ilPermissionGUI($this);
118  $ret =& $this->ctrl->forwardCommand($perm_gui);
119  break;
120 
121  case "ilinfoscreengui":
122  $ret =& $this->infoScreen();
123  break;
124 
125  case "illearningprogressgui":
126  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
127 
129  $this->object->getRefId(),
130  $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
131  $this->ctrl->forwardCommand($new_gui);
132  $this->tabs_gui->setTabActive('learning_progress');
133  break;
134 
135  case 'ilobjcoursegroupinggui':
136  $this->setSubTabs('settings');
137 
138  include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
139  $this->ctrl->setReturn($this,'edit');
140  $crs_grp_gui = new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
141  $this->ctrl->forwardCommand($crs_grp_gui);
142 
143  $this->tabs_gui->setTabActive('settings');
144  $this->tabs_gui->setSubTabActive('groupings');
145  break;
146 
147  case 'ilcoursecontentgui':
148 
149  include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
150  $course_content_obj = new ilCourseContentGUI($this);
151  $this->ctrl->forwardCommand($course_content_obj);
152  break;
153 
154  case 'ilpublicuserprofilegui':
155  require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
156  $this->setSubTabs('members');
157  $this->tabs_gui->setTabActive('group_members');
158  $this->tabs_gui->setSubTabActive('grp_members_gallery');
159  $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
160  if ($_GET["back_url"] == "")
161  {
162  $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilGroupMembershipGUI", "ilUsersGalleryGUI"], 'view'));
163  }
164  $html = $this->ctrl->forwardCommand($profile_gui);
165  $this->tpl->setVariable("ADM_CONTENT", $html);
166  break;
167 
168  case "ilcolumngui":
169  $this->tabs_gui->setTabActive('none');
170  $this->checkPermission("read");
171  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
172  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
173  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
174  $this->renderObject();
175  break;
176 
177  // container page editing
178  case "ilcontainerpagegui":
179  $ret = $this->forwardToPageObject();
180  if ($ret != "")
181  {
182  $this->tpl->setContent($ret);
183  }
184  break;
185 
186  case 'ilobjectcopygui':
187  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
188  $cp = new ilObjectCopyGUI($this);
189  $cp->setType('grp');
190  $this->ctrl->forwardCommand($cp);
191  break;
192 
193  case "ilobjstylesheetgui":
194  $this->forwardToStyleSheet();
195  break;
196 
197  case 'ilobjectcustomuserfieldsgui':
198  include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
199  $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
200  $this->setSubTabs('settings');
201  $this->tabs_gui->setTabActive('settings');
202  $this->ctrl->forwardCommand($cdf_gui);
203  break;
204 
205  case 'ilmemberagreementgui':
206  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
207  $this->ctrl->setReturn($this,'');
208  $this->tabs_gui->setTabActive('view_content');
209  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
210  $this->ctrl->forwardCommand($agreement);
211  break;
212 
213  case 'ilexportgui':
214  $this->tabs_gui->setTabActive('export');
215  include_once './Services/Export/classes/class.ilExportGUI.php';
216  $exp = new ilExportGUI($this);
217  $exp->addFormat('xml');
218  $this->ctrl->forwardCommand($exp);
219  break;
220 
221  case "ilcommonactiondispatchergui":
222  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
224  $this->ctrl->forwardCommand($gui);
225  break;
226 
227  case 'ilobjectservicesettingsgui':
228  $this->ctrl->setReturn($this,'edit');
229  $this->setSubTabs("settings");
230  $this->tabs_gui->activateTab('settings');
231  $this->tabs_gui->activateSubTab('tool_settings');
232 
233  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
234  $service = new ilObjectServiceSettingsGUI(
235  $this,
236  $this->object->getId(),
237  array(
239  ));
240  $this->ctrl->forwardCommand($service);
241  break;
242 
243  case 'ilmailmembersearchgui':
244  include_once 'Services/Mail/classes/class.ilMail.php';
245  $mail = new ilMail($ilUser->getId());
246 
247  if(!($ilAccess->checkAccess('manage_members','',$this->object->getRefId()) ||
248  $this->object->getMailToMembersType() == ilObjGroup::MAIL_ALLOWED_ALL) &&
249  $rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId()))
250  {
251  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
252  }
253 
254  $this->tabs_gui->setTabActive('members');
255 
256  include_once './Services/Contact/classes/class.ilMailMemberSearchGUI.php';
257  include_once './Services/Contact/classes/class.ilMailMemberGroupRoles.php';
258 
259  $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberGroupRoles());
261  $this->ctrl->forwardCommand($mail_search);
262  break;
263 
264  case 'ilbadgemanagementgui':
265  $this->tabs_gui->setTabActive('obj_tool_setting_badges');
266  include_once 'Services/Badge/classes/class.ilBadgeManagementGUI.php';
267  $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'grp');
268  $this->ctrl->forwardCommand($bgui);
269  break;
270 
271  case "ilcontainernewssettingsgui":
272  $this->setSubTabs("settings");
273  $this->tabs_gui->setTabActive('settings');
274  include_once("./Services/Container/classes/class.ilContainerNewsSettingsGUI.php");
275  $news_set_gui = new ilContainerNewsSettingsGUI($this);
276  $this->ctrl->forwardCommand($news_set_gui);
277  break;
278 
279  case "ilnewstimelinegui":
280  $this->checkPermission("read");
281  $this->tabs_gui->setTabActive('news_timeline');
282  include_once("./Services/News/classes/class.ilNewsTimelineGUI.php");
283  $t = ilNewsTimelineGUI::getInstance($this->object->getRefId(), $this->object->getNewsTimelineAutoENtries());
284  $t->setUserEditAll($ilAccess->checkAccess('write','',$this->object->getRefId(),'grp'));
285  $this->showPermanentLink($tpl);
286  $this->ctrl->forwardCommand($t);
287  break;
288 
289  default:
290 
291  // check visible permission
292  if (!$this->getCreationMode() and
293  !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'grp') and
294  !$ilAccess->checkAccess('read','',$this->object->getRefId(),'grp') )
295  {
296  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
297  }
298 
299  // #9401 - see also ilStartupGUI::_checkGoto()
300  if($cmd == 'infoScreenGoto')
301  {
302  if($this->object->isRegistrationEnabled())
303  {
304  $cmd = 'join';
305  }
306  else
307  {
308  $cmd = 'infoScreen';
309  }
310  }
311 
312  // check read permission
313  if ((!$this->getCreationMode()
314  && !$rbacsystem->checkAccess('read',$this->object->getRefId()) && $cmd != 'infoScreen')
315  || $cmd == 'join')
316  {
317  // no join permission -> redirect to info screen
318  if (!$rbacsystem->checkAccess('join',$this->object->getRefId()))
319  {
320  $this->ctrl->redirect($this, "infoScreen");
321  }
322  else // no read -> show registration
323  {
324  include_once('./Modules/Group/classes/class.ilGroupRegistrationGUI.php');
325  $this->ctrl->redirectByClass("ilGroupRegistrationGUI", "show");
326  }
327  }
328  if(!$cmd)
329  {
330  $cmd = 'view';
331  }
332  $cmd .= 'Object';
333  $this->$cmd();
334  break;
335  }
336 
337  $this->addHeaderAction();
338  }
prepareOutput($a_show_subobjects=true)
Handle member view.
global $ilErr
Definition: raiseError.php:16
renderObject()
Render group.
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
GUI class for the workflow of copying objects.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
ilUsersGalleryGUI: ilPublicUserProfileGUI ilUsersGalleryGUI: ilCourseMembershipGUI, ilGroupMembershipGUI
Class ilMailMemberSearchGUI.
Class ilMailMemberCourseRoles.
setSubTabs($a_tab)
set sub tabs
infoScreen()
show information screen
Export User Interface Class.
GUI class for public user profile presentation.
showPermanentLink(&$tpl)
show permanent link
This class handles base functions for mail handling.
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
$ilUser
Definition: imgupload.php:18
GUI class for group registrations.
Class ilUsersGalleryParticipants.
Create styles array
The data for the language used.
Class ilObjCourseGroupingGUI.
GUI class for membership features.
static getContentStylePath($a_style_id)
get content style path
Create new PHPExcel object
obj_idprivate
const MAIL_ALLOWED_ALL
Class ilCourseContentGUI.
$ret
Definition: parser.php:6
getCreationMode()
get creation mode
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for service settings (calendar, notes, comments)
addHeaderAction()
Add header action menu.
Class ilObjUserTrackingGUI.
$html
Definition: example_001.php:87
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
+ Here is the call graph for this function:

◆ getLocalRoles()

ilObjGroupGUI::getLocalRoles ( )

returns all local roles [role_id] => title

Returns
array

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

References $title, ilObjRole\_getTranslation(), and array.

1935  {
1936  $local_roles = $this->object->getLocalGroupRoles(false);
1937  $grp_member = $this->object->getDefaultMemberRole();
1938  $grp_roles = array();
1939 
1940  //put the group member role to the top of the crs_roles array
1941  if(in_array($grp_member, $local_roles))
1942  {
1943  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search ($grp_member, $local_roles));
1944  unset($local_roles[$grp_roles[$grp_member]]);
1945  }
1946 
1947  foreach($local_roles as $title => $role_id)
1948  {
1949  $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
1950  }
1951  return $grp_roles;
1952  }
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )

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

References $ilUser, ilObjectGUI\$lng, ilWaitingList\_isOnList(), ilGroupParticipants\_isParticipant(), addContentTab(), array, ilLearningProgressAccess\checkAccess(), ilBadgeHandler\getInstance(), and object.

1038  {
1039  global $rbacsystem, $ilUser, $ilAccess, $lng, $ilHelp;
1040 
1041  $ilHelp->setScreenIdComponent("grp");
1042 
1043  if ($rbacsystem->checkAccess('read',$this->ref_id))
1044  {
1045  if ($this->object->isNewsTimelineEffective())
1046  {
1047  if (!$this->object->isNewsTimelineLandingPageEffective())
1048  {
1049  $this->addContentTab();
1050  }
1051  $this->tabs_gui->addTab("news_timeline", $lng->txt("cont_news_timeline_tab"),
1052  $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show"));
1053  if ($this->object->isNewsTimelineLandingPageEffective())
1054  {
1055  $this->addContentTab();
1056  }
1057  }
1058  else
1059  {
1060  $this->addContentTab();
1061  }
1062  }
1063  if ($rbacsystem->checkAccess('visible',$this->ref_id))
1064  {
1065  $this->tabs_gui->addTarget("info_short",
1066  $this->ctrl->getLinkTargetByClass(
1067  array("ilobjgroupgui", "ilinfoscreengui"), "showSummary"),
1068  "infoScreen",
1069  "", "",false);
1070  }
1071 
1072 
1073  if ($ilAccess->checkAccess('write','',$this->object->getRefId()))
1074  {
1075  $this->tabs_gui->addTarget("settings",
1076  $this->ctrl->getLinkTarget($this, "edit"), array("edit", "editMapSettings"), get_class($this),
1077  "");
1078  }
1079 
1080  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
1081  $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
1082 
1083  // Members
1084  include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
1085  $membership_gui = new ilGroupMembershipGUI($this, $this->object);
1086  $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1087 
1088 
1089  // badges
1090  if($ilAccess->checkAccess('write','',$this->ref_id))
1091  {
1092  include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
1093  if(ilBadgeHandler::getInstance()->isObjectActive($this->object->getId()))
1094  {
1095  $this->tabs_gui->addTarget("obj_tool_setting_badges",
1096  $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1097  "",
1098  "ilbadgemanagementgui");
1099  }
1100  }
1101 
1102  // learning progress
1103  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1104  if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
1105  {
1106  $this->tabs_gui->addTarget('learning_progress',
1107  $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'),''),
1108  '',
1109  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
1110  }
1111 
1112 
1113  if($ilAccess->checkAccess('write','',$this->object->getRefId()))
1114  {
1115  $this->tabs_gui->addTarget(
1116  'export',
1117  $this->ctrl->getLinkTargetByClass('ilexportgui',''),
1118  'export',
1119  'ilexportgui'
1120  );
1121  }
1122 
1123  // parent tabs (all container: edit_permission, clipboard, trash
1124  parent::getTabs();
1125 
1126  if($ilAccess->checkAccess('join','',$this->object->getRefId()) and
1127  !$this->object->members_obj->isAssigned($ilUser->getId()))
1128  {
1129  include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
1130  if(ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
1131  {
1132  $this->tabs_gui->addTab(
1133  'leave',
1134  $this->lng->txt('membership_leave'),
1135  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui','show','')
1136  );
1137 
1138  }
1139  else
1140  {
1141 
1142  $this->tabs_gui->addTarget("join",
1143  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1144  'show',
1145  "");
1146  }
1147  }
1148  if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
1149  $this->object->members_obj->isMember($ilUser->getId()))
1150  {
1151  $this->tabs_gui->addTarget("grp_btn_unsubscribe",
1152  $this->ctrl->getLinkTarget($this, "leave"),
1153  '',
1154  "");
1155  }
1156  }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
addContentTab()
Add content tab.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
$ilUser
Definition: imgupload.php:18
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
Create styles array
The data for the language used.
GUI class for membership features.
Create new PHPExcel object
obj_idprivate
static getInstance()
Constructor.
+ Here is the call graph for this function:

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreenObject().

1174  {
1175  global $rbacsystem, $ilUser, $ilSetting;
1176 
1177  $this->tabs_gui->setTabActive('info_short');
1178 
1179  if(!$rbacsystem->checkAccess("visible", $this->ref_id))
1180  {
1181  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
1182  }
1183 
1184  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1185  $info = new ilInfoScreenGUI($this);
1186 
1187  if(strlen($this->object->getInformation()))
1188  {
1189  $info->addSection($this->lng->txt('grp_general_informations'));
1190  $info->addProperty($this->lng->txt('grp_information'), nl2br(
1191  ilUtil::makeClickable ($this->object->getInformation(), true)));
1192  }
1193 
1194  $info->enablePrivateNotes();
1195  $info->enableLearningProgress(true);
1196 
1197  $info->addSection($this->lng->txt('group_registration'));
1198  $info->showLDAPRoleGroupMappingInfo();
1199 
1200  if(!$this->object->isRegistrationEnabled())
1201  {
1202  $info->addProperty($this->lng->txt('group_registration_mode'),
1203  $this->lng->txt('grp_reg_deac_info_screen'));
1204 
1205  }
1206  else
1207  {
1208  switch($this->object->getRegistrationType())
1209  {
1211  $info->addProperty($this->lng->txt('group_registration_mode'),
1212  $this->lng->txt('grp_reg_direct_info_screen'));
1213  break;
1214 
1216  $info->addProperty($this->lng->txt('group_registration_mode'),
1217  $this->lng->txt('grp_reg_req_info_screen'));
1218  break;
1219 
1221  $info->addProperty($this->lng->txt('group_registration_mode'),
1222  $this->lng->txt('grp_reg_passwd_info_screen'));
1223  break;
1224 
1225  }
1226  /*
1227  $info->addProperty($this->lng->txt('group_registration_time'),
1228  ilDatePresentation::formatPeriod(
1229  $this->object->getRegistrationStart(),
1230  $this->object->getRegistrationEnd()));
1231  */
1232  if($this->object->isRegistrationUnlimited())
1233  {
1234  $info->addProperty($this->lng->txt('group_registration_time'),
1235  $this->lng->txt('grp_registration_unlimited'));
1236  }
1237  elseif($this->object->getRegistrationStart()->getUnixTime() < time())
1238  {
1239  $info->addProperty($this->lng->txt("group_registration_time"),
1240  $this->lng->txt('cal_until').' '.
1241  ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
1242  }
1243  elseif($this->object->getRegistrationStart()->getUnixTime() >= time())
1244  {
1245  $info->addProperty($this->lng->txt("group_registration_time"),
1246  $this->lng->txt('cal_from').' '.
1247  ilDatePresentation::formatDate($this->object->getRegistrationStart()));
1248  }
1249  if ($this->object->isMembershipLimited())
1250  {
1251  if($this->object->getMinMembers())
1252  {
1253  $info->addProperty($this->lng->txt("mem_min_users"),
1254  $this->object->getMinMembers());
1255  }
1256  if($this->object->getMaxMembers())
1257  {
1258  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1259  $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1260 
1261  $info->addProperty(
1262  $this->lng->txt('mem_free_places'),
1263  $reg_info['reg_info_free_places']
1264  );
1265  }
1266  }
1267 
1268  if($this->object->getCancellationEnd())
1269  {
1270  $info->addProperty($this->lng->txt('grp_cancellation_end'),
1271  ilDatePresentation::formatDate( $this->object->getCancellationEnd()));
1272  }
1273  }
1274 
1275  // Confirmation
1276  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1277  $privacy = ilPrivacySettings::_getInstance();
1278 
1279  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1280  if($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport())
1281  {
1282  include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
1283 
1284  $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1285 
1286  $this->lng->loadLanguageModule('ps');
1287  $info->addSection($this->lng->txt('grp_user_agreement_info'));
1288  $info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
1289 
1290  if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
1291  {
1292  $info->addProperty($this->lng->txt('ps_grp_user_fields'),$fields);
1293  }
1294  }
1295 
1296 
1297  // forward the command
1298  $this->ctrl->forwardCommand($info);
1299  }
Class ilInfoScreenGUI.
static _fieldsToInfoString($a_obj_id)
Fields to info string.
const GRP_REGISTRATION_PASSWORD
const GRP_REGISTRATION_REQUEST
$info
Definition: example_052.php:80
static lookupRegistrationInfo($a_obj_id)
Lookup registration info ilDB $ilDB ilObjUser $ilUser ilLanguage $lng.
static _getInstanceByType($a_type)
Get Singleton Instance.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static formatDate(ilDateTime $date)
Format a date public.
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
Create new PHPExcel object
obj_idprivate
global $ilSetting
Definition: privfeed.php:17
static _getInstance()
Get instance of ilPrivacySettings.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
const GRP_REGISTRATION_DIRECT
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjGroupGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

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

References infoScreen().

1164  {
1165  $this->ctrl->setCmd("showSummary");
1166  $this->ctrl->setCmdClass("ilinfoscreengui");
1167  $this->infoScreen();
1168  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initForm()

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

init create/edit form

protected

Parameters
stringedit or create
Returns

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

References $ilUser, $pass, $title, ilObjectGUI\$tpl, ilObjectGUI\$tree, ilLink\_getLink(), ilRadioOption\addSubItem(), array, ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjGroup\MAIL_ALLOWED_ALL, ilObjGroup\MAIL_ALLOWED_TUTORS, object, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilDateDurationInputGUI\setShowTime(), ilTextInputGUI\setSize(), ilRadioOption\setTitle(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilTextAreaInputGUI\setValue(), ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjectServiceSettingsGUI\TAG_CLOUD, ilObject\TITLE_LENGTH, ilObjGroup\translateViewMode(), ilObjectServiceSettingsGUI\USE_NEWS, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by editObject(), and updateObject().

1397  {
1398  global $ilUser,$tpl,$tree;
1399 
1400  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1401 
1402  $form = new ilPropertyFormGUI();
1403  switch($a_mode)
1404  {
1405  case 'edit':
1406  $form->setFormAction($this->ctrl->getFormAction($this,'update'));
1407  break;
1408 
1409  default:
1410  $form->setTableWidth('600px');
1411  $form->setFormAction($this->ctrl->getFormAction($this,'save'));
1412  break;
1413  }
1414 
1415  // title
1416  $title = new ilTextInputGUI($this->lng->txt('title'),'title');
1417  $title->setSubmitFormOnEnter(true);
1418  $title->setValue($this->object->getTitle());
1419  $title->setSize(min(40, ilObject::TITLE_LENGTH));
1420  $title->setMaxLength(ilObject::TITLE_LENGTH);
1421  $title->setRequired(true);
1422  $form->addItem($title);
1423 
1424  // desc
1425  $desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
1426  $desc->setValue($this->object->getLongDescription());
1427  $desc->setRows(2);
1428  $desc->setCols(40);
1429  $form->addItem($desc);
1430 
1431  $form = $this->initDidacticTemplate($form);
1432 
1433  if($a_mode == 'edit')
1434  {
1435  // Group registration ############################################################
1436  $pres = new ilFormSectionHeaderGUI();
1437  $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1438  $form->addItem($pres);
1439 
1440  // Registration type
1441  $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'),'registration_type');
1442  $reg_type->setValue($this->object->getRegistrationType());
1443 
1444  $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'),GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
1445  $reg_type->addOption($opt_dir);
1446 
1447  $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'),GRP_REGISTRATION_PASSWORD);
1448  $pass = new ilTextInputGUI($this->lng->txt("password"),'password');
1449  $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1450  $pass->setValue($this->object->getPassword());
1451  $pass->setSize(10);
1452  $pass->setMaxLength(32);
1453  $opt_pass->addSubItem($pass);
1454  $reg_type->addOption($opt_pass);
1455 
1456  $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'),GRP_REGISTRATION_REQUEST,$this->lng->txt('grp_reg_request_info'));
1457  $reg_type->addOption($opt_req);
1458 
1459  $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'),GRP_REGISTRATION_DEACTIVATED,$this->lng->txt('grp_reg_disabled_info'));
1460  $reg_type->addOption($opt_deact);
1461 
1462  // Registration codes
1463  $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'),'reg_code_enabled');
1464  $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1465  $reg_code->setValue(1);
1466  $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1467  $form->addItem($reg_type);
1468 
1469  // Registration codes
1470  if(!$this->object->getRegistrationAccessCode())
1471  {
1472  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1473  $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1474  }
1475  $reg_link = new ilHiddenInputGUI('reg_code');
1476  $reg_link->setValue($this->object->getRegistrationAccessCode());
1477  $form->addItem($reg_link);
1478 
1479  $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1480  include_once './Services/Link/classes/class.ilLink.php';
1481  $val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
1482  $link->setHTML('<font class="small">'.$val.'</font>');
1483  $reg_code->addSubItem($link);
1484  $form->addItem($reg_code);
1485 
1486  // time limit
1487  $this->lng->loadLanguageModule('dateplaner');
1488  include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
1489  $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'),'reg');
1490  $dur->setShowTime(true);
1491  $dur->setStart($this->object->getRegistrationStart());
1492  $dur->setEnd($this->object->getRegistrationEnd());
1493  $form->addItem($dur);
1494 
1495  // cancellation limit
1496  $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1497  $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1498  $cancel->setDate($this->object->getCancellationEnd());
1499  $form->addItem($cancel);
1500 
1501  // max member
1502  $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'),'registration_membership_limited');
1503  $lim->setValue(1);
1504 // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1505  $lim->setChecked($this->object->isMembershipLimited());
1506 
1507  $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'),'registration_min_members');
1508  $min->setSize(3);
1509  $min->setMaxLength(4);
1510  $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
1511  $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1512  $lim->addSubItem($min);
1513 
1514  $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'),'registration_max_members');
1515  $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
1516  //$max->setTitle($this->lng->txt('members'));
1517  $max->setSize(3);
1518  $max->setMaxLength(4);
1519  $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1520  $lim->addSubItem($max);
1521 
1522  /*
1523  $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1524  $wait->setValue(1);
1525  //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1526  $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1527  $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1528  $lim->addSubItem($wait);
1529  $form->addItem($lim);
1530  */
1531 
1532  $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1533 
1534  $option = new ilRadioOption($this->lng->txt('none'), 0);
1535  $wait->addOption($option);
1536 
1537  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
1538  $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1539  $wait->addOption($option);
1540 
1541  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
1542  $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1543  $wait->addOption($option);
1544 
1545  if($this->object->hasWaitingListAutoFill())
1546  {
1547  $wait->setValue(2);
1548  }
1549  else if($this->object->isWaitingListEnabled())
1550  {
1551  $wait->setValue(1);
1552  }
1553 
1554  $lim->addSubItem($wait);
1555 
1556  $form->addItem($lim);
1557 
1558 
1559  // Group presentation
1560  $hasParentMembership =
1561  (
1562  $tree->checkForParentType($this->object->getRefId(),'crs',true) ||
1563  $tree->checkForParentType($this->object->getRefId(),'grp',true)
1564  );
1565 
1566  $pres = new ilFormSectionHeaderGUI();
1567  $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1568  $form->addItem($pres);
1569 
1570  // presentation type
1571  $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'),'view_mode');
1572  if($hasParentMembership)
1573  {
1574  switch($this->object->getViewMode())
1575  {
1577  $course_view_mode = ': '.$this->lng->txt('cntr_view_sessions');
1578  break;
1579 
1581  $course_view_mode = ': '.$this->lng->txt('cntr_view_simple');
1582  break;
1583 
1585  $course_view_mode = ': '.$this->lng->txt('cntr_view_by_type');
1586  break;
1587  }
1588 
1589  $opt = new ilRadioOption($this->lng->txt('grp_view_inherit').$course_view_mode,ilContainer::VIEW_INHERIT);
1590  $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1591  $view_type->addOption($opt);
1592  }
1593 
1594  if($hasParentMembership &&
1595  $this->object->getViewMode() == ilContainer::VIEW_INHERIT)
1596  {
1597  $view_type->setValue(ilContainer::VIEW_INHERIT);
1598  }
1599  else
1600  {
1601  $view_type->setValue(
1603  $this->object->getId(),
1604  $this->object->getViewMode(),
1605  $this->object->getRefId()
1606  )
1607  );
1608  }
1609 
1610  $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'),ilContainer::VIEW_SIMPLE);
1611  $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1612  $view_type->addOption($opt);
1613 
1614  $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
1615  $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1616  $view_type->addOption($opt);
1617  $form->addItem($view_type);
1618 
1619 
1620  // Sorting
1621  $sorting_settings = array();
1622  if($hasParentMembership)
1623  {
1624  $sorting_settings[] = ilContainer::SORT_INHERIT;
1625  }
1626  $sorting_settings[] = ilContainer::SORT_TITLE;
1627  $sorting_settings[] = ilContainer::SORT_CREATION;
1628  $sorting_settings[] = ilContainer::SORT_MANUAL;
1629  $this->initSortingForm($form, $sorting_settings);
1630 
1631  // additional features
1632  $feat = new ilFormSectionHeaderGUI();
1633  $feat->setTitle($this->lng->txt('obj_features'));
1634  $form->addItem($feat);
1635 
1636  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1638  $this->object->getId(),
1639  $form,
1640  array(
1646  )
1647  );
1648 
1649  // Notification Settings
1650  /*$notification = new ilFormSectionHeaderGUI();
1651  $notification->setTitle($this->lng->txt('grp_notification'));
1652  $form->addItem($notification);*/
1653 
1654  $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'),'show_members');
1655  $mem->setChecked($this->object->getShowMembers());
1656  $mem->setInfo($this->lng->txt('grp_show_members_info'));
1657  $form->addItem($mem);
1658 
1659  // Show members type
1660  $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1661  $mail_type->setValue($this->object->getMailToMembersType());
1662 
1663  $mail_tutors = new ilRadioOption($this->lng->txt('grp_mail_tutors_only'), ilObjGroup::MAIL_ALLOWED_TUTORS,
1664  $this->lng->txt('grp_mail_tutors_only_info'));
1665  $mail_type->addOption($mail_tutors);
1666 
1667  $mail_all = new ilRadioOption($this->lng->txt('grp_mail_all'), ilObjGroup::MAIL_ALLOWED_ALL,
1668  $this->lng->txt('grp_mail_all_info'));
1669  $mail_type->addOption($mail_all);
1670  $form->addItem($mail_type);
1671  }
1672 
1673  switch($a_mode)
1674  {
1675  case 'create':
1676  $form->setTitle($this->lng->txt('grp_new'));
1677  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1678 
1679  $form->addCommandButton('save',$this->lng->txt('grp_new'));
1680  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
1681  break;
1682 
1683  case 'edit':
1684  $form->setTitle($this->lng->txt('grp_edit'));
1685  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1686 
1687  // Edit ecs export settings
1688  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
1689  $ecs = new ilECSGroupSettings($this->object);
1690  $ecs->addSettingsToForm($form, 'grp');
1691 
1692  $form->addCommandButton('update',$this->lng->txt('save'));
1693  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
1694  break;
1695  }
1696  return $form;
1697  }
This class represents an option in a radio group.
setTitle($a_title)
Set Title.
const GRP_REGISTRATION_DEACTIVATED
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
This class represents a section header in a property form.
setValue($a_value)
Set Value.
This class represents a checkbox property in a property form.
const GRP_REGISTRATION_PASSWORD
setInfo($a_info)
Set Info.
const GRP_REGISTRATION_REQUEST
This class represents a date/time property in a property form.
setInfo($a_info)
Set Information Text.
setChecked($a_checked)
Set Checked.
This class represents a hidden form property in a property form.
input GUI for a time span (start and end date)
This class represents a property in a property form.
setValue($a_value)
Set Value.
addSubItem($a_item)
Add Subitem.
const MAIL_ALLOWED_TUTORS
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Class ilECSGroupSettings.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setValue($a_value)
Set Value.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
$ilUser
Definition: imgupload.php:18
setShowTime($a_showtime)
Set Show Time Information.
Create styles array
The data for the language used.
This class represents a custom property in a property form.
static generateCode()
Generate new registration key.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
static translateViewMode($a_obj_id, $a_view_mode, $a_ref_id=null)
translate view mode
Create new PHPExcel object
obj_idprivate
const MAIL_ALLOWED_ALL
This class represents a text area property in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
setValue($a_value)
Set Value.
const GRP_REGISTRATION_DIRECT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGroupIconsForm()

ilObjGroupGUI::initGroupIconsForm ( )

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

References ilContainerGUI\showCustomIconsEditing().

Referenced by editGroupIconsObject(), and updateGroupIconsObject().

681  {
682  include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
683  $form = new ilPropertyFormGUI();
684  $form->setFormAction($this->ctrl->getFormAction($this));
685 
686  $this->showCustomIconsEditing(1, $form);
687 
688  // $form->setTitle($this->lng->txt('edit_grouping'));
689  $form->addCommandButton('updateGroupIcons', $this->lng->txt('save'));
690 
691  return $form;
692  }
This class represents a property form user interface.
showCustomIconsEditing($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
show edit section of custom icons for container
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

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

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

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

1852  {
1853  global $ilSetting, $ilUser;
1854 
1855  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
1856 
1857  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1858  if(ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
1859  {
1860  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1862  {
1863  $noti = new ilMembershipNotifications($this->ref_id);
1864  if(!$noti->isCurrentUserActive())
1865  {
1866  $lg->addHeaderIcon("not_icon",
1867  ilUtil::getImagePath("notification_off.svg"),
1868  $this->lng->txt("grp_notification_deactivated"));
1869 
1870  $this->ctrl->setParameter($this, "grp_ntf", 1);
1871  $caption = "grp_activate_notification";
1872  }
1873  else
1874  {
1875  $lg->addHeaderIcon("not_icon",
1876  ilUtil::getImagePath("notification_on.svg"),
1877  $this->lng->txt("grp_notification_activated"));
1878 
1879  $this->ctrl->setParameter($this, "grp_ntf", 0);
1880  $caption = "grp_deactivate_notification";
1881  }
1882 
1883  if($noti->canCurrentUserEdit())
1884  {
1885  $lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
1886  $caption);
1887  }
1888 
1889  $this->ctrl->setParameter($this, "grp_ntf", "");
1890  }
1891  }
1892 
1893  return $lg;
1894  }
$lg
Definition: example_018.php:62
static isActive()
Is feature active?
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
Membership notification settings.
+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

protected

Returns

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

References object, and ilFormPropertyGUI\setInfo().

Referenced by editInfoObject().

825  {
826  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
827  $form = new ilPropertyFormGUI();
828  $form->setFormAction($this->ctrl->getFormAction($this,'updateInfo'));
829  $form->setTitle($this->lng->txt('grp_general_informations'));
830  $form->addCommandButton('updateInfo',$this->lng->txt('save'));
831  $form->addCommandButton('cancel',$this->lng->txt('cancel'));
832 
833  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'),'important');
834  $area->setInfo($this->lng->txt('grp_information_info'));
835  $area->setValue($this->object->getInformation());
836  $area->setRows(8);
837  $area->setCols(80);
838  $form->addItem($area);
839 
840  return $form;
841  }
This class represents a property form user interface.
setInfo($a_info)
Set Information Text.
Create new PHPExcel object
obj_idprivate
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjGroupGUI::jump2UsersGalleryObject ( )
protected

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

1958  {
1959  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
1960  }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group public

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

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

969  {
970  global $ilUser;
971 
972  $this->checkPermission('leave');
973 
974  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
975  if($part->isLastAdmin($ilUser->getId()))
976  {
977  ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
978  $this->viewObject();
979  return false;
980  }
981 
982  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
983 
984  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
985  $cgui = new ilConfirmationGUI();
986  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
987  $cgui->setFormAction($this->ctrl->getFormAction($this));
988  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
989  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
990  $this->tpl->setContent($cgui->getHTML());
991  }
$ilUser
Definition: imgupload.php:18
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Create new PHPExcel object
obj_idprivate
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Confirmation screen class.
+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )
protected

Called from goto?

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

References $GLOBALS.

1327  {
1328  $GLOBALS['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1329  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

◆ modifyItemGUI()

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

Modify Item ListGUI for presentation in container type $tree.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path

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

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

390  {
391  global $tree;
392 
393  // if folder is in a course, modify item list gui according to course requirements
394  if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(),'crs'))
395  {
396  include_once("./Modules/Course/classes/class.ilObjCourse.php");
397  include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
398  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
400  $a_item_list_gui,
401  'ilcoursecontentgui',
402  $a_item_data,
403  $a_show_path,
404  ilObjCourse::_lookupAboStatus($course_obj_id),
405  $course_ref_id,
406  $course_obj_id,
407  $this->object->getRefId()
408  );
409  }
410  }
static _modifyItemGUI($a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
static _lookupObjId($a_id)
static _lookupAboStatus($a_id)
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput (   $a_show_subobjects = true)

Handle member view.

Returns

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

References ilObjectGUI\getCreationMode().

Referenced by executeCommand().

1820  {
1821  global $rbacsystem;
1822  if(!$this->getCreationMode())
1823  {
1824  /*
1825  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1826  $settings = ilMemberViewSettings::getInstance();
1827  if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
1828  {
1829  $settings->setContainer($this->object->getRefId());
1830  $rbacsystem->initMemberView();
1831  }
1832  */
1833  }
1834  parent::prepareOutput($a_show_subobjects);
1835  }
getCreationMode()
get creation mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readMemberData()

ilObjGroupGUI::readMemberData (   $ids,
  $selected_columns = null 
)

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

References $failed, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilPrivacySettings\_getInstance(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilLearningProgress\_lookupProgressByObjId(), ilObjUser\_readUsersProfileData(), array, ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjectLP\getInstance(), IL_CAL_UNIX, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and object.

863  {
864  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
865  $privacy = ilPrivacySettings::_getInstance();
866 
867  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
868  $this->show_tracking =
870  ilObjUserTracking::_enabledUserRelatedData()
871  );
872  if($this->show_tracking)
873  {
874  include_once('./Services/Object/classes/class.ilObjectLP.php');
875  $olp = ilObjectLP::getInstance($this->object->getId());
876  $this->show_tracking = $olp->isActive();
877  }
878 
879  if($this->show_tracking)
880  {
881  include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
882  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
883  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
885  }
886 
887  if($privacy->enabledGroupAccessTimes())
888  {
889  include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
890  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
891  }
892 
893  $do_prtf = (is_array($selected_columns) &&
894  in_array('prtf', $selected_columns) &&
895  is_array($ids));
896  if($do_prtf)
897  {
898  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
900  $this->ctrl->getLinkTarget($this, "members"));
901  }
902 
903  $profile_data = ilObjUser::_readUsersProfileData($ids);
904  foreach($ids as $usr_id)
905  {
906  $name = ilObjUser::_lookupName($usr_id);
907  $tmp_data['firstname'] = $name['firstname'];
908  $tmp_data['lastname'] = $name['lastname'];
909  $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
910  $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
911  $tmp_data['usr_id'] = $usr_id;
912  $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
913 
914  foreach((array) $profile_data[$usr_id] as $field => $value)
915  {
916  $tmp_data[$field] = $value;
917  }
918 
919  if($this->show_tracking)
920  {
921  if(in_array($usr_id,$completed))
922  {
923  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
924  }
925  elseif(in_array($usr_id,$in_progress))
926  {
927  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
928  }
929  elseif(in_array($usr_id,$failed))
930  {
931  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
932  }
933  else
934  {
935  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
936  }
937  }
938 
939  if($privacy->enabledGroupAccessTimes())
940  {
941  if(isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts'])
942  {
943  $tmp_data['access_time'] = ilDatePresentation::formatDate(
944  $tmp_date = new ilDateTime($progress[$usr_id]['ts'],IL_CAL_UNIX));
945  $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
946  }
947  else
948  {
949  $tmp_data['access_time'] = $this->lng->txt('no_date');
950  $tmp_data['access_time_unix'] = 0;
951  }
952  }
953 
954  if($do_prtf)
955  {
956  $tmp_data['prtf'] = $all_prtf[$usr_id];
957  }
958 
959  $members[$usr_id] = $tmp_data;
960  }
961  return $members ? $members : array();
962  }
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
const LP_STATUS_NOT_ATTEMPTED
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
const IL_CAL_UNIX
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
const LP_STATUS_IN_PROGRESS
static _enabledLearningProgress()
check wether learing progress is enabled or not
const LP_STATUS_FAILED
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
$failed
Definition: Utf8Test.php:85
Create styles array
The data for the language used.
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
Create new PHPExcel object
obj_idprivate
static _getInstance()
Get instance of ilPrivacySettings.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
const LP_STATUS_COMPLETED
static getInstance($a_obj_id)
PHPExcel root directory.
Definition: Database.php:30
+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

Render group.

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

References $ret.

Referenced by executeCommand(), and viewObject().

373  {
374  global $ilTabs;
375 
376  $ilTabs->activateTab("view_content");
377  $ret = parent::renderObject();
378  return $ret;
379 
380  }
$ret
Definition: parser.php:6
+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

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

785  {
786  global $ilCtrl, $ilUser;
787 
788  $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
789  $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
790  $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
791  $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
792  $this->object->update();
793 
794  $ilCtrl->redirect($this, "editMapSettings");
795  }
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

References ilUtil\sendSuccess().

1305  {
1306  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1307  $noti = new ilMembershipNotifications($this->ref_id);
1308  if($noti->canCurrentUserEdit())
1309  {
1310  if((bool)$_REQUEST["grp_ntf"])
1311  {
1312  $noti->activateUser();
1313  }
1314  else
1315  {
1316  $noti->deactivateUser();
1317  }
1318  }
1319  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1320  $this->ctrl->redirect($this, "infoScreen");
1321  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Membership notification settings.
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

Set return point for side column actions.

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

1966  {
1967  $this->ctrl->setReturn($this, "view");
1968  }

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

protected

Parameters

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

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

Referenced by editGroupIconsObject(), editInfoObject(), editMapSettingsObject(), editObject(), and executeCommand().

1707  {
1708  global $rbacsystem,$ilUser,$ilAccess;
1709 
1710  switch($a_tab)
1711  {
1712 
1713  case 'settings':
1714  $this->tabs_gui->addSubTabTarget("grp_settings",
1715  $this->ctrl->getLinkTarget($this,'edit'),
1716  "edit", get_class($this));
1717 
1718  $this->tabs_gui->addSubTabTarget("grp_info_settings",
1719  $this->ctrl->getLinkTarget($this,'editInfo'),
1720  "editInfo", get_class($this));
1721 
1722  // custom icon
1723  if ($this->ilias->getSetting("custom_icons"))
1724  {
1725  $this->tabs_gui->addSubTabTarget("grp_icon_settings",
1726  $this->ctrl->getLinkTarget($this,'editGroupIcons'),
1727  "editGroupIcons", get_class($this));
1728  }
1729 
1730  include_once("./Services/Maps/classes/class.ilMapUtil.php");
1731  if (ilMapUtil::isActivated())
1732  {
1733  $this->tabs_gui->addSubTabTarget("grp_map_settings",
1734  $this->ctrl->getLinkTarget($this,'editMapSettings'),
1735  "editMapSettings", get_class($this));
1736  }
1737 
1738  $this->tabs_gui->addSubTabTarget('groupings',
1739  $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
1740  'listGroupings',
1741  get_class($this));
1742 
1743  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1744  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1745  // only show if export permission is granted
1746  if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
1747  {
1748  $this->tabs_gui->addSubTabTarget('grp_custom_user_fields',
1749  $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1750  '',
1751  'ilobjectcustomuserfieldsgui');
1752  }
1753 
1754  // news settings
1755  if ($this->object->getUseNews())
1756  {
1757  $this->tabs_gui->addSubTab('obj_news_settings',
1758  $this->lng->txt("cont_news_settings"),
1759  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui'));
1760  }
1761 
1762  break;
1763 
1764 
1765  }
1766  }
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
static _hasFields($a_container_id)
Check if there are any define fields.
static isActivated()
Checks whether Map feature is activated.
Create new PHPExcel object
obj_idprivate
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ unsubscribeObject()

ilObjGroupGUI::unsubscribeObject ( )

unsubscribe from group

public

Returns

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

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

1000  {
1001  global $ilUser,$tree, $ilCtrl;
1002 
1003  $this->checkPermission('leave');
1004 
1005  $this->object->members_obj->delete($ilUser->getId());
1006 
1007  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1008  $this->object->members_obj->sendNotification(
1010  $ilUser->getId()
1011  );
1012  $this->object->members_obj->sendNotification(
1014  $ilUser->getId()
1015  );
1016 
1017  ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'),true);
1018  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
1019  $tree->getParentId($this->object->getRefId()));
1020  $ilCtrl->redirectByClass("ilrepositorygui", "");
1021  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ updateGroupIconsObject()

ilObjGroupGUI::updateGroupIconsObject ( )

update group icons

public

Returns

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

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

701  {
702  global $ilSetting;
703 
704  $this->checkPermission('write');
705 
706  $form = $this->initGroupIconsForm();
707  if($form->checkInput())
708  {
709  //save custom icons
710  if ($ilSetting->get("custom_icons"))
711  {
712  if($_POST["cont_icon_delete"])
713  {
714  $this->object->removeCustomIcon();
715  }
716  $this->object->saveIcons($_FILES["cont_icon"]['tmp_name']);
717  }
718  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
719  $this->ctrl->redirect($this,"editGroupIcons");
720  }
721 
722  $form->setValuesByPost();
723  $this->editGroupIconsObject($form);
724  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editGroupIconsObject($a_form=null)
edit container icons
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

public

Parameters

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

References object, ilUtil\sendSuccess(), and ilDidacticTemplateUtils\switchTemplate().

482  {
483  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
485  $this->object->getRefId(),
486  (int) $_REQUEST['grp_type']
487  );
488 
489  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
490  $this->ctrl->redirect($this,'edit');
491  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static switchTemplate($a_ref_id, $a_new_tpl_id)
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

update info

public

Returns

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

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

850  {
851  $this->checkPermission('manage_members');
852 
853  $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
854  $this->object->update();
855 
856  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
857  $this->editInfoObject();
858  return true;
859  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editInfoObject()
edit info
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ updateObject()

ilObjGroupGUI::updateObject ( )

update group settings

Parameters
boolupdate group type public

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

References $_POST, $GLOBALS, $ilErr, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), array, ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\editObject(), ilLoggerFactory\getLogger(), initForm(), ilDidacticTemplateObjSettings\lookupTemplateId(), object, ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilUtil\sendQuestion(), ilUtil\sendSuccess(), ilUtil\stripSlashes(), ilObjectServiceSettingsGUI\TAG_CLOUD, ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilObjectServiceSettingsGUI\USE_NEWS.

500  {
501  global $ilErr;
502 
503  $this->checkPermission('write');
504 
505  $form = $this->initForm();
506  if($form->checkInput())
507  {
508  // handle group type settings
509  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
510  $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
511 
512  $modified = false;
513  $new_type_info = $form->getInput('didactic_type');
514  if($new_type_info)
515  {
516  $new_type = explode('_',$form->getInput('didactic_type'));
517  $new_type = $new_type[1];
518 
519  $modified = ($new_type != $old_type);
520  ilLoggerFactory::getLogger('grp')->info('Switched group type from '. $old_type .' to ' . $new_type);
521  }
522 
523  $old_autofill = $this->object->hasWaitingListAutoFill();
524 
525  $this->object->setTitle(ilUtil::stripSlashes($form->getInput('title')));
526  $this->object->setDescription(ilUtil::stripSlashes($form->getInput('desc')));
527  $this->object->setGroupType(ilUtil::stripSlashes($form->getInput('grp_type')));
528  $this->object->setRegistrationType(ilUtil::stripSlashes($form->getInput('registration_type')));
529  $this->object->setPassword(ilUtil::stripSlashes($form->getInput('password')));
530  $this->object->enableUnlimitedRegistration((bool) !$form->getInput('reg_limit_time'));
531  $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
532  $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
533  $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
534  $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
535  $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
536  $this->object->setViewMode($form->getInput('view_mode'));
537  $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
538  $this->object->setShowMembers((int) $form->getInput('show_members'));
539 
540  $reg = $form->getItemByPostVar("reg");
541  if($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime)
542  {
543  $this->object->enableUnlimitedRegistration(false);
544  }
545  else
546  {
547  $this->object->enableUnlimitedRegistration(true);
548  }
549 
550  $this->object->setRegistrationStart($reg->getStart());
551  $this->object->setRegistrationEnd($reg->getEnd());
552 
553  $cancel_end = $form->getItemByPostVar("cancel_end");
554  $this->object->setCancellationEnd($cancel_end->getDate());
555 
556  switch((int) $_POST['waiting_list'])
557  {
558  case 2:
559  $this->object->enableWaitingList(true);
560  $this->object->setWaitingListAutoFill(true);
561  break;
562 
563  case 1:
564  $this->object->enableWaitingList(true);
565  $this->object->setWaitingListAutoFill(false);
566  break;
567 
568  default:
569  $this->object->enableWaitingList(false);
570  $this->object->setWaitingListAutoFill(false);
571  break;
572  }
573 
574  // update object settings
575  $this->object->update();
576 
577 
578  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
580  $this->object->getId(), $form,
581  array(
587  )
588  );
589 
590  // Save sorting
591  $this->saveSortingSettings($form);
592  // if autofill has been activated trigger process
593  if(
594  !$old_autofill &&
595  $this->object->hasWaitingListAutoFill())
596  {
597  $this->object->handleAutoFill();
598  }
599 
600  // BEGIN ChangeEvents: Record update Object.
601  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
602  global $ilUser;
603  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(),
604  'update');
605  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
606  // END PATCH ChangeEvents: Record update Object.
607  // Update ecs export settings
608  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
609  $ecs = new ilECSGroupSettings($this->object);
610  $ecs->handleSettingsUpdate();
611  }
612  else
613  {
614  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
615 
616  $form->setValuesByPost();
617  $this->editObject($form);
618  return true;
619  }
620 
621  // group type modified
622  if($modified)
623  {
624  if($new_type == 0)
625  {
626  $new_type_txt = $GLOBALS['lng']->txt('il_grp_status_open');
627  }
628  else
629  {
630  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
631  $dtpl = new ilDidacticTemplateSetting($new_type);
632  $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['lng']->getLangKey());
633  }
634 
635 
636  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
637  ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
638  $confirm = new ilConfirmationGUI();
639  $confirm->setFormAction($this->ctrl->getFormAction($this));
640  $confirm->addItem(
641  'grp_type',
642  $new_type,
643  $this->lng->txt('grp_info_new_grp_type').': '. $new_type_txt
644  );
645  $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
646  $confirm->setCancel($this->lng->txt('cancel'), 'edit');
647 
648  $this->tpl->setContent($confirm->getHTML());
649  return true;
650  }
651  else
652  {
653  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
654  $this->ctrl->redirect($this,'edit');
655  return true;
656  }
657  }
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilErr
Definition: raiseError.php:16
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
initForm($a_mode='edit')
init create/edit form
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
Class ilECSGroupSettings.
Date and time handling
$ilUser
Definition: imgupload.php:18
editObject()
edit object
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Create new PHPExcel object
obj_idprivate
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static getLogger($a_component_id)
Get component logger.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ viewObject()

ilObjGroupGUI::viewObject ( )

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

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

Referenced by leaveObject().

341  {
342  global $tree,$rbacsystem,$ilUser;
343 
344  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
345  ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
346  $this->object->getRefId(),'grp');
347 
348  if (strtolower($_GET["baseClass"]) == "iladministrationgui")
349  {
350  parent::viewObject();
351  return true;
352  }
353 
354  if(!$this->checkAgreement())
355  {
356  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
357  $this->tabs_gui->setTabActive('view_content');
358  $this->ctrl->setReturn($this,'view');
359  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
360  $this->ctrl->setCmdClass(get_class($agreement));
361  $this->ctrl->forwardCommand($agreement);
362  return true;
363  }
364 
365  $this->tabs_gui->setTabActive('view_content');
366  $this->renderObject();
367  }
renderObject()
Render group.
$_GET["client_id"]
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
$ilUser
Definition: imgupload.php:18
checkAgreement()
Check agreement and redirect if it is not accepted.
Create new PHPExcel object
obj_idprivate
+ 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: