ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjGroupGUI Class Reference

Class ilObjGroupGUI. More...

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

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
 Constructor public. 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, $a_redirect=true)
 After object creation. More...
 
 editObject (ilPropertyFormGUI $a_form=null)
 Edit object. More...
 
 updateGroupTypeObject ()
 change group type More...
 
 updateObject ()
 update group settings More...
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 editInfoObject ()
 edit info More...
 
 updateInfoObject ()
 update info More...
 
 readMemberData ($ids, $selected_columns=null)
 
 leaveObject ()
 leave Group 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...
 
 initForm ($a_mode='edit', $a_omit_form_action=false)
 init create/edit form More...
 
 prepareOutput ($a_show_subobjects=true)
 Handle member view. More...
 
 createMailSignature ()
 Create a course mail signature. More...
 
 addCustomData ($a_data)
 
 getLocalRoles ()
 returns all local roles [role_id] => title More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 
- 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...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 getBucketTitle ()
 get proper label to add in the background task popover More...
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 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. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 trashObject ()
 Show trash content of object. More...
 
 trashApplyFilterObject ()
 trash table apply filter More...
 
 trashResetFilterObject ()
 trash table reset filter More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
 getAdminTabs ()
 
 competencesObject ()
 Redirect to competences. More...
 
- Public Member Functions inherited from ilDesktopItemHandling
 addToDeskObject ()
 Add desktop item public. More...
 
 removeFromDeskObject ()
 Remove from desktop public. More...
 

Static Public Member Functions

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

Protected Member Functions

 getSubServices ()
 
 initInfoEditor ()
 init info editor More...
 
 membersObject ()
 Called from goto? More...
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs 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...
 
 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 ()
 
 supportsPageEditor ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 trashHandleFilter (bool $action_apply, bool $action_reset)
 
 restoreToNewLocationObject (\ilPropertyFormGUI $form=null)
 
 getTreeSelectorGUI ($cmd)
 
 initFilter ()
 Init filter. More...
 

Protected Attributes

 $news
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 
- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $global_screen
 
 $app_event_handler
 
 $ui
 
 $container_filter_service
 
 $container_user_filter = null
 
 $ui_filter
 

Private Member Functions

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

Additional Inherited Members

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

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

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

42  {
43  global $DIC;
44 
45  $ilSetting = $DIC['ilSetting'];
46 
47  $this->type = "grp";
48  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
49 
50  $this->lng->loadLanguageModule('grp');
51  $this->lng->loadLanguageModule('obj');
52 
53  $this->setting = $ilSetting;
54  $this->news = $DIC->news();
55  }
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

goto target group

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

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

Referenced by ilObjGroupReferenceGUI\_goto().

1475  {
1476  global $DIC;
1477 
1478  $ilAccess = $DIC['ilAccess'];
1479  $ilErr = $DIC['ilErr'];
1480  $lng = $DIC['lng'];
1481  $ilUser = $DIC['ilUser'];
1482 
1483  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1484  if (substr($a_add, 0, 5) == 'rcode') {
1485  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
1486  // Redirect to login for anonymous
1488  "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
1489  $ilUser->getCurrentLanguage()
1490  );
1491  }
1492 
1493  // Redirects to target location after assigning user to group
1495  $a_target,
1497  substr($a_add, 5)
1498  );
1499  }
1500 
1501  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
1502  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
1503  }
1504 
1505  if ($a_add == "comp" && ilContSkillPresentationGUI::isAccessible($a_target)) {
1506  ilObjectGUI::_gotoRepositoryNode($a_target, "competences");
1507  }
1508 
1509  if ($ilAccess->checkAccess("read", "", $a_target)) {
1511  } else {
1512  // to do: force flat view
1513  if ($ilAccess->checkAccess("visible", "", $a_target)) {
1514  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
1515  } else {
1516  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1517  ilUtil::sendFailure(sprintf(
1518  $lng->txt("msg_no_perm_read_item"),
1520  ), true);
1522  }
1523  }
1524  }
1525  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1526  }
const ANONYMOUS_USER_ID
Definition: constants.php:25
const ROOT_FOLDER_ID
Definition: constants.php:30
$_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)
global $DIC
Definition: goto.php:24
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$ilUser
Definition: imgupload.php:18
static isAccessible($ref_id)
Is container skill presentation accessible.
static redirect($a_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 1082 of file class.ilObjGroupGUI.php.

Referenced by getTabs().

1083  {
1084  $this->tabs_gui->addTab(
1085  "view_content",
1086  $this->lng->txt("content"),
1087  $this->ctrl->getLinkTarget($this, "view")
1088  );
1089  }
+ Here is the caller graph for this function:

◆ addCustomData()

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

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

References Vendor\Package\$f, and ilCourseUserData\_getValuesByObjId().

2111  {
2112  // object defined fields
2113  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2114  $odfs = ilCourseUserData::_getValuesByObjId($this->object->getId());
2115 
2116  $res_data = array();
2117  foreach ($a_data as $usr_id => $user_data) {
2118  $res_data[$usr_id] = $user_data;
2119 
2120  // udf
2121  include_once './Services/User/classes/class.ilUserDefinedData.php';
2122  $udf_data = new ilUserDefinedData($usr_id);
2123  foreach ($udf_data->getAll() as $field => $value) {
2124  list($f, $field_id) = explode('_', $field);
2125  $res_data[$usr_id]['udf_' . $field_id] = (string) $value;
2126  }
2127 
2128  foreach ((array) $odfs[$usr_id] as $cdf_field => $cdf_value) {
2129  $res_data[$usr_id]['cdf_' . $cdf_field] = (string) $cdf_value;
2130  }
2131  }
2132 
2133  return $res_data;
2134  }
Class ilUserDefinedData.
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
+ Here is the call graph for this function:

◆ afterSave()

ilObjGroupGUI::afterSave ( \ilObject  $new_object,
  $a_redirect = true 
)

After object creation.

Parameters
\ilObject$new_object

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

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

482  {
483  global $DIC;
484 
485  $ilUser = $DIC['ilUser'];
486  $ilSetting = $DIC['ilSetting'];
487 
488  $new_object->setRegistrationType(GRP_REGISTRATION_DIRECT);
489  $new_object->update();
490 
491  // check for parent group or course => SORT_INHERIT
492  $sort_mode = ilContainer::SORT_TITLE;
493  if (
494  $GLOBALS['DIC']['tree']->checkForParentType($new_object->getRefId(), 'crs', true) ||
495  $GLOBALS['DIC']['tree']->checkForParentType($new_object->getRefId(), 'grp', true)
496  ) {
497  $sort_mode = ilContainer::SORT_INHERIT;
498  }
499 
500  // Save sorting
501  include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
502  $sort = new ilContainerSortingSettings($new_object->getId());
503  $sort->setSortMode($sort_mode);
504  $sort->update();
505 
506 
507  // Add user as admin and enable notification
508  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
509  $members_obj = ilGroupParticipants::_getInstanceByObjId($new_object->getId());
510  $members_obj->add($ilUser->getId(), IL_GRP_ADMIN);
511  $members_obj->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
512  $members_obj->updateContact($ilUser->getId(), true);
513 
514  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
515  if ($a_redirect) {
516  $this->ctrl->setParameter($this, "ref_id", $new_object->getRefId());
517  $this->ctrl->redirect($this, 'edit');
518  }
519  }
const IL_GRP_ADMIN
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18
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 1981 of file class.ilObjGroupGUI.php.

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

Referenced by viewObject().

1982  {
1983  global $DIC;
1984 
1985  $ilUser = $DIC['ilUser'];
1986  $ilAccess = $DIC['ilAccess'];
1987 
1988  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1989  return true;
1990  }
1991 
1992  // Disable aggrement if is not member of group
1993  if (!$this->object->members_obj->isAssigned($ilUser->getId())) {
1994  return true;
1995  }
1996 
1997  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
1998  if (ilMemberViewSettings::getInstance()->isActive()) {
1999  return true;
2000  }
2001 
2002  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2003  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
2004  $privacy = ilPrivacySettings::_getInstance();
2005 
2006  // Check agreement
2007  if (($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2008  and !ilMemberAgreement::_hasAccepted($ilUser->getId(), $this->object->getId())) {
2009  return false;
2010  }
2011  // Check required fields
2012  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2013  if (!ilCourseUserData::_checkRequired($ilUser->getId(), $this->object->getId())) {
2014  return false;
2015  }
2016  return true;
2017  }
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
global $DIC
Definition: goto.php:24
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _hasFields($a_container_id)
Check if there are any define fields.
static _getInstance()
Get instance of ilPrivacySettings.
$ilUser
Definition: imgupload.php:18
+ 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 2047 of file class.ilObjGroupGUI.php.

References ilLink\_getLink().

2048  {
2049  $link = chr(13) . chr(10) . chr(13) . chr(10);
2050  $link .= $this->lng->txt('grp_mail_permanent_link');
2051  $link .= chr(13) . chr(10) . chr(13) . chr(10);
2052  include_once 'Services/Link/classes/class.ilLink.php';
2053  $link .= ilLink::_getLink($this->object->getRefId());
2054  return rawurlencode(base64_encode($link));
2055  }
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjGroupGUI::editInfoObject ( )

edit info

public

Returns

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

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

Referenced by updateInfoObject().

862  {
863  global $DIC;
864 
865  $ilErr = $DIC['ilErr'];
866  $ilAccess = $DIC['ilAccess'];
867 
868  $this->checkPermission('write');
869 
870  $this->setSubTabs('settings');
871  $this->tabs_gui->setTabActive('settings');
872  $this->tabs_gui->setSubTabActive('grp_info_settings');
873 
874  $form = $this->initInfoEditor();
875  $this->tpl->setContent($form->getHTML());
876  }
initInfoEditor()
init info editor
setSubTabs($a_tab)
set sub tabs
global $DIC
Definition: goto.php:24
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 776 of file class.ilObjGroupGUI.php.

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

777  {
778  global $DIC;
779 
780  $ilUser = $DIC['ilUser'];
781  $ilCtrl = $DIC['ilCtrl'];
782  $ilUser = $DIC['ilUser'];
783  $ilAccess = $DIC['ilAccess'];
784 
785  $this->setSubTabs("settings");
786  $this->tabs_gui->setTabActive('settings');
787  $this->tabs_gui->setSubTabActive('grp_map_settings');
788 
789  include_once('./Services/Maps/classes/class.ilMapUtil.php');
790  if (!ilMapUtil::isActivated() ||
791  !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
792  return;
793  }
794 
795  $latitude = $this->object->getLatitude();
796  $longitude = $this->object->getLongitude();
797  $zoom = $this->object->getLocationZoom();
798 
799  // Get Default settings, when nothing is set
800  if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
802  $latitude = $def["latitude"];
803  $longitude = $def["longitude"];
804  $zoom = $def["zoom"];
805  }
806 
807 
808  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
809  $form = new ilPropertyFormGUI();
810  $form->setFormAction($ilCtrl->getFormAction($this));
811 
812  $form->setTitle($this->lng->txt("grp_map_settings"));
813 
814  // enable map
815  $public = new ilCheckboxInputGUI(
816  $this->lng->txt("grp_enable_map"),
817  "enable_map"
818  );
819  $public->setValue("1");
820  $public->setChecked($this->object->getEnableGroupMap());
821  $form->addItem($public);
822 
823  // map location
824  $loc_prop = new ilLocationInputGUI(
825  $this->lng->txt("grp_map_location"),
826  "location"
827  );
828  $loc_prop->setLatitude($latitude);
829  $loc_prop->setLongitude($longitude);
830  $loc_prop->setZoom($zoom);
831  $form->addItem($loc_prop);
832 
833  $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
834 
835  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
836  }
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
setValue($a_value)
Set Value.
static getDefaultSettings()
Get default longitude, latitude and zoom.
global $DIC
Definition: goto.php:24
This class represents a location property in a property form.
static isActivated()
Checks whether Map feature is activated.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ editObject()

ilObjGroupGUI::editObject ( ilPropertyFormGUI  $a_form = null)

Edit object.

public

Parameters
ilPropertyFormGUI
Returns

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

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

529  {
530  $this->checkPermission("write");
531 
532  $this->setSubTabs('settings');
533  $this->tabs_gui->setTabActive('settings');
534  $this->tabs_gui->setSubTabActive('grp_settings');
535 
536  if (!$a_form) {
537  $a_form = $this->initForm('edit');
538  }
539 
540  $this->tpl->setVariable('ADM_CONTENT', $a_form->getHTML());
541  }
initForm($a_mode='edit', $a_omit_form_action=false)
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 57 of file class.ilObjGroupGUI.php.

References $_GET, $DIC, $GLOBALS, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacsystem, $ret, $service, ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilLearningProgress\_tracProgress(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjStyleSheet\getContentStylePath(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjGroup\MAIL_ALLOWED_ALL, prepareOutput(), renderObject(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), ilMailMemberSearchGUI\setObjParticipants(), setSubTabs(), and ilContainerGUI\showPermanentLink().

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

References ilObjRole\_getTranslation().

Referenced by executeCommand().

2141  {
2142  $local_roles = $this->object->getLocalGroupRoles(false);
2143  $grp_member = $this->object->getDefaultMemberRole();
2144  $grp_roles = array();
2145 
2146  //put the group member role to the top of the crs_roles array
2147  if (in_array($grp_member, $local_roles)) {
2148  $grp_roles[$grp_member] = ilObjRole::_getTranslation(array_search($grp_member, $local_roles));
2149  unset($local_roles[$grp_roles[$grp_member]]);
2150  }
2151 
2152  foreach ($local_roles as $title => $role_id) {
2153  $grp_roles[$role_id] = ilObjRole::_getTranslation($title);
2154  }
2155  return $grp_roles;
2156  }
static _getTranslation($a_role_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubServices()

ilObjGroupGUI::getSubServices ( )
protected

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

References ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_CONFIGURATION, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectServiceSettingsGUI\EXTERNAL_MAIL_PREFIX, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjectServiceSettingsGUI\SKILLS, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by initForm(), and updateObject().

754  : array
755  {
756  $subs = array(
765  );
766  if ($this->news->isGloballyActivated()) {
768  }
769 
770  return $subs;
771  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjGroupGUI::getTabs ( )

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

References $DIC, $ilUser, ilObjectGUI\$lng, ilContainerGUI\$rbacsystem, ilWaitingList\_isOnList(), ilGroupParticipants\_isParticipant(), ilContainer\_lookupContainerSetting(), addContentTab(), ilLearningProgressAccess\checkAccess(), ilBadgeHandler\getInstance(), and ilObjectServiceSettingsGUI\SKILLS.

1094  {
1095  global $DIC;
1096 
1097  $rbacsystem = $DIC['rbacsystem'];
1098  $ilUser = $DIC['ilUser'];
1099  $ilAccess = $DIC['ilAccess'];
1100  $lng = $DIC['lng'];
1101  $ilHelp = $DIC['ilHelp'];
1102 
1103  $ilHelp->setScreenIdComponent("grp");
1104 
1105  if ($ilAccess->checkAccess('read', '', $this->ref_id)) {
1106  if ($this->object->isNewsTimelineEffective()) {
1107  if (!$this->object->isNewsTimelineLandingPageEffective()) {
1108  $this->addContentTab();
1109  }
1110  $this->tabs_gui->addTab(
1111  "news_timeline",
1112  $lng->txt("cont_news_timeline_tab"),
1113  $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show")
1114  );
1115  if ($this->object->isNewsTimelineLandingPageEffective()) {
1116  $this->addContentTab();
1117  }
1118  } else {
1119  $this->addContentTab();
1120  }
1121  }
1122  if (
1123  $ilAccess->checkAccess('visible', '', $this->ref_id) ||
1124  $ilAccess->checkAccess('join', '', $this->ref_id) ||
1125  $ilAccess->checkAccess('read', '', $this->ref_id)
1126  ) {
1127  $this->tabs_gui->addTarget(
1128  "info_short",
1129  $this->ctrl->getLinkTargetByClass(
1130  array("ilobjgroupgui", "ilinfoscreengui"),
1131  "showSummary"
1132  ),
1133  "infoScreen",
1134  "",
1135  "",
1136  false
1137  );
1138  }
1139 
1140 
1141  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1142  $this->tabs_gui->addTarget(
1143  "settings",
1144  $this->ctrl->getLinkTarget($this, "edit"),
1145  array("edit", "editMapSettings"),
1146  get_class($this),
1147  ""
1148  );
1149  }
1150 
1151  include_once './Modules/Group/classes/class.ilGroupParticipants.php';
1152  $is_participant = ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId());
1153 
1154  // Members
1155  include_once './Modules/Group/classes/class.ilGroupMembershipGUI.php';
1156  $membership_gui = new ilGroupMembershipGUI($this, $this->object);
1157  $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
1158 
1159 
1160  // badges
1161  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1162  include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
1163  if (ilBadgeHandler::getInstance()->isObjectActive($this->object->getId())) {
1164  $this->tabs_gui->addTarget(
1165  "obj_tool_setting_badges",
1166  $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
1167  "",
1168  "ilbadgemanagementgui"
1169  );
1170  }
1171  }
1172 
1173  // skills
1174  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
1175  if ($ilAccess->checkAccess('read', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
1176  $this->object->getId(),
1178  false
1179  )) {
1180  $this->tabs_gui->addTarget(
1181  "obj_tool_setting_skills",
1182  $this->ctrl->getLinkTargetByClass(array("ilcontainerskillgui", "ilcontskillpresentationgui"), ""),
1183  "",
1184  array("ilcontainerskillgui", "ilcontskillpresentationgui", "ilcontskilladmingui")
1185  );
1186  }
1187 
1188  // learning progress
1189  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
1190  if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
1191  $this->tabs_gui->addTarget(
1192  'learning_progress',
1193  $this->ctrl->getLinkTargetByClass(array('ilobjgroupgui','illearningprogressgui'), ''),
1194  '',
1195  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui')
1196  );
1197  }
1198 
1199  // meta data
1200  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
1201  $md_gui = new ilObjectMetaDataGUI($this->object);
1202  $tab_link = $md_gui->getTab();
1203  if ($tab_link !== null) {
1204  $this->tabs_gui->addTab(
1205  'meta_data',
1206  $this->lng->txt('meta_data'),
1207  $tab_link,
1208  '',
1209  'ilObjectMetaDataGUI'
1210  );
1211  }
1212  }
1213 
1214 
1215  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
1216  $this->tabs_gui->addTarget(
1217  'export',
1218  $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
1219  'export',
1220  'ilexportgui'
1221  );
1222  }
1223 
1224  // parent tabs (all container: edit_permission, clipboard, trash
1225  parent::getTabs();
1226 
1227  if ($ilAccess->checkAccess('join', '', $this->object->getRefId()) and
1228  !$this->object->members_obj->isAssigned($ilUser->getId())) {
1229  include_once './Modules/Group/classes/class.ilGroupWaitingList.php';
1230  if (ilGroupWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
1231  $this->tabs_gui->addTab(
1232  'leave',
1233  $this->lng->txt('membership_leave'),
1234  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', 'show', '')
1235  );
1236  } else {
1237  $this->tabs_gui->addTarget(
1238  "join",
1239  $this->ctrl->getLinkTargetByClass('ilgroupregistrationgui', "show"),
1240  'show',
1241  ""
1242  );
1243  }
1244  }
1245  if ($ilAccess->checkAccess('leave', '', $this->object->getRefId()) and
1246  $this->object->members_obj->isMember($ilUser->getId())) {
1247  $this->tabs_gui->addTarget(
1248  "grp_btn_unsubscribe",
1249  $this->ctrl->getLinkTarget($this, "leave"),
1250  '',
1251  ""
1252  );
1253  }
1254  }
Class ilObjectMetaDataGUI.
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
global $DIC
Definition: goto.php:24
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
GUI class for membership features.
$ilUser
Definition: imgupload.php:18
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static getInstance()
Constructor.
+ Here is the call graph for this function:

◆ infoScreen()

ilObjGroupGUI::infoScreen ( )

show information screen

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

References $c, $DIC, $ilSetting, $ilUser, ilContainerGUI\$rbacsystem, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilMDUtils\_fillHTMLMetaTags(), ilCourseDefinedFieldDefinition\_getFields(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), ilParticipants\getInstance(), GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjGroupAccess\lookupRegistrationInfo(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

1272  {
1273  global $DIC;
1274 
1275  $rbacsystem = $DIC['rbacsystem'];
1276  $ilUser = $DIC['ilUser'];
1277  $ilSetting = $DIC['ilSetting'];
1278 
1279  $this->tabs_gui->setTabActive('info_short');
1280 
1281  if (!$this->checkPermissionBool('read')) {
1282  $this->checkPermission('visible');
1283  }
1284 
1286  $this->object->getId(),
1287  $this->object->getId(),
1288  'grp'
1289  );
1290 
1291  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
1292  $info = new ilInfoScreenGUI($this);
1293 
1294  if (strlen($this->object->getInformation())) {
1295  $info->addSection($this->lng->txt('grp_general_informations'));
1296  $info->addProperty($this->lng->txt('grp_information'), nl2br(
1297  ilUtil::makeClickable($this->object->getInformation(), true)
1298  ));
1299  }
1300 
1301  $info->enablePrivateNotes();
1302  $info->enableLearningProgress(true);
1303 
1304  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'grp', $this->object->getId());
1305  $record_gui->setInfoObject($info);
1306  $record_gui->parse();
1307 
1308  // meta data
1309  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
1310 
1311 
1312  // support contacts
1313  $parts = ilParticipants::getInstance($this->object->getRefId());
1314  $contacts = $parts->getContacts();
1315  if (count($contacts) > 0) {
1316  $info->addSection($this->lng->txt("grp_mem_contacts"));
1317  foreach ($contacts as $c) {
1318  $pgui = new ilPublicUserProfileGUI($c);
1319  $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
1320  $pgui->setEmbedded(true);
1321  $info->addProperty("", $pgui->getHTML());
1322  }
1323  }
1324 
1325 
1326  $info->addSection($this->lng->txt('group_registration'));
1327  $info->showLDAPRoleGroupMappingInfo();
1328 
1329  if (!$this->object->isRegistrationEnabled()) {
1330  $info->addProperty(
1331  $this->lng->txt('group_registration_mode'),
1332  $this->lng->txt('grp_reg_deac_info_screen')
1333  );
1334  } else {
1335  switch ($this->object->getRegistrationType()) {
1337  $info->addProperty(
1338  $this->lng->txt('group_registration_mode'),
1339  $this->lng->txt('grp_reg_direct_info_screen')
1340  );
1341  break;
1342 
1344  $info->addProperty(
1345  $this->lng->txt('group_registration_mode'),
1346  $this->lng->txt('grp_reg_req_info_screen')
1347  );
1348  break;
1349 
1351  $info->addProperty(
1352  $this->lng->txt('group_registration_mode'),
1353  $this->lng->txt('grp_reg_passwd_info_screen')
1354  );
1355  break;
1356 
1357  }
1358  /*
1359  $info->addProperty($this->lng->txt('group_registration_time'),
1360  ilDatePresentation::formatPeriod(
1361  $this->object->getRegistrationStart(),
1362  $this->object->getRegistrationEnd()));
1363  */
1364  if ($this->object->isRegistrationUnlimited()) {
1365  $info->addProperty(
1366  $this->lng->txt('group_registration_time'),
1367  $this->lng->txt('grp_registration_unlimited')
1368  );
1369  } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
1370  $info->addProperty(
1371  $this->lng->txt("group_registration_time"),
1372  $this->lng->txt('cal_until') . ' ' .
1373  ilDatePresentation::formatDate($this->object->getRegistrationEnd())
1374  );
1375  } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
1376  $info->addProperty(
1377  $this->lng->txt("group_registration_time"),
1378  $this->lng->txt('cal_from') . ' ' .
1379  ilDatePresentation::formatDate($this->object->getRegistrationStart())
1380  );
1381  }
1382  if ($this->object->isMembershipLimited()) {
1383  if ($this->object->getMinMembers()) {
1384  $info->addProperty(
1385  $this->lng->txt("mem_min_users"),
1386  $this->object->getMinMembers()
1387  );
1388  }
1389  if ($this->object->getMaxMembers()) {
1390  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1391  $reg_info = ilObjGroupAccess::lookupRegistrationInfo($this->object->getId());
1392 
1393  $info->addProperty(
1394  $this->lng->txt('mem_free_places'),
1395  $reg_info['reg_info_free_places']
1396  );
1397  }
1398  }
1399 
1400  if ($this->object->getCancellationEnd()) {
1401  $info->addProperty(
1402  $this->lng->txt('grp_cancellation_end'),
1403  ilDatePresentation::formatDate($this->object->getCancellationEnd())
1404  );
1405  }
1406  }
1407 
1408  if ($this->object->getStart() instanceof ilDateTime &&
1409  !$this->object->getStart()->isNull()
1410  ) {
1411  $info->addProperty(
1412  $this->lng->txt('grp_period'),
1414  $this->object->getStart(),
1415  $this->object->getEnd()
1416  )
1417  );
1418  }
1419 
1420  // Confirmation
1421  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1422  $privacy = ilPrivacySettings::_getInstance();
1423 
1424  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1425  if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
1426  include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
1427 
1428  $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
1429 
1430  $this->lng->loadLanguageModule('ps');
1431  $info->addSection($this->lng->txt('grp_user_agreement_info'));
1432  $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
1433 
1434  if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
1435  $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
1436  }
1437  }
1438 
1439 
1440  // forward the command
1441  $this->ctrl->forwardCommand($info);
1442  }
Class ilInfoScreenGUI.
$c
Definition: cli.php:37
static _fieldsToInfoString($a_obj_id)
Fields to info string.
const GRP_REGISTRATION_PASSWORD
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
const GRP_REGISTRATION_REQUEST
static getInstance($a_ref_id)
Get instance by ref_id.
GUI class for public user profile presentation.
static lookupRegistrationInfo($a_obj_id)
Lookup registration info ilDB $ilDB ilObjUser $ilUser ilLanguage $lng.
setInfoObject($info)
get info sections
static _getInstanceByType($a_type)
Get Singleton Instance.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
global $DIC
Definition: goto.php:24
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _getInstance()
Get instance of ilPrivacySettings.
$ilUser
Definition: imgupload.php:18
const GRP_REGISTRATION_DIRECT
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
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 1261 of file class.ilObjGroupGUI.php.

References infoScreen().

1262  {
1263  $this->ctrl->setCmd("showSummary");
1264  $this->ctrl->setCmdClass("ilinfoscreengui");
1265  $this->infoScreen();
1266  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initForm()

ilObjGroupGUI::initForm (   $a_mode = 'edit',
  $a_omit_form_action = false 
)

init create/edit form

protected

Parameters
stringedit or create
Returns

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

References $DIC, $pass, ilObjectGUI\$tree, ilLink\_getLink(), ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilRadioOption\addSubItem(), ilDateDurationInputGUI\enableToggleFullTime(), ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), ilObjectGUI\getObjectService(), getSubServices(), GRP_REGISTRATION_DEACTIVATED, GRP_REGISTRATION_DIRECT, GRP_REGISTRATION_PASSWORD, GRP_REGISTRATION_REQUEST, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilObjGroup\lookupViewMode(), ilObjGroup\MAIL_ALLOWED_ALL, ilObjGroup\MAIL_ALLOWED_TUTORS, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMinValue(), ilDateDurationInputGUI\setShowTime(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilContainer\SORT_CREATION, ilContainer\SORT_INHERIT, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

Referenced by editObject(), and updateObject().

1537  {
1538  global $DIC;
1539 
1540  $obj_service = $this->getObjectService();
1541 
1542  $tree = $DIC['tree'];
1543 
1544  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1545 
1546  $form = new ilPropertyFormGUI();
1547 
1548  if (!$a_omit_form_action) {
1549  switch ($a_mode) {
1550  case 'edit':
1551  $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1552  break;
1553 
1554  default:
1555  $form->setTableWidth('600px');
1556  $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
1557  break;
1558  }
1559  }
1560 
1561  // title/description
1562  $this->initFormTitleDescription($form);
1563 
1564  $form = $this->initDidacticTemplate($form);
1565 
1566  if ($a_mode == 'edit') {
1567  // group period
1568  $cdur = new ilDateDurationInputGUI($this->lng->txt('grp_period'), 'period');
1569  $this->lng->loadLanguageModule('mem');
1570  $cdur->enableToggleFullTime(
1571  $this->lng->txt('mem_period_without_time'),
1572  !$this->object->getStartTimeIndication()
1573  );
1574  $cdur->setShowTime(true);
1575  $cdur->setInfo($this->lng->txt('grp_period_info'));
1576  $cdur->setStart($this->object->getStart());
1577  $cdur->setEnd($this->object->getEnd());
1578  $form->addItem($cdur);
1579 
1580  // Group registration ############################################################
1581  $pres = new ilFormSectionHeaderGUI();
1582  $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
1583  $form->addItem($pres);
1584 
1585  // Registration type
1586  $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
1587  $reg_type->setValue($this->object->getRegistrationType());
1588 
1589  $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);#$this->lng->txt('grp_reg_direct_info'));
1590  $reg_type->addOption($opt_dir);
1591 
1592  $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
1593  $pass = new ilTextInputGUI($this->lng->txt("password"), 'password');
1594  $pass->setRequired(true);
1595  $pass->setInfo($this->lng->txt('grp_reg_password_info'));
1596  $pass->setValue($this->object->getPassword());
1597  $pass->setSize(32);
1598  $pass->setMaxLength(32);
1599  $opt_pass->addSubItem($pass);
1600  $reg_type->addOption($opt_pass);
1601 
1602  $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
1603  $reg_type->addOption($opt_req);
1604 
1605  $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_no_selfreg'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
1606  $reg_type->addOption($opt_deact);
1607 
1608  // Registration codes
1609  $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
1610  $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1611  $reg_code->setValue(1);
1612  $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
1613  $form->addItem($reg_type);
1614 
1615  // Registration codes
1616  if (!$this->object->getRegistrationAccessCode()) {
1617  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1618  $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1619  }
1620  $reg_link = new ilHiddenInputGUI('reg_code');
1621  $reg_link->setValue($this->object->getRegistrationAccessCode());
1622  $form->addItem($reg_link);
1623 
1624  $link = new ilCustomInputGUI($this->lng->txt('grp_reg_code_link'));
1625  include_once './Services/Link/classes/class.ilLink.php';
1626  $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
1627  $link->setHTML('<span class="small">' . $val . '</span>');
1628  $reg_code->addSubItem($link);
1629  $form->addItem($reg_code);
1630 
1631  // time limit
1632  $this->lng->loadLanguageModule('dateplaner');
1633  include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
1634  $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_limited'), 'reg');
1635  $dur->setShowTime(true);
1636  $dur->setStart($this->object->getRegistrationStart());
1637  $dur->setEnd($this->object->getRegistrationEnd());
1638  $form->addItem($dur);
1639 
1640  // cancellation limit
1641  $cancel = new ilDateTimeInputGUI($this->lng->txt('grp_cancellation_end'), 'cancel_end');
1642  $cancel->setInfo($this->lng->txt('grp_cancellation_end_info'));
1643  $cancel->setDate($this->object->getCancellationEnd());
1644  $form->addItem($cancel);
1645 
1646  // max member
1647  $lim = new ilCheckboxInputGUI($this->lng->txt('reg_grp_max_members_short'), 'registration_membership_limited');
1648  $lim->setValue(1);
1649  // $lim->setOptionTitle($this->lng->txt('reg_grp_max_members'));
1650  $lim->setChecked($this->object->isMembershipLimited());
1651 
1652  $min = new ilTextInputGUI($this->lng->txt('reg_grp_min_members'), 'registration_min_members');
1653  $min->setSize(3);
1654  $min->setMaxLength(4);
1655  $min->setValue($this->object->getMinMembers() ? $this->object->getMinMembers() : '');
1656  $min->setInfo($this->lng->txt('grp_subscription_min_members_info'));
1657  $lim->addSubItem($min);
1658 
1659  $max = new ilTextInputGUI($this->lng->txt('reg_grp_max_members'), 'registration_max_members');
1660  $max->setValue($this->object->getMaxMembers() ? $this->object->getMaxMembers() : '');
1661  //$max->setTitle($this->lng->txt('members'));
1662  $max->setSize(3);
1663  $max->setMaxLength(4);
1664  $max->setInfo($this->lng->txt('grp_reg_max_members_info'));
1665  $lim->addSubItem($max);
1666 
1667  /*
1668  $wait = new ilCheckboxInputGUI($this->lng->txt('grp_waiting_list'),'waiting_list');
1669  $wait->setValue(1);
1670  //$wait->setOptionTitle($this->lng->txt('grp_waiting_list'));
1671  $wait->setInfo($this->lng->txt('grp_waiting_list_info'));
1672  $wait->setChecked($this->object->isWaitingListEnabled() ? true : false);
1673  $lim->addSubItem($wait);
1674  $form->addItem($lim);
1675  */
1676 
1677  $wait = new ilRadioGroupInputGUI($this->lng->txt('grp_waiting_list'), 'waiting_list');
1678 
1679  $option = new ilRadioOption($this->lng->txt('none'), 0);
1680  $wait->addOption($option);
1681 
1682  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_no_autofill'), 1);
1683  $option->setInfo($this->lng->txt('grp_waiting_list_info'));
1684  $wait->addOption($option);
1685 
1686  $option = new ilRadioOption($this->lng->txt('grp_waiting_list_autofill'), 2);
1687  $option->setInfo($this->lng->txt('grp_waiting_list_autofill_info'));
1688  $wait->addOption($option);
1689 
1690  if ($this->object->hasWaitingListAutoFill()) {
1691  $wait->setValue(2);
1692  } elseif ($this->object->isWaitingListEnabled()) {
1693  $wait->setValue(1);
1694  }
1695 
1696  $lim->addSubItem($wait);
1697 
1698  $form->addItem($lim);
1699 
1700 
1701  // Group presentation
1702  $parent_membership_ref_id = 0;
1703  $hasParentMembership =
1704  (
1705  $parent_membership_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs', true)
1706  );
1707 
1708  $pres = new ilFormSectionHeaderGUI();
1709  $pres->setTitle($this->lng->txt('grp_setting_header_presentation'));
1710  $form->addItem($pres);
1711 
1712  // title and icon visibility
1713  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
1714 
1715  // top actions visibility
1716  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
1717 
1718  // custom icon
1719  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
1720 
1721  // tile image
1722  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
1723 
1724  // list presentation
1725  $form = $this->initListPresentationForm($form);
1726 
1727 
1728  // presentation type
1729  $view_type = new ilRadioGroupInputGUI($this->lng->txt('grp_presentation_type'), 'view_mode');
1730  if ($hasParentMembership) {
1731  $parent_view_mode = ilObjCourseAccess::_lookupViewMode(ilObject::_lookupObjId($parent_membership_ref_id));
1732  $course_view_mode = '';
1733  switch ($parent_view_mode) {
1735  $course_view_mode = ': ' . $this->lng->txt('cntr_view_sessions');
1736  break;
1737 
1739  $course_view_mode = ': ' . $this->lng->txt('cntr_view_simple');
1740  break;
1741 
1743  $course_view_mode = ': ' . $this->lng->txt('cntr_view_by_type');
1744  break;
1745  }
1746  if ($course_view_mode) {
1747  $opt = new ilRadioOption($this->lng->txt('grp_view_inherit') . $course_view_mode, ilContainer::VIEW_INHERIT);
1748  $opt->setInfo($this->lng->txt('grp_view_inherit_info'));
1749  $view_type->addOption($opt);
1750  }
1751  }
1752 
1753  if ($hasParentMembership && ilObjGroup::lookupViewMode($this->object->getId()) == ilContainer::VIEW_INHERIT) {
1754  $view_type->setValue(ilContainer::VIEW_INHERIT);
1755  } else {
1756  $view_type->setValue(ilObjGroup::lookupViewMode($this->object->getId()));
1757  }
1758 
1759  $opt = new ilRadioOption($this->lng->txt('cntr_view_sessions'), ilContainer::VIEW_SESSIONS);
1760  $opt->setInfo($this->lng->txt('cntr_view_info_sessions'));
1761  $view_type->addOption($opt);
1762 
1763  // Limited sessions
1764  $this->lng->loadLanguageModule('crs');
1765  $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl');
1766  $sess->setValue(1);
1767  $sess->setChecked($this->object->isSessionLimitEnabled());
1768  $sess->setInfo($this->lng->txt('sess_limit_info'));
1769 
1770  $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp');
1771  $prev->setMinValue(0);
1772  $prev->setValue(
1773  $this->object->getNumberOfPreviousSessions() == -1 ?
1774  '' :
1775  $this->object->getNumberOfPreviousSessions()
1776  );
1777  $prev->setSize(2);
1778  $prev->setMaxLength(3);
1779  $sess->addSubItem($prev);
1780 
1781  $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn');
1782  $next->setMinValue(0);
1783  $next->setValue(
1784  $this->object->getNumberOfNextSessions() == -1 ?
1785  '' :
1786  $this->object->getNumberOfNextSessions()
1787  );
1788  $next->setSize(2);
1789  $next->setMaxLength(3);
1790  $sess->addSubItem($next);
1791  $opt->addSubItem($sess);
1792 
1793  $opt = new ilRadioOption($this->lng->txt('cntr_view_simple'), ilContainer::VIEW_SIMPLE);
1794  $opt->setInfo($this->lng->txt('grp_view_info_simple'));
1795  $view_type->addOption($opt);
1796 
1797  $opt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), ilContainer::VIEW_BY_TYPE);
1798  $opt->setInfo($this->lng->txt('grp_view_info_by_type'));
1799  $view_type->addOption($opt);
1800  $form->addItem($view_type);
1801 
1802 
1803  // Sorting
1804  $sorting_settings = array();
1805  if ($hasParentMembership) {
1806  $sorting_settings[] = ilContainer::SORT_INHERIT;
1807  }
1808  $sorting_settings[] = ilContainer::SORT_TITLE;
1809  $sorting_settings[] = ilContainer::SORT_CREATION;
1810  $sorting_settings[] = ilContainer::SORT_MANUAL;
1811  $this->initSortingForm($form, $sorting_settings);
1812 
1813  // additional features
1814  $feat = new ilFormSectionHeaderGUI();
1815  $feat->setTitle($this->lng->txt('obj_features'));
1816  $form->addItem($feat);
1817 
1818  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1820  $this->object->getId(),
1821  $form,
1822  $this->getSubServices()
1823  );
1824 
1825 
1826  $mem = new ilCheckboxInputGUI($this->lng->txt('grp_show_members'), 'show_members');
1827  $mem->setChecked($this->object->getShowMembers());
1828  $mem->setInfo($this->lng->txt('grp_show_members_info'));
1829  $form->addItem($mem);
1830 
1831  // Show members type
1832  $mail_type = new ilRadioGroupInputGUI($this->lng->txt('grp_mail_type'), 'mail_type');
1833  $mail_type->setValue($this->object->getMailToMembersType());
1834 
1835  $mail_tutors = new ilRadioOption(
1836  $this->lng->txt('grp_mail_tutors_only'),
1838  $this->lng->txt('grp_mail_tutors_only_info')
1839  );
1840  $mail_type->addOption($mail_tutors);
1841 
1842  $mail_all = new ilRadioOption(
1843  $this->lng->txt('grp_mail_all'),
1845  $this->lng->txt('grp_mail_all_info')
1846  );
1847  $mail_type->addOption($mail_all);
1848  $form->addItem($mail_type);
1849 
1850  // Self notification
1851  $not = new ilCheckboxInputGUI($this->lng->txt('grp_auto_notification'), 'auto_notification');
1852  $not->setValue(1);
1853  $not->setInfo($this->lng->txt('grp_auto_notification_info'));
1854  $not->setChecked($this->object->getAutoNotification());
1855  $form->addItem($not);
1856  }
1857 
1858  switch ($a_mode) {
1859  case 'create':
1860  $form->setTitle($this->lng->txt('grp_new'));
1861  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1862 
1863  $form->addCommandButton('save', $this->lng->txt('grp_new'));
1864  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1865  break;
1866 
1867  case 'edit':
1868  $form->setTitle($this->lng->txt('grp_edit'));
1869  $form->setTitleIcon(ilUtil::getImagePath('icon_grp.svg'));
1870 
1871  // Edit ecs export settings
1872  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
1873  $ecs = new ilECSGroupSettings($this->object);
1874  $ecs->addSettingsToForm($form, 'grp');
1875 
1876  $form->addCommandButton('update', $this->lng->txt('save'));
1877  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1878  break;
1879  }
1880  return $form;
1881  }
This class represents an option in a radio group.
const GRP_REGISTRATION_DEACTIVATED
This class represents a property form user interface.
This class represents a section header in a property form.
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.
setMinValue($a_minvalue, $a_display_always=false)
Set Minimum 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)
This class represents a number property in a property form.
Class ilECSGroupSettings.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
static _lookupObjId($a_id)
setValue($a_value)
Set Value.
global $DIC
Definition: goto.php:24
setShowTime($a_showtime)
Set Show Time Information.
This class represents a custom property in a property form.
static generateCode()
Generate new registration key.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
const MAIL_ALLOWED_ALL
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
getObjectService()
Get object service.
const GRP_REGISTRATION_DIRECT
static lookupViewMode($a_obj_id)
lookup view mode $ilDB
enableToggleFullTime($a_title, $a_checked)
Enable toggling between date and time.
static _lookupViewMode($a_id)
Lookup view mode.
+ 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 2057 of file class.ilObjGroupGUI.php.

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

2058  {
2059  global $DIC;
2060 
2061  $ilSetting = $DIC['ilSetting'];
2062  $ilUser = $DIC['ilUser'];
2063 
2064  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
2065 
2066  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
2067  if (ilGroupParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
2068  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
2069  if (ilMembershipNotifications::isActiveForRefId($this->ref_id)) {
2070  $noti = new ilMembershipNotifications($this->ref_id);
2071  if (!$noti->isCurrentUserActive()) {
2072  $lg->addHeaderIcon(
2073  "not_icon",
2074  ilUtil::getImagePath("notification_off.svg"),
2075  $this->lng->txt("grp_notification_deactivated")
2076  );
2077 
2078  $this->ctrl->setParameter($this, "grp_ntf", 1);
2079  $caption = "grp_activate_notification";
2080  } else {
2081  $lg->addHeaderIcon(
2082  "not_icon",
2083  ilUtil::getImagePath("notification_on.svg"),
2084  $this->lng->txt("grp_notification_activated")
2085  );
2086 
2087  $this->ctrl->setParameter($this, "grp_ntf", 0);
2088  $caption = "grp_deactivate_notification";
2089  }
2090 
2091  if ($noti->canCurrentUserEdit()) {
2092  $lg->addCustomCommand(
2093  $this->ctrl->getLinkTarget($this, "saveNotification"),
2094  $caption
2095  );
2096  }
2097 
2098  $this->ctrl->setParameter($this, "grp_ntf", "");
2099  }
2100  }
2101 
2102  return $lg;
2103  }
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)
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18
Membership notification settings.
+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjGroupGUI::initInfoEditor ( )
protected

init info editor

protected

Returns

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

References ilFormPropertyGUI\setInfo().

Referenced by editInfoObject().

885  {
886  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
887  $form = new ilPropertyFormGUI();
888  $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
889  $form->setTitle($this->lng->txt('grp_general_informations'));
890  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
891  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
892 
893  $area = new ilTextAreaInputGUI($this->lng->txt('grp_information'), 'important');
894  $area->setInfo($this->lng->txt('grp_information_info'));
895  $area->setValue($this->object->getInformation());
896  $area->setRows(8);
897  $area->setCols(80);
898  $form->addItem($area);
899 
900  return $form;
901  }
This class represents a property form user interface.
setInfo($a_info)
Set Information Text.
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 2161 of file class.ilObjGroupGUI.php.

2162  {
2163  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
2164  }

◆ leaveObject()

ilObjGroupGUI::leaveObject ( )

leave Group public

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

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

1014  {
1015  global $DIC;
1016 
1017  $ilUser = $DIC['ilUser'];
1018 
1019  $this->checkPermission('leave');
1020 
1021  $part = ilGroupParticipants::_getInstanceByObjId($this->object->getId());
1022  if ($part->isLastAdmin($ilUser->getId())) {
1023  ilUtil::sendFailure($this->lng->txt('grp_err_administrator_required'));
1024  $this->viewObject();
1025  return false;
1026  }
1027 
1028  $this->tabs_gui->setTabActive('grp_btn_unsubscribe');
1029 
1030  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1031  $cgui = new ilConfirmationGUI();
1032  $cgui->setHeaderText($this->lng->txt('grp_dismiss_myself'));
1033  $cgui->setFormAction($this->ctrl->getFormAction($this));
1034  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1035  $cgui->setConfirm($this->lng->txt("grp_btn_unsubscribe"), "unsubscribe");
1036  $this->tpl->setContent($cgui->getHTML());
1037  }
global $DIC
Definition: goto.php:24
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$ilUser
Definition: imgupload.php:18
Confirmation screen class.
+ Here is the call graph for this function:

◆ membersObject()

ilObjGroupGUI::membersObject ( )
protected

Called from goto?

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

References $GLOBALS.

1466  {
1467  $GLOBALS['DIC']['ilCtrl']->redirectByClass('ilgroupmembershipgui');
1468  }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

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

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

454  {
455  global $DIC;
456 
457  $tree = $DIC['tree'];
458 
459  // if folder is in a course, modify item list gui according to course requirements
460  if ($course_ref_id = $tree->checkForParentType($this->object->getRefId(), 'crs')) {
461  include_once("./Modules/Course/classes/class.ilObjCourse.php");
462  include_once("./Modules/Course/classes/class.ilObjCourseGUI.php");
463  $course_obj_id = ilObject::_lookupObjId($course_ref_id);
465  $a_item_list_gui,
466  'ilcoursecontentgui',
467  $a_item_data,
468  $a_show_path,
469  ilObjCourse::_lookupAboStatus($course_obj_id),
470  $course_ref_id,
471  $course_obj_id,
472  $this->object->getRefId()
473  );
474  }
475  }
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)
global $DIC
Definition: goto.php:24
static _lookupAboStatus($a_id)
+ Here is the call graph for this function:

◆ prepareOutput()

ilObjGroupGUI::prepareOutput (   $a_show_subobjects = true)

Handle member view.

Returns

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

References $DIC, ilContainerGUI\$rbacsystem, and ilObjectGUI\getCreationMode().

Referenced by executeCommand().

2025  {
2026  global $DIC;
2027 
2028  $rbacsystem = $DIC['rbacsystem'];
2029  if (!$this->getCreationMode()) {
2030  /*
2031  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
2032  $settings = ilMemberViewSettings::getInstance();
2033  if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
2034  {
2035  $settings->setContainer($this->object->getRefId());
2036  $rbacsystem->initMemberView();
2037  }
2038  */
2039  }
2040  parent::prepareOutput($a_show_subobjects);
2041  }
global $DIC
Definition: goto.php:24
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 
)

This reads out all fields in usr_data, including usr_id, firstname, lastname, and login, so should never be necessary here to call ilObjUser a second time (#31394).

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

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

923  {
924  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
925  $privacy = ilPrivacySettings::_getInstance();
926 
927  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
928  $this->show_tracking =
929  (
931  ilObjUserTracking::_enabledUserRelatedData()
932  );
933  if ($this->show_tracking) {
934  include_once('./Services/Object/classes/class.ilObjectLP.php');
935  $olp = ilObjectLP::getInstance($this->object->getId());
936  $this->show_tracking = $olp->isActive();
937  }
938 
939  if ($this->show_tracking) {
940  include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
941  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
942  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
943  $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
944  }
945 
946  if ($privacy->enabledGroupAccessTimes()) {
947  include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
948  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
949  }
950 
951  $do_prtf = (is_array($selected_columns) &&
952  in_array('prtf', $selected_columns) &&
953  is_array($ids));
954  if ($do_prtf) {
955  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
957  $ids,
958  $this->ctrl->getLinkTarget($this, "members")
959  );
960  }
961 
967  $profile_data = ilObjUser::_readUsersProfileData($ids);
968  foreach ($ids as $usr_id) {
969  $tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
970  $tmp_data['contact'] = $this->object->members_obj->isContact($usr_id) ? 1 : 0;
971 
972  foreach ((array) $profile_data[$usr_id] as $field => $value) {
973  $tmp_data[$field] = $value;
974  }
975 
976  if ($this->show_tracking) {
977  if (in_array($usr_id, $completed)) {
978  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
979  } elseif (in_array($usr_id, $in_progress)) {
980  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
981  } elseif (in_array($usr_id, $failed)) {
982  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
983  } else {
984  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
985  }
986  }
987 
988  if ($privacy->enabledGroupAccessTimes()) {
989  if (isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts']) {
990  $tmp_data['access_time'] = ilDatePresentation::formatDate(
991  $tmp_date = new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX)
992  );
993  $tmp_data['access_time_unix'] = $tmp_date->get(IL_CAL_UNIX);
994  } else {
995  $tmp_data['access_time'] = $this->lng->txt('no_date');
996  $tmp_data['access_time_unix'] = 0;
997  }
998  }
999 
1000  if ($do_prtf) {
1001  $tmp_data['prtf'] = $all_prtf[$usr_id];
1002  }
1003 
1004  $members[$usr_id] = $tmp_data;
1005  }
1006  return $members ? $members : array();
1007  }
const LP_STATUS_NOT_ATTEMPTED
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
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
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
$failed
Definition: Utf8Test.php:85
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
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)
+ Here is the call graph for this function:

◆ renderObject()

ilObjGroupGUI::renderObject ( )

Render group.

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

References $DIC, and $ret.

Referenced by executeCommand(), and viewObject().

436  {
437  global $DIC;
438 
439  $ilTabs = $DIC['ilTabs'];
440 
441  $ilTabs->activateTab("view_content");
442  $ret = parent::renderObject();
443  return $ret;
444  }
global $DIC
Definition: goto.php:24
$ret
Definition: parser.php:6
+ Here is the caller graph for this function:

◆ saveMapSettingsObject()

ilObjGroupGUI::saveMapSettingsObject ( )

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

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

839  {
840  global $DIC;
841 
842  $ilCtrl = $DIC['ilCtrl'];
843  $ilUser = $DIC['ilUser'];
844 
845  $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
846  $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
847  $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
848  $this->object->setEnableGroupMap(ilUtil::stripSlashes($_POST["enable_map"]));
849  $this->object->update();
850 
851  $ilCtrl->redirect($this, "editMapSettings");
852  }
global $DIC
Definition: goto.php:24
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$ilUser
Definition: imgupload.php:18
$_POST["username"]
+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjGroupGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

1448  {
1449  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
1450  $noti = new ilMembershipNotifications($this->ref_id);
1451  if ($noti->canCurrentUserEdit()) {
1452  if ((bool) $_REQUEST["grp_ntf"]) {
1453  $noti->activateUser();
1454  } else {
1455  $noti->deactivateUser();
1456  }
1457  }
1458  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1459  $this->ctrl->redirect($this, "");
1460  }
Membership notification settings.

◆ setSideColumnReturn()

ilObjGroupGUI::setSideColumnReturn ( )

Set return point for side column actions.

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

2170  {
2171  $this->ctrl->setReturn($this, "view");
2172  }

◆ setSubTabs()

ilObjGroupGUI::setSubTabs (   $a_tab)
protected

set sub tabs

protected

Parameters

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

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

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

1891  {
1892  global $DIC;
1893 
1894  $rbacsystem = $DIC['rbacsystem'];
1895  $ilUser = $DIC['ilUser'];
1896  $ilAccess = $DIC['ilAccess'];
1897 
1898  switch ($a_tab) {
1899 
1900  case 'settings':
1901  $this->tabs_gui->addSubTabTarget(
1902  "grp_settings",
1903  $this->ctrl->getLinkTarget($this, 'edit'),
1904  "edit",
1905  get_class($this)
1906  );
1907 
1908  $this->tabs_gui->addSubTabTarget(
1909  "grp_info_settings",
1910  $this->ctrl->getLinkTarget($this, 'editInfo'),
1911  "editInfo",
1912  get_class($this)
1913  );
1914 
1915  include_once("./Services/Maps/classes/class.ilMapUtil.php");
1916  if (ilMapUtil::isActivated()) {
1917  $this->tabs_gui->addSubTabTarget(
1918  "grp_map_settings",
1919  $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1920  "editMapSettings",
1921  get_class($this)
1922  );
1923  }
1924 
1925  $this->tabs_gui->addSubTabTarget(
1926  'groupings',
1927  $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1928  'listGroupings',
1929  get_class($this)
1930  );
1931 
1932  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1933  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1934  // only show if export permission is granted
1935  if (ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1936  $this->tabs_gui->addSubTabTarget(
1937  'grp_custom_user_fields',
1938  $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1939  '',
1940  'ilobjectcustomuserfieldsgui'
1941  );
1942  }
1943 
1944  // news settings
1945  if ($this->object->getUseNews()) {
1946  $this->tabs_gui->addSubTab(
1947  'obj_news_settings',
1948  $this->lng->txt("cont_news_settings"),
1949  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1950  );
1951  }
1952 
1953  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1954  if ($lti_settings->hasSettingsAccess()) {
1955  $this->tabs_gui->addSubTabTarget(
1956  'lti_provider',
1957  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1958  );
1959  }
1960 
1961  $this->tabs_gui->addSubTabTarget(
1962  "obj_multilinguality",
1963  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""),
1964  "",
1965  "ilobjecttranslationgui"
1966  );
1967 
1968 
1969  break;
1970 
1971 
1972  }
1973  }
GUI class for LTI provider object settings.
global $DIC
Definition: goto.php:24
static _hasFields($a_container_id)
Check if there are any define fields.
static isActivated()
Checks whether Map feature is activated.
static _getInstance()
Get instance of ilPrivacySettings.
$ilUser
Definition: imgupload.php:18
+ 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 1045 of file class.ilObjGroupGUI.php.

References $DIC, $ilUser, ilObjectGUI\$tree, ilObjectGUI\checkPermission(), ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, and ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER.

1046  {
1047  global $DIC;
1048 
1049  $ilUser = $DIC['ilUser'];
1050  $tree = $DIC['tree'];
1051  $ilCtrl = $DIC['ilCtrl'];
1052 
1053  $this->checkPermission('leave');
1054 
1055  $this->object->members_obj->delete($ilUser->getId());
1056 
1057  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1058  $this->object->members_obj->sendNotification(
1060  $ilUser->getId()
1061  );
1062  $this->object->members_obj->sendNotification(
1064  $ilUser->getId()
1065  );
1066 
1067  ilUtil::sendSuccess($this->lng->txt('grp_msg_membership_annulled'), true);
1068  $ilCtrl->setParameterByClass(
1069  "ilrepositorygui",
1070  "ref_id",
1071  $tree->getParentId($this->object->getRefId())
1072  );
1073  $ilCtrl->redirectByClass("ilrepositorygui", "");
1074  }
global $DIC
Definition: goto.php:24
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ updateGroupTypeObject()

ilObjGroupGUI::updateGroupTypeObject ( )

change group type

public

Parameters

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

References ilDidacticTemplateUtils\switchTemplate().

551  {
552  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateUtils.php';
554  $this->object->getRefId(),
555  (int) $_REQUEST['grp_type']
556  );
557 
558  ilUtil::sendSuccess($this->lng->txt('settings_saved'), true);
559  $this->ctrl->redirect($this, 'edit');
560  }
static switchTemplate($a_ref_id, $a_new_tpl_id)
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjGroupGUI::updateInfoObject ( )

update info

public

Returns

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

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

910  {
911  $this->checkPermission('manage_members');
912 
913  $this->object->setInformation(ilUtil::stripSlashes($_POST['important']));
914  $this->object->update();
915 
916  ilUtil::sendSuccess($this->lng->txt("settings_saved"));
917  $this->editInfoObject();
918  return true;
919  }
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 568 of file class.ilObjGroupGUI.php.

References $_POST, $DIC, $GLOBALS, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilObjectGUI\checkPermission(), ilObjectGUI\editObject(), ilLoggerFactory\getLogger(), ilObjectGUI\getObjectService(), getSubServices(), initForm(), language(), ilDidacticTemplateObjSettings\lookupTemplateId(), ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilUtil\sendQuestion(), ilUtil\stripSlashes(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

569  {
570  $obj_service = $this->getObjectService();
571 
572  $this->checkPermission('write');
573 
574  $form = $this->initForm();
575  if ($form->checkInput()) {
576  // handle group type settings
577  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';
578  $old_type = ilDidacticTemplateObjSettings::lookupTemplateId($this->object->getRefId());
579 
580  $modified = false;
581  $new_type_info = $form->getInput('didactic_type');
582  if ($new_type_info) {
583  $new_type = explode('_', $form->getInput('didactic_type'));
584  $new_type = $new_type[1];
585 
586  $modified = ($new_type != $old_type);
587  ilLoggerFactory::getLogger('grp')->info('Switched group type from ' . $old_type . ' to ' . $new_type);
588  }
589 
590  // Additional checks: both tile and session limitation activated (not supported)
591  if (
592  $form->getInput('sl') == "1" &&
593  $form->getInput('list_presentation') == "tile") {
594  $form->setValuesByPost();
595  ilUtil::sendFailure($this->lng->txt('crs_tile_and_session_limit_not_supported'));
596  return $this->editObject($form);
597  }
598 
599  $old_autofill = $this->object->hasWaitingListAutoFill();
600 
601  $this->object->setTitle(ilUtil::stripSlashes($form->getInput('title')));
602  $this->object->setDescription(ilUtil::stripSlashes($form->getInput('desc')));
603  $this->object->setGroupType(ilUtil::stripSlashes($form->getInput('grp_type')));
604  $this->object->setRegistrationType(ilUtil::stripSlashes($form->getInput('registration_type')));
605  $this->object->setPassword(ilUtil::stripSlashes($form->getInput('password')));
606  $this->object->enableUnlimitedRegistration((bool) !$form->getInput('reg_limit_time'));
607  $this->object->enableMembershipLimitation((bool) $form->getInput('registration_membership_limited'));
608  $this->object->setMinMembers((int) $form->getInput('registration_min_members'));
609  $this->object->setMaxMembers((int) $form->getInput('registration_max_members'));
610  $this->object->enableRegistrationAccessCode((bool) $form->getInput('reg_code_enabled'));
611  $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
612  $this->object->setViewMode($form->getInput('view_mode'));
613  $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
614  $this->object->setShowMembers((int) $form->getInput('show_members'));
615  $this->object->setAutoNotification((bool) $form->getInput('auto_notification'));
616 
617  // session limit
618  $this->object->enableSessionLimit((int) $form->getInput('sl'));
619  $session_sp = $form->getInput('sp');
620  $this->object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (int) $session_sp : -1);
621  $session_sn = $form->getInput('sn');
622  $this->object->setNumberOfnextSessions(is_numeric($session_sn) ? (int) $session_sn : -1);
623 
624  // period
625  $grp_period = $form->getItemByPostVar("period");
626 
627 
628  $this->object->setPeriod(
629  $grp_period->getStart(),
630  $grp_period->getEnd()
631  );
632 
633  $reg = $form->getItemByPostVar("reg");
634  if ($reg->getStart() instanceof ilDateTime && $reg->getEnd() instanceof ilDateTime) {
635  $this->object->enableUnlimitedRegistration(false);
636  } else {
637  $this->object->enableUnlimitedRegistration(true);
638  }
639 
640  $this->object->setRegistrationStart($reg->getStart());
641  $this->object->setRegistrationEnd($reg->getEnd());
642 
643  $cancel_end = $form->getItemByPostVar("cancel_end");
644  $this->object->setCancellationEnd($cancel_end->getDate());
645 
646  switch ((int) $_POST['waiting_list']) {
647  case 2:
648  $this->object->enableWaitingList(true);
649  $this->object->setWaitingListAutoFill(true);
650  break;
651 
652  case 1:
653  $this->object->enableWaitingList(true);
654  $this->object->setWaitingListAutoFill(false);
655  break;
656 
657  default:
658  $this->object->enableWaitingList(false);
659  $this->object->setWaitingListAutoFill(false);
660  break;
661  }
662 
663  // title icon visibility
664  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
665 
666  // top actions visibility
667  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
668 
669  // custom icon
670  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
671 
672  // tile image
673  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
674 
675  // list presentation
676  $this->saveListPresentation($form);
677 
678  // update object settings
679  $this->object->update();
680 
681 
682  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
684  $this->object->getId(),
685  $form,
686  $this->getSubServices()
687  );
688 
689  // Save sorting
690  $this->saveSortingSettings($form);
691  // if autofill has been activated trigger process
692  if (
693  !$old_autofill &&
694  $this->object->hasWaitingListAutoFill()) {
695  $this->object->handleAutoFill();
696  }
697 
698  // BEGIN ChangeEvents: Record update Object.
699  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
700  global $DIC;
701 
702  $ilUser = $DIC['ilUser'];
704  $this->object->getId(),
705  $ilUser->getId(),
706  'update'
707  );
708  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
709  // END PATCH ChangeEvents: Record update Object.
710  // Update ecs export settings
711  include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
712  $ecs = new ilECSGroupSettings($this->object);
713  $ecs->handleSettingsUpdate();
714  } else {
715  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input')); // #16975
716 
717  $form->setValuesByPost();
718  $this->editObject($form);
719  return true;
720  }
721 
722  // group type modified
723  if ($modified) {
724  if ($new_type == 0) {
725  $new_type_txt = $GLOBALS['DIC']['lng']->txt('il_grp_status_open');
726  } else {
727  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateSetting.php';
728  $dtpl = new ilDidacticTemplateSetting($new_type);
729  $new_type_txt = $dtpl->getPresentationTitle($GLOBALS['DIC']['lng']->getLangKey());
730  }
731 
732 
733  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
734  ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
735  $confirm = new ilConfirmationGUI();
736  $confirm->setFormAction($this->ctrl->getFormAction($this));
737  $confirm->addItem(
738  'grp_type',
739  $new_type,
740  $this->lng->txt('grp_info_new_grp_type') . ': ' . $new_type_txt
741  );
742  $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
743  $confirm->setCancel($this->lng->txt('cancel'), 'edit');
744 
745  $this->tpl->setContent($confirm->getHTML());
746  return true;
747  } else {
748  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
749  $this->ctrl->redirect($this, 'edit');
750  return true;
751  }
752  }
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
initForm($a_mode='edit', $a_omit_form_action=false)
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.
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
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.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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.
getObjectService()
Get object service.
$ilUser
Definition: imgupload.php:18
language()
Definition: language.php:2
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ viewObject()

ilObjGroupGUI::viewObject ( )

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

References $_GET, $DIC, $ilUser, ilContainerGUI\$rbacsystem, ilObjectGUI\$tree, ilMDUtils\_fillHTMLMetaTags(), ilLearningProgress\_tracProgress(), checkAgreement(), and renderObject().

Referenced by leaveObject().

391  {
392  global $DIC;
393 
394  $tree = $DIC['tree'];
395  $rbacsystem = $DIC['rbacsystem'];
396  $ilUser = $DIC['ilUser'];
397 
398  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
400  $ilUser->getId(),
401  $this->object->getId(),
402  $this->object->getRefId(),
403  'grp'
404  );
405 
407  $this->object->getId(),
408  $this->object->getId(),
409  'grp'
410  );
411 
412 
413  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
414  parent::viewObject();
415  return true;
416  }
417 
418  if (!$this->checkAgreement()) {
419  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
420  $this->tabs_gui->setTabActive('view_content');
421  $this->ctrl->setReturn($this, 'view');
422  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
423  $this->ctrl->setCmdClass(get_class($agreement));
424  $this->ctrl->forwardCommand($agreement);
425  return true;
426  }
427 
428  $this->tabs_gui->setTabActive('view_content');
429  $this->renderObject();
430  }
renderObject()
Render group.
$_GET["client_id"]
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
global $DIC
Definition: goto.php:24
checkAgreement()
Check agreement and redirect if it is not accepted.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $news

ilObjGroupGUI::$news
protected

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


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