ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjGroup Class Reference

Class ilObjGroup. More...

+ Inheritance diagram for ilObjGroup:
+ Collaboration diagram for ilObjGroup:

Public Member Functions

 __construct ($a_id=0, $a_call_by_reference=true)
 Constructor @access public. More...
 
 setInformation ($a_information)
 set information More...
 
 getInformation ()
 get Information More...
 
 setGroupType ($a_type)
 set group type More...
 
 getGroupType ()
 get group type More...
 
 setRegistrationType ($a_type)
 set registration type More...
 
 getRegistrationType ()
 get registration type More...
 
 isRegistrationEnabled ()
 is registration enabled More...
 
 enableUnlimitedRegistration ($a_status)
 enable unlimited registration More...
 
 isRegistrationUnlimited ()
 is registration unlimited More...
 
 setRegistrationStart ($a_start)
 set registration start More...
 
 getRegistrationStart ()
 get registration start More...
 
 setRegistrationEnd ($a_end)
 set registration end More...
 
 getRegistrationEnd ()
 get registration end More...
 
 setPassword ($a_pass)
 set password More...
 
 getPassword ()
 get password More...
 
 enableMembershipLimitation ($a_status)
 enable max member limitation More...
 
 isMembershipLimited ()
 is max member limited More...
 
 setMinMembers ($a_max)
 set min members More...
 
 getMinMembers ()
 get min members More...
 
 setMaxMembers ($a_max)
 set max members More...
 
 getMaxMembers ()
 get max members More...
 
 enableWaitingList ($a_status)
 enable waiting list More...
 
 isWaitingListEnabled ()
 is waiting list enabled More...
 
 setWaitingListAutoFill ($a_value)
 
 hasWaitingListAutoFill ()
 
 setLatitude ($a_latitude)
 Set Latitude. More...
 
 getLatitude ()
 Get Latitude. More...
 
 setLongitude ($a_longitude)
 Set Longitude. More...
 
 getLongitude ()
 Get Longitude. More...
 
 setLocationZoom ($a_locationzoom)
 Set LocationZoom. More...
 
 getLocationZoom ()
 Get LocationZoom. More...
 
 setEnableGroupMap ($a_enablemap)
 Set Enable Group Map. More...
 
 getEnableMap ()
 Type independent wrapper. More...
 
 getEnableGroupMap ()
 Get Enable Group Map. More...
 
 getRegistrationAccessCode ()
 get access code More...
 
 setRegistrationAccessCode ($a_code)
 Set refistration access code. More...
 
 isRegistrationAccessCodeEnabled ()
 Check if access code is enabled. More...
 
 enableRegistrationAccessCode ($a_status)
 En/disable registration access code. More...
 
 setMailToMembersType ($a_type)
 Set mail to members type. More...
 
 getMailToMembersType ()
 Get mail to members type. More...
 
 setCancellationEnd (ilDate $a_value=null)
 
 getCancellationEnd ()
 
 setShowMembers ($a_status)
 
 getShowMembers ()
 
 setAutoNotification (bool $a_status)
 
 getAutoNotification ()
 
 setPeriod (\ilDateTime $start=null, \ilDateTime $end=null)
 
 getStartTimeIndication ()
 
 getStart ()
 
 getEnd ()
 
 validate ()
 validate group settings More...
 
 create ()
 Create group. More...
 
 update ()
 Update group. More...
 
 delete ()
 delete group and all related data More...
 
 read ()
 Read group. More...
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone group (no member data) More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (crs items, preconditions) More...
 
 cloneAutoGeneratedRoles ($new_obj)
 Clone group admin and member role permissions. More...
 
 join ($a_user_id, $a_mem_role="")
 join Group, assigns user to role @access private More...
 
 getDefaultMemberRole ()
 returns object id of created default member role @access public More...
 
 getDefaultAdminRole ()
 returns object id of created default adminstrator role @access public More...
 
 addMember ($a_user_id, $a_mem_role)
 add Member to Group @access public More...
 
 leaveGroup ()
 is called when a member decides to leave group @access public More...
 
 leave ($a_user_id)
 deassign member from group role @access private More...
 
 getGroupMemberIds ()
 get all group Member ids regardless of role @access public More...
 
 getGroupMemberData ($a_mem_ids, $active=1)
 get all group Members regardless of group role. More...
 
 getCountMembers ()
 
 getGroupAdminIds ($a_grpId="")
 get Group Admin Id @access public More...
 
 getDefaultGroupRoles ($a_grp_id="")
 get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin @access public More...
 
 getLocalGroupRoles ($a_translate=false)
 get ALL local roles of group, also those created and defined afterwards only fetch data once from database. More...
 
 getGrpStatusClosedTemplateId ()
 get group status closed template @access public More...
 
 getGrpStatusOpenTemplateId ()
 get group status open template @access public More...
 
 updateGroupType ($a_group_type=GRP_TYPE_OPEN)
 Change group type. More...
 
 setGroupStatus ($a_status)
 Set group status. More...
 
 getGroupStatus ()
 get group status More...
 
 readGroupStatus ()
 Read group type. More...
 
 getMemberRoles ($a_user_id)
 get group member status @access public More...
 
 isAdmin ($a_userId)
 is Admin @access public More...
 
 initDefaultRoles ()
 init default roles settings @access public More...
 
 setParentRolePermissions ($a_parent_ref)
 This method is called before "initDefaultRoles". More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 _isMember ($a_user_id, $a_ref_id, $a_field='')
 
 _getMembers ($a_obj_id)
 
 getViewMode ()
 Get effective container view mode. More...
 
 setViewMode ($a_view_mode)
 Set group view mode. More...
 
 addAdditionalSubItemInformation (&$a_item_data)
 Add additional information to sub item, e.g. More...
 
 getMessage ()
 
 setMessage ($a_message)
 
 appendMessage ($a_message)
 
 getMembersObject ()
 Get members objects. More...
 
 register ($a_user_id, $a_role=IL_GRP_MEMBER, $a_force_registration=false)
 
 handleAutoFill ()
 
- Public Member Functions inherited from ilObject
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ()
 read object data from db into object More...
 
 getId ()
 get object id @access public More...
 
 setId ($a_id)
 set object id @access public More...
 
 setRefId ($a_id)
 set reference id @access public More...
 
 getRefId ()
 get reference id @access public More...
 
 getType ()
 get object type @access public More...
 
 setType ($a_type)
 set object type @access public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title @access public More...
 
 getUntranslatedTitle ()
 get untranslated object title @access public More...
 
 setTitle ($a_title)
 set object title More...
 
 getDescription ()
 get object description More...
 
 setDescription ($a_desc)
 set object description More...
 
 getLongDescription ()
 get object long description (stored in object_description) More...
 
 getImportId ()
 get import id More...
 
 setImportId ($a_import_id)
 set import id More...
 
 setOfflineStatus ($a_status)
 Set offline status. More...
 
 getOfflineStatus ()
 Get offline status. More...
 
 supportsOfflineHandling ()
 Check whether object supports offline handling. More...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date @access public More...
 
 getLastUpdateDate ()
 get last update date @access public More...
 
 getDiskUsage ()
 Gets the disk usage of the object in bytes. More...
 
 create ()
 create More...
 
 update ()
 update object in db More...
 
 MDUpdateListener ($a_element)
 Meta data update listener. More...
 
 createMetaData ()
 create meta data entry More...
 
 updateMetaData ()
 update meta data entry More...
 
 deleteMetaData ()
 delete meta data entry More...
 
 updateOwner ()
 update owner of object in db More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!? More...
 
 setPermissions ($a_parent_ref)
 set permissions of object More...
 
 setParentRolePermissions ($a_parent_ref)
 Initialize the permissions of parent roles (local roles of categories, global roles...) This method is overwritten in e.g courses, groups for building permission intersections with non_member templates. More...
 
 createReference ()
 creates reference for object More...
 
 countReferences ()
 count references of object More...
 
 initDefaultRoles ()
 init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) @access public More...
 
 applyDidacticTemplate ($a_tpl_id)
 Apply template. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 appendCopyInfo ($a_target_id, $a_copy_id)
 Prepend Copy info if object with same name exists in that container. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies. More...
 
 cloneMetaData ($target_obj)
 Copy meta data. More...
 
 getPossibleSubObjects ($a_filter=true)
 get all possible subobjects of this type the object can decide which types of subobjects are possible jut in time overwrite if the decision distinguish from standard model More...
 
- Public Member Functions inherited from ilContainer
 __construct ($a_id=0, $a_reference=true)
 Constructor @access public. More...
 
 getObjectTranslation ()
 Get object translation. More...
 
 setObjectTranslation (ilObjectTranslation $obj_trans)
 Get object translation. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 setHiddenFilesFound ($a_hiddenfilesfound)
 Set Found hidden files (set by getSubItems). More...
 
 getHiddenFilesFound ()
 Get Found hidden files (set by getSubItems). More...
 
 getStyleSheetId ()
 get ID of assigned style sheet object More...
 
 setStyleSheetId ($a_style_id)
 set ID of assigned style sheet object More...
 
 setNewsTimeline ($a_val)
 Set news timeline. More...
 
 getNewsTimeline ()
 Get news timeline. More...
 
 setNewsTimelineAutoEntries ($a_val)
 Set news timeline auto entries. More...
 
 getNewsTimelineAutoEntries ()
 Get news timeline auto entries. More...
 
 setNewsTimelineLandingPage ($a_val)
 Set news timline is landing page. More...
 
 getNewsTimelineLandingPage ()
 Get news timline is landing page. More...
 
 isNewsTimelineEffective ()
 Is news timeline effective? More...
 
 isNewsTimelineLandingPageEffective ()
 Is news timeline landing page effective? More...
 
 setNewsBlockActivated ($a_val)
 Set news block activated. More...
 
 getNewsBlockActivated ()
 Get news block activated. More...
 
 setUseNews ($a_val)
 Set use news. More...
 
 getUseNews ()
 Get use news. More...
 
 cloneDependencies ($a_target_id, $a_copy_id)
 Clone object dependencies (container sorting) More...
 
 cloneAllObject ($session_id, $client_id, $new_type, $ref_id, $clone_source, $options, $soap_call=false, $a_submode=1)
 clone all objects according to this container More...
 
 delete ()
 delete category and all related data More...
 
 getViewMode ()
 Get container view mode. More...
 
 getOrderType ()
 Get order type default implementation. More...
 
 setOrderType ($a_value)
 
 isClassificationFilterActive ()
 Is classification filter active? More...
 
 filteredSubtree ()
 Note grp/crs currently allow to filter in their whole subtrees Catetories only their direct childs. More...
 
 getSubItems ( $a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0, \ilContainerUserFilter $container_user_filter=null)
 Get subitems of container. More...
 
 gotItems ()
 Check whether we got any items. More...
 
 addAdditionalSubItemInformation (&$object)
 Add additional information to sub item, e.g. More...
 
 getGroupedObjTypes ()
 Get grouped repository object types. More...
 
 enablePageEditing ()
 Check whether page editing is allowed for container. More...
 
 create ()
 Create. More...
 
 putInTree ($a_parent_ref)
 maybe this method should be in tree object!?
Todo:
role/rbac stuff
Parameters
int$a_parent_refRef-ID of the parent object
More...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. More...
 
 removeTranslations ()
 Remove all translations of container. More...
 
 deleteTranslation ($a_lang)
 Delete translation. More...
 
 addTranslation ($a_title, $a_desc, $a_lang, $a_lang_default)
 Add translation. More...
 
- Public Member Functions inherited from ilMembershipRegistrationCodes
 register ($a_user_id)
 Register an user. More...
 

Static Public Member Functions

static lookupGroupTye ($a_id)
 Lookup group type. More...
 
static lookupGroupStatusTemplateId ($a_obj_id)
 @global $ilDB $ilDB More...
 
static _lookupIdByTitle ($a_title)
 
static lookupViewMode ($a_obj_id)
 lookup view mode @global $ilDB More...
 
static translateViewMode ($a_obj_id, $a_view_mode, $a_ref_id=null)
 translate view mode More...
 
static lookupObjectsByCode ($a_code)
 
static mayLeave ($a_group_id, $a_user_id=null, &$a_date=null)
 
static findGroupsWithNotEnoughMembers ()
 Minimum members check @global $ilDB $ilDB. More...
 
static lookupShowMembersEnabled (int $a_obj_id)
 
- Static Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
static _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static lookupOfflineStatus ($a_obj_id)
 Lookup offline status using objectDataCache. More...
 
static _lookupOwner ($a_id)
 lookup object owner More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
static _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
static _lookupObjId ($a_id)
 
static _setDeletedDate ($a_ref_id, $a_deleted_by)
 
static setDeletedDates ($a_ref_ids, $a_user_id)
 Set deleted date. More...
 
static _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
static _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
static _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
static _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
static _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id More...
 
static _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type More...
 
static _exists ($a_id, $a_reference=false, $a_type=null)
 checks if an object exists in object_data@access public More...
 
static _getObjectsByType ($a_obj_type="", $a_owner="")
 Get objects by type. More...
 
static _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true)
 Prepare copy wizard object selection. More...
 
static collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0)
 Collect deletion dependencies. More...
 
static getDeletionDependencies ($a_obj_id)
 Get deletion dependencies. More...
 
static getLongDescriptions (array $a_obj_ids)
 Get long description data. More...
 
static getAllOwnedRepositoryObjects ($a_user_id)
 Get all ids of objects user owns. More...
 
static fixMissingTitles ($a_type, array &$a_obj_title_map)
 Try to fix missing object titles. More...
 
static _lookupCreationDate ($a_id)
 Lookup creation date. More...
 
static hasAutoRating ($a_type, $a_ref_id)
 Check if auto rating is active for parent group/course. More...
 
- Static Public Member Functions inherited from ilContainer
static _getContainerDirectory ($a_id)
 Get the container directory. More...
 
static _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=null)
 Lookup a container setting. More...
 
static _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
static _getContainerSettings ($a_id)
 
static _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, $a_obj_id)
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More...
 
static lookupObjectsByCode ($a_code)
 Lookup all objects with reg_access_code enabled and. More...
 

Data Fields

const CAL_REG_START = 1
 
const CAL_REG_END = 2
 
const CAL_START = 3
 
const CAL_END = 4
 
const GRP_MEMBER = 1
 
const GRP_ADMIN = 2
 
const ERR_MISSING_TITLE = 'msg_no_title'
 
const ERR_MISSING_GROUP_TYPE = 'grp_missing_grp_type'
 
const ERR_MISSING_PASSWORD = 'grp_missing_password'
 
const ERR_WRONG_MAX_MEMBERS = 'grp_wrong_max_members'
 
const ERR_WRONG_REG_TIME_LIMIT = 'grp_wrong_reg_time_limit'
 
const ERR_MISSING_MIN_MAX_MEMBERS = 'grp_wrong_min_max_members'
 
const ERR_WRONG_MIN_MAX_MEMBERS = 'grp_max_and_min_members_invalid'
 
const ERR_WRONG_REGISTRATION_LIMITED = 'grp_err_registration_limited'
 
const MAIL_ALLOWED_ALL = 1
 
const MAIL_ALLOWED_TUTORS = 2
 
 $SHOW_MEMBERS_ENABLED = 1
 
 $SHOW_MEMBERS_DISABLED = 0
 
 $members_obj
 
 $file_obj = null
 Group file object for handling of export files. More...
 
 $m_grpStatus
 
 $m_roleMemberId
 
 $m_roleAdminId
 
- Data Fields inherited from ilObject
const TITLE_LENGTH = 255
 max length of object title More...
 
const DESC_LENGTH = 128
 
 $lng
 
 $id
 
 $ref_id
 
 $type
 
 $title
 
 $untranslatedTitle
 
 $desc
 
 $long_desc
 
 $owner
 
 $create_date
 
 $last_update
 
 $import_id
 
 $register = false
 
 $referenced
 
 $objectList
 
 $max_title
 
 $max_desc
 
 $add_dots
 
- Data Fields inherited from ilContainer
const VIEW_SESSIONS = 0
 
const VIEW_OBJECTIVE = 1
 
const VIEW_TIMING = 2
 
const VIEW_ARCHIVE = 3
 
const VIEW_SIMPLE = 4
 
const VIEW_BY_TYPE = 5
 
const VIEW_INHERIT = 6
 
const VIEW_DEFAULT = self::VIEW_BY_TYPE
 
const SORT_TITLE = 0
 
const SORT_MANUAL = 1
 
const SORT_ACTIVATION = 2
 
const SORT_INHERIT = 3
 
const SORT_CREATION = 4
 
const SORT_DIRECTION_ASC = 0
 
const SORT_DIRECTION_DESC = 1
 
const SORT_NEW_ITEMS_POSITION_TOP = 0
 
const SORT_NEW_ITEMS_POSITION_BOTTOM = 1
 
const SORT_NEW_ITEMS_ORDER_TITLE = 0
 
const SORT_NEW_ITEMS_ORDER_CREATION = 1
 
const SORT_NEW_ITEMS_ORDER_ACTIVATION = 2
 

Protected Member Functions

 toggleStartTimeIndication (bool $time_indication)
 
 setStart (ilDateTime $a_value=null)
 
 setEnd (ilDateTime $a_value=null)
 
 prepareAppointments ($a_mode='create')
 Prepare calendar appointments. More...
 
 initParticipants ()
 init participants object More...
 
- Protected Member Functions inherited from ilContainer
 getInitialSubitems ()
 Get initial subitems. More...
 
 applyContainerUserFilter ($objects, ilContainerUserFilter $container_user_filter=null)
 Apply container user filter on objects. More...
 
 legacyOnlineFilter ($obj_ids, $objects, $val)
 Legacy online filter. More...
 

Protected Attributes

 $information
 
 $group_type = null
 
 $reg_type = GRP_REGISTRATION_DIRECT
 
 $reg_enabled = true
 
 $reg_unlimited = true
 
 $reg_start = null
 
 $reg_end = null
 
 $reg_password = ''
 
 $reg_membership_limitation = false
 
 $reg_min_members = 0
 
 $reg_max_members = 0
 
 $waiting_list = false
 
 $auto_fill_from_waiting
 
 $leave_end
 
 $show_members = 1
 
 $auto_notification = true
 
 $grp_start_time_indication = false
 
 $start = null
 
 $end = null
 
- Protected Attributes inherited from ilObject
 $objDefinition
 
 $db
 
 $log
 
 $error
 
 $tree
 
 $app_event_handler
 
 $rbacadmin
 
 $rbacreview
 
- Protected Attributes inherited from ilContainer
 $db
 
 $log
 
 $access
 
 $error
 
 $rbacsystem
 
 $tree
 
 $user
 
 $obj_definition
 
 $order_type = 0
 
 $hiddenfilesfound = false
 
 $news_timeline = false
 
 $news_timeline_auto_entries = false
 
 $setting
 
 $obj_trans = null
 
 $recommended_content_manager
 

Private Attributes

 $latitude = ''
 
 $longitude = ''
 
 $locationzoom = 0
 
 $enablemap = 0
 
 $reg_access_code = ''
 
 $reg_access_code_enabled = false
 
 $view_mode = ilContainer::VIEW_DEFAULT
 
 $mail_members = self::MAIL_ALLOWED_ALL
 

Additional Inherited Members

- Static Public Attributes inherited from ilContainer
static $data_preloaded = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjGroup::__construct (   $a_id = 0,
  $a_call_by_reference = true 
)

Constructor @access public.

Parameters
integerreference_id or object_id
booleantreat the id as reference_id (true) or object_id (false)

Reimplemented from ilContainer.

Definition at line 132 of file class.ilObjGroup.php.

133 {
134 global $DIC;
135
136 $tree = $DIC['tree'];
137
138 $this->tree = &$tree;
139
140 $this->type = "grp";
141 parent::__construct($a_id, $a_call_by_reference);
142 $this->setRegisterMode(true); // ???
143 }
setRegisterMode($a_bool)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ilContainer\$tree, ILIAS\GlobalScreen\Provider\__construct(), and ilObject\setRegisterMode().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getMembers()

ilObjGroup::_getMembers (   $a_obj_id)

Definition at line 1718 of file class.ilObjGroup.php.

1719 {
1720 global $DIC;
1721
1722 $rbacreview = $DIC['rbacreview'];
1723
1724 // get reference
1725 $ref_ids = ilObject::_getAllReferences($a_obj_id);
1726 $ref_id = current($ref_ids);
1727
1728 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
1729
1730 $users = array();
1731 foreach ($local_roles as $role_id) {
1732 $users = array_merge($users, $rbacreview->assignedUsers($role_id));
1733 }
1734
1735 return array_unique($users);
1736 }
static _getAllReferences($a_id)
get all reference ids of object

References $DIC, ilObject\$rbacreview, ilObject\$ref_id, and ilObject\_getAllReferences().

Referenced by _isMember().

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

◆ _isMember()

ilObjGroup::_isMember (   $a_user_id,
  $a_ref_id,
  $a_field = '' 
)

Definition at line 1669 of file class.ilObjGroup.php.

1670 {
1671 global $DIC;
1672
1673 $rbacreview = $DIC['rbacreview'];
1674 $ilObjDataCache = $DIC['ilObjDataCache'];
1675 $ilDB = $DIC['ilDB'];
1676
1677 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
1678 $user_roles = $rbacreview->assignedRoles($a_user_id);
1679
1680 // Used for membership limitations -> check membership by given field
1681 if ($a_field) {
1682 include_once './Services/User/classes/class.ilObjUser.php';
1683
1684 $tmp_user = &ilObjectFactory::getInstanceByObjId($a_user_id);
1685 switch ($a_field) {
1686 case 'login':
1687 $and = "AND login = '" . $tmp_user->getLogin() . "' ";
1688 break;
1689 case 'email':
1690 $and = "AND email = '" . $tmp_user->getEmail() . "' ";
1691 break;
1692 case 'matriculation':
1693 $and = "AND matriculation = '" . $tmp_user->getMatriculation() . "' ";
1694 break;
1695
1696 default:
1697 $and = "AND usr_id = '" . $a_user_id . "'";
1698 break;
1699 }
1700 if (!$members = ilObjGroup::_getMembers($ilObjDataCache->lookupObjId($a_ref_id))) {
1701 return false;
1702 }
1703 $query = "SELECT * FROM usr_data as ud " .
1704 "WHERE usr_id IN (" . implode(",", ilUtil::quoteArray($members)) . ") " .
1705 $and;
1706 $res = $ilDB->query($query);
1707
1708 return $res->numRows() ? true : false;
1709 }
1710
1711 if (!array_intersect($local_roles, $user_roles)) {
1712 return false;
1713 }
1714
1715 return true;
1716 }
_getMembers($a_obj_id)
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $query, ilObject\$rbacreview, $res, _getMembers(), ilObjectFactory\getInstanceByObjId(), and ilUtil\quoteArray().

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

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

◆ _lookupIdByTitle()

static ilObjGroup::_lookupIdByTitle (   $a_title)
static

Definition at line 1653 of file class.ilObjGroup.php.

1654 {
1655 global $DIC;
1656
1657 $ilDB = $DIC['ilDB'];
1658
1659 $query = "SELECT * FROM object_data WHERE title = " .
1660 $ilDB->quote($a_title, 'text') . " AND type = 'grp'";
1661 $res = $ilDB->query($query);
1662 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1663 return $row->obj_id;
1664 }
1665 return 0;
1666 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMailAddressTypeHelperImpl\getGroupObjIdByTitle().

+ Here is the caller graph for this function:

◆ addAdditionalSubItemInformation()

ilObjGroup::addAdditionalSubItemInformation ( $a_item_data)

Add additional information to sub item, e.g.

used in courses for timings information etc.

Reimplemented from ilContainer.

Definition at line 1846 of file class.ilObjGroup.php.

1847 {
1848 include_once './Services/Object/classes/class.ilObjectActivation.php';
1850 }
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.

References ilObjectActivation\addAdditionalSubItemInformation().

+ Here is the call graph for this function:

◆ addMember()

ilObjGroup::addMember (   $a_user_id,
  $a_mem_role 
)

add Member to Group @access public

Parameters
integeruser_id
integermember role_id of local group_role

Definition at line 1149 of file class.ilObjGroup.php.

1150 {
1151 global $DIC;
1152
1153 $rbacadmin = $DIC['rbacadmin'];
1154
1155 if (isset($a_user_id) && isset($a_mem_role)) {
1156 $this->join($a_user_id, $a_mem_role);
1157 return true;
1158 } else {
1159 $this->ilias->raiseError(get_class($this) . "::addMember(): Missing parameters !", $this->ilias->error_obj->WARNING);
1160 return false;
1161 }
1162 }
join($a_user_id, $a_mem_role="")
join Group, assigns user to role @access private
redirection script todo: (a better solution should control the processing via a xml file)

References $DIC, ilObject\$rbacadmin, and join().

+ Here is the call graph for this function:

◆ appendMessage()

ilObjGroup::appendMessage (   $a_message)

Definition at line 1860 of file class.ilObjGroup.php.

1861 {
1862 if ($this->getMessage()) {
1863 $this->message .= "<br /> ";
1864 }
1865 $this->message .= $a_message;
1866 }

References getMessage().

+ Here is the call graph for this function:

◆ applyDidacticTemplate()

ilObjGroup::applyDidacticTemplate (   $a_tpl_id)

Apply template.

Parameters
int$a_tpl_id

Reimplemented from ilObject.

Definition at line 1642 of file class.ilObjGroup.php.

1643 {
1644 parent::applyDidacticTemplate($a_tpl_id);
1645
1646 if (!$a_tpl_id) {
1647 // init default type
1648 $this->setParentRolePermissions($this->getRefId());
1649 }
1650 }
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
getRefId()
get reference id @access public

References ilObject\getRefId(), and setParentRolePermissions().

Referenced by updateGroupType().

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

◆ cloneAutoGeneratedRoles()

ilObjGroup::cloneAutoGeneratedRoles (   $new_obj)

Clone group admin and member role permissions.

@access public

Parameters
objectnew group object

Definition at line 1074 of file class.ilObjGroup.php.

1075 {
1076 global $DIC;
1077
1078 $rbacadmin = $DIC['rbacadmin'];
1079 $rbacreview = $DIC['rbacreview'];
1080
1081 $admin = $this->getDefaultAdminRole();
1082 $new_admin = $new_obj->getDefaultAdminRole();
1083 if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
1084 ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_admin');
1085 }
1086 $rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
1087 ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_admin.');
1088
1089 $member = $this->getDefaultMemberRole();
1090 $new_member = $new_obj->getDefaultMemberRole();
1091 if (!$member || !$new_member) {
1092 ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_member');
1093 }
1094 $rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
1095 ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_member.');
1096 }
static getLogger($a_component_id)
Get component logger.
getDefaultAdminRole()
returns object id of created default adminstrator role @access public
getDefaultMemberRole()
returns object id of created default member role @access public

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, getDefaultAdminRole(), getDefaultMemberRole(), ilLoggerFactory\getLogger(), and ilObject\getRefId().

Referenced by cloneObject().

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

◆ cloneDependencies()

ilObjGroup::cloneDependencies (   $a_target_id,
  $a_copy_id 
)

Clone object dependencies (crs items, preconditions)

@access public

Parameters
inttarget ref id of new course
intcopy id

Reimplemented from ilContainer.

Definition at line 1046 of file class.ilObjGroup.php.

1047 {
1048 global $DIC;
1049
1050 $tree = $DIC['tree'];
1051
1052 parent::cloneDependencies($a_target_id, $a_copy_id);
1053
1054 include_once('Services/Object/classes/class.ilObjectActivation.php');
1055 ilObjectActivation::cloneDependencies($this->getRefId(), $a_target_id, $a_copy_id);
1056
1057 // clone membership limitation
1058 foreach (\ilObjCourseGrouping::_getGroupings($this->getId()) as $grouping_id) {
1059 \ilLoggerFactory::getLogger('grp')->info('Handling grouping id: ' . $grouping_id);
1060 $grouping = new \ilObjCourseGrouping($grouping_id);
1061 $grouping->cloneGrouping($a_target_id, $a_copy_id);
1062 }
1063
1064 return true;
1065 }
static _getGroupings($a_course_id)
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
getId()
get object id @access public

References $DIC, ilContainer\$tree, ilObjCourseGrouping\_getGroupings(), ilObjectActivation\cloneDependencies(), ilObject\getId(), ilLoggerFactory\getLogger(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ cloneObject()

ilObjGroup::cloneObject (   $a_target_id,
  $a_copy_id = 0,
  $a_omit_tree = false 
)

Clone group (no member data)

@access public

Parameters
inttarget ref_id
intcopy id

Definition at line 972 of file class.ilObjGroup.php.

973 {
974 global $DIC;
975
976 $ilDB = $DIC['ilDB'];
977 $ilUser = $DIC['ilUser'];
978 $ilSetting = $DIC['ilSetting'];
979
980 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
981
982 // current template
983 $current_template = ilDidacticTemplateObjSettings::lookupTemplateId($this->getRefId());
984 $new_obj->applyDidacticTemplate($current_template);
985 $this->cloneAutoGeneratedRoles($new_obj);
986 $this->cloneMetaData($new_obj);
987
988 $new_obj->setRegistrationType($this->getRegistrationType());
989 $new_obj->setInformation($this->getInformation());
990 $new_obj->setRegistrationStart($this->getRegistrationStart());
991 $new_obj->setRegistrationEnd($this->getRegistrationEnd());
992 $new_obj->enableUnlimitedRegistration($this->isRegistrationUnlimited());
993 $new_obj->setPassword($this->getPassword());
994 $new_obj->enableMembershipLimitation($this->isMembershipLimited());
995 $new_obj->setMaxMembers($this->getMaxMembers());
996 $new_obj->enableWaitingList($this->isWaitingListEnabled());
997 $new_obj->setShowMembers($this->getShowMembers());
998
999 // map
1000 $new_obj->setLatitude($this->getLatitude());
1001 $new_obj->setLongitude($this->getLongitude());
1002 $new_obj->setLocationZoom($this->getLocationZoom());
1003 $new_obj->setEnableGroupMap($this->getEnableGroupMap());
1004 $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
1005 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1006 $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1007
1008 $new_obj->setViewMode($this->view_mode);
1009 $new_obj->setMailToMembersType($this->getMailToMembersType());
1010
1011 $new_obj->setCancellationEnd($this->getCancellationEnd());
1012 $new_obj->setMinMembers($this->getMinMembers());
1013 $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
1014 $new_obj->setPeriod($this->getStart(), $this->getEnd());
1015 $new_obj->setAutoNotification($this->getAutoNotification());
1016 $new_obj->update();
1017
1018 // #13008 - Group Defined Fields
1019 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1020 ilCourseDefinedFieldDefinition::_clone($this->getId(), $new_obj->getId());
1021
1022 // Assign user as admin
1023 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1024 $part = ilGroupParticipants::_getInstanceByObjId($new_obj->getId());
1025 $part->add($ilUser->getId(), IL_GRP_ADMIN);
1026 $part->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
1027 $part->updateContact($ilUser->getId(), true);
1028
1029 // Copy learning progress settings
1030 include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
1031 $obj_settings = new ilLPObjSettings($this->getId());
1032 $obj_settings->cloneSettings($new_obj->getId());
1033 unset($obj_settings);
1034
1035 return $new_obj;
1036 }
const IL_GRP_ADMIN
static _clone($a_source_id, $a_target_id)
Clone fields.
static lookupTemplateId($a_ref_id)
Lookup template id @global ilDB $ilDB.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
static generateCode()
Generate new registration key.
getInformation()
get Information
getLocationZoom()
Get LocationZoom.
getLongitude()
Get Longitude.
getPassword()
get password
getMinMembers()
get min members
getRegistrationStart()
get registration start
getRegistrationType()
get registration type
getMaxMembers()
get max members
isMembershipLimited()
is max member limited
cloneAutoGeneratedRoles($new_obj)
Clone group admin and member role permissions.
getRegistrationEnd()
get registration end
isRegistrationUnlimited()
is registration unlimited
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
getLatitude()
Get Latitude.
getMailToMembersType()
Get mail to members type.
getEnableGroupMap()
Get Enable Group Map.
isWaitingListEnabled()
is waiting list enabled
cloneMetaData($target_obj)
Copy meta data.
global $ilSetting
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18

References $DIC, $ilDB, $ilSetting, $ilUser, ilCourseDefinedFieldDefinition\_clone(), ilGroupParticipants\_getInstanceByObjId(), cloneAutoGeneratedRoles(), ilObject\cloneMetaData(), ilMembershipRegistrationCodeUtils\generateCode(), getAutoNotification(), getCancellationEnd(), getEnableGroupMap(), getEnd(), ilObject\getId(), getInformation(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getMaxMembers(), getMinMembers(), getPassword(), ilObject\getRefId(), getRegistrationEnd(), getRegistrationStart(), getRegistrationType(), getShowMembers(), getStart(), hasWaitingListAutoFill(), IL_GRP_ADMIN, isMembershipLimited(), isRegistrationAccessCodeEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), and ilDidacticTemplateObjSettings\lookupTemplateId().

+ Here is the call graph for this function:

◆ create()

ilObjGroup::create ( )

Create group.

Reimplemented from ilContainer.

Definition at line 748 of file class.ilObjGroup.php.

749 {
750 global $DIC;
751
752 $ilDB = $DIC['ilDB'];
753 $ilAppEventHandler = $DIC['ilAppEventHandler'];
754
755 if (!parent::create()) {
756 return false;
757 }
758
759 if (!$a_upload) {
760 $this->createMetaData();
761 }
762
763
764 $query = "INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
765 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
766 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
767 "leave_end,registration_min_members,auto_wait, grp_start, grp_end, auto_notification) " .
768 "VALUES(" .
769 $ilDB->quote($this->getId(), 'integer') . ", " .
770 $ilDB->quote($this->getInformation(), 'text') . ", " .
771 $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
772 $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
773 $ilDB->quote(($this->isRegistrationEnabled() ? 1 : 0), 'integer') . ", " .
774 $ilDB->quote(($this->isRegistrationUnlimited() ? 1 : 0), 'integer') . ", " .
775 $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
776 $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
777 $ilDB->quote($this->getPassword(), 'text') . ", " .
778 $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
779 $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
780 $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
781 $ilDB->quote($this->getLatitude(), 'text') . ", " .
782 $ilDB->quote($this->getLongitude(), 'text') . ", " .
783 $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
784 $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
785 $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
786 $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
787 $ilDB->quote($this->view_mode, 'integer') . ', ' .
788 $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
789 $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
790 $ilDB->quote($this->getMinMembers(), 'integer') . ', ' .
791 $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ', ' .
792 $ilDB->quote($this->getStart() instanceof ilDate ? $this->getStart()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
793 $ilDB->quote($this->getEnd() instanceof ilDate ? $this->getEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
794 $ilDB->quote($this->getAutoNotification(), \ilDBConstants::T_INTEGER) . ' ' .
795 ")";
796 $res = $ilDB->manipulate($query);
797
798 $ilAppEventHandler->raise(
799 'Modules/Group',
800 'create',
801 array('object' => $this,
802 'obj_id' => $this->getId(),
803 'appointments' => $this->prepareAppointments('create'))
804 );
805
806 return $this->getId();
807 }
const IL_CAL_UNIX
const IL_CAL_DATETIME
Class for single dates.
getGroupType()
get group type
getRegistrationAccessCode()
get access code
isRegistrationEnabled()
is registration enabled
prepareAppointments($a_mode='create')
Prepare calendar appointments.
createMetaData()
create meta data entry

References $DIC, $ilDB, $query, $res, ilObject\createMetaData(), getAutoNotification(), getCancellationEnd(), getEnableGroupMap(), getEnd(), getGroupType(), ilObject\getId(), getInformation(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getMaxMembers(), getMinMembers(), getPassword(), getRegistrationAccessCode(), getRegistrationEnd(), getRegistrationStart(), getRegistrationType(), getStart(), hasWaitingListAutoFill(), IL_CAL_DATETIME, IL_CAL_UNIX, isMembershipLimited(), isRegistrationAccessCodeEnabled(), isRegistrationEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), prepareAppointments(), and ilDBConstants\T_INTEGER.

+ Here is the call graph for this function:

◆ delete()

ilObjGroup::delete ( )

delete group and all related data

@access public

Returns
boolean true if all object data were removed; false if only a references were removed

Reimplemented from ilContainer.

Definition at line 873 of file class.ilObjGroup.php.

874 {
875 global $DIC;
876
877 $ilDB = $DIC['ilDB'];
878 $ilAppEventHandler = $DIC['ilAppEventHandler'];
879
880 // always call parent delete function first!!
881 if (!parent::delete()) {
882 return false;
883 }
884
885 $query = "DELETE FROM grp_settings " .
886 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
887 $res = $ilDB->manipulate($query);
888
889 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
891
892 $ilAppEventHandler->raise(
893 'Modules/Group',
894 'delete',
895 array('object' => $this,
896 'obj_id' => $this->getId(),
897 'appointments' => $this->prepareAppointments('delete'))
898 );
899
900
901 return true;
902 }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.

References $DIC, $ilDB, $query, $res, ilParticipants\_deleteAllEntries(), ilObject\getId(), and prepareAppointments().

+ Here is the call graph for this function:

◆ enableMembershipLimitation()

ilObjGroup::enableMembershipLimitation (   $a_status)

enable max member limitation

@access public

Parameters
boolstatus
Returns

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

346 {
347 $this->reg_membership_limitation = $a_status;
348 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableRegistrationAccessCode()

ilObjGroup::enableRegistrationAccessCode (   $a_status)

En/disable registration access code.

Parameters
object$a_status
Returns

Definition at line 561 of file class.ilObjGroup.php.

562 {
563 $this->reg_access_code_enabled = $a_status;
564 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableUnlimitedRegistration()

ilObjGroup::enableUnlimitedRegistration (   $a_status)

enable unlimited registration

@access public

Parameters
bool
Returns

Definition at line 253 of file class.ilObjGroup.php.

254 {
255 $this->reg_unlimited = $a_status;
256 }

Referenced by read().

+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjGroup::enableWaitingList (   $a_status)

enable waiting list

@access public

Parameters
bool
Returns

Definition at line 412 of file class.ilObjGroup.php.

413 {
414 $this->waiting_list = $a_status;
415 }

Referenced by read().

+ Here is the caller graph for this function:

◆ findGroupsWithNotEnoughMembers()

static ilObjGroup::findGroupsWithNotEnoughMembers ( )
static

Minimum members check @global $ilDB $ilDB.

Returns
array

Definition at line 2119 of file class.ilObjGroup.php.

2120 {
2121 $ilDB = $GLOBALS['DIC']->database();
2122 $tree = $GLOBALS['DIC']->repositoryTree();
2123
2124 $res = array();
2125
2126 $now = date("Y-m-d H:i:s");
2127
2128 $before = new ilDateTime(time(), IL_CAL_UNIX);
2129 $before->increment(IL_CAL_DAY, -1);
2130 $now_date = $before->get(IL_CAL_DATETIME);
2131 $now = $before->get(IL_CAL_UNIX);
2132
2133 $set = $ilDB->query($q = "SELECT obj_id, registration_min_members" .
2134 " FROM grp_settings" .
2135 " WHERE registration_min_members > " . $ilDB->quote(0, "integer") .
2136 " AND registration_mem_limit = " . $ilDB->quote(1, "integer") . // #17206
2137 " AND ((leave_end IS NOT NULL" .
2138 " AND leave_end < " . $ilDB->quote($now, "integer") . ")" .
2139 " OR (leave_end IS NULL" .
2140 " AND registration_end IS NOT NULL" .
2141 " AND registration_end < " . $ilDB->quote($now_date, "text") . "))" .
2142 " AND (period_start IS NULL OR period_start > " . $ilDB->quote($now, "integer") . ")");
2143 while ($row = $ilDB->fetchAssoc($set)) {
2144 $refs = ilObject::_getAllReferences($row['obj_id']);
2145 $ref = end($refs);
2146
2147 if ($tree->isDeleted($ref)) {
2148 continue;
2149 }
2150
2151 $part = new ilGroupParticipants($row["obj_id"]);
2152 $reci = $part->getNotificationRecipients();
2153 if (sizeof($reci)) {
2154 $missing = (int) $row["registration_min_members"] - $part->getCountMembers();
2155 if ($missing > 0) {
2156 $res[$row["obj_id"]] = array($missing, $reci);
2157 }
2158 }
2159 }
2160
2161 return $res;
2162 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
const IL_CAL_DAY
@classDescription Date and time handling

References $GLOBALS, $ilDB, $res, ilContainer\$tree, ilObject\_getAllReferences(), IL_CAL_DATETIME, IL_CAL_DAY, and IL_CAL_UNIX.

Referenced by ilMembershipCronMinMembers\getGroups().

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

◆ getAutoNotification()

ilObjGroup::getAutoNotification ( )
Returns
bool|null

Definition at line 615 of file class.ilObjGroup.php.

615 : ?bool
616 {
618 }

References $auto_notification.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getCancellationEnd()

ilObjGroup::getCancellationEnd ( )

Definition at line 590 of file class.ilObjGroup.php.

591 {
592 return $this->leave_end;
593 }

References $leave_end.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getCountMembers()

ilObjGroup::getCountMembers ( )

Definition at line 1287 of file class.ilObjGroup.php.

1288 {
1289 return count($this->getGroupMemberIds());
1290 }
getGroupMemberIds()
get all group Member ids regardless of role @access public

References getGroupMemberIds().

+ Here is the call graph for this function:

◆ getDefaultAdminRole()

ilObjGroup::getDefaultAdminRole ( )

returns object id of created default adminstrator role @access public

Definition at line 1136 of file class.ilObjGroup.php.

1137 {
1138 $local_group_Roles = $this->getLocalGroupRoles();
1139
1140 return $local_group_Roles["il_grp_admin_" . $this->getRefId()];
1141 }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...

References getLocalGroupRoles(), and ilObject\getRefId().

Referenced by cloneAutoGeneratedRoles().

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

◆ getDefaultGroupRoles()

ilObjGroup::getDefaultGroupRoles (   $a_grp_id = "")

get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin @access public

Parameters
returnsthe obj_ids of group specific roles(il_grp_member,il_grp_admin)

Definition at line 1325 of file class.ilObjGroup.php.

1326 {
1327 global $DIC;
1328
1329 $rbacadmin = $DIC['rbacadmin'];
1330 $rbacreview = $DIC['rbacreview'];
1331
1332 if (strlen($a_grp_id) > 0) {
1333 $grp_id = $a_grp_id;
1334 } else {
1335 $grp_id = $this->getRefId();
1336 }
1337
1338 $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1339
1340 foreach ($role_arr as $role_id) {
1341 $role_Obj = &$this->ilias->obj_factory->getInstanceByObjId($role_id);
1342
1343 $grp_Member = "il_grp_member_" . $grp_id;
1344 $grp_Admin = "il_grp_admin_" . $grp_id;
1345
1346 if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
1347 $arr_grpDefaultRoles["grp_member_role"] = $role_Obj->getId();
1348 }
1349
1350 if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
1351 $arr_grpDefaultRoles["grp_admin_role"] = $role_Obj->getId();
1352 }
1353 }
1354
1355 return $arr_grpDefaultRoles;
1356 }

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, and ilObject\getRefId().

Referenced by getGroupAdminIds(), and isAdmin().

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

◆ getDefaultMemberRole()

ilObjGroup::getDefaultMemberRole ( )

returns object id of created default member role @access public

Definition at line 1125 of file class.ilObjGroup.php.

1126 {
1127 $local_group_Roles = $this->getLocalGroupRoles();
1128
1129 return $local_group_Roles["il_grp_member_" . $this->getRefId()];
1130 }

References getLocalGroupRoles(), and ilObject\getRefId().

Referenced by cloneAutoGeneratedRoles().

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

◆ getEnableGroupMap()

ilObjGroup::getEnableGroupMap ( )

Get Enable Group Map.

Returns
boolean Enable Group Map

Definition at line 523 of file class.ilObjGroup.php.

524 {
525 return (bool) $this->enablemap;
526 }

References $enablemap.

Referenced by cloneObject(), create(), getEnableMap(), and update().

+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjGroup::getEnableMap ( )

Type independent wrapper.

Returns
type

Definition at line 513 of file class.ilObjGroup.php.

514 {
515 return $this->getEnableGroupMap();
516 }

References getEnableGroupMap().

+ Here is the call graph for this function:

◆ getEnd()

ilObjGroup::getEnd ( )
Returns
\ilDateTime|null

Definition at line 688 of file class.ilObjGroup.php.

688 : ?\ilDateTime
689 {
690 return $this->grp_end;
691 }

Referenced by cloneObject(), create(), prepareAppointments(), and update().

+ Here is the caller graph for this function:

◆ getGroupAdminIds()

ilObjGroup::getGroupAdminIds (   $a_grpId = "")

get Group Admin Id @access public

Parameters
integergroup id
returnsuserids that are assigned to a group administrator! role

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

1299 {
1300 global $DIC;
1301
1302 $rbacreview = $DIC['rbacreview'];
1303
1304 if (!empty($a_grpId)) {
1305 $grp_id = $a_grpId;
1306 } else {
1307 $grp_id = $this->getRefId();
1308 }
1309
1310 $usr_arr = array();
1311 $roles = $this->getDefaultGroupRoles($this->getRefId());
1312
1313 foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
1314 array_push($usr_arr, $member_id);
1315 }
1316
1317 return $usr_arr;
1318 }
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin @access pub...

References $DIC, ilObject\$rbacreview, getDefaultGroupRoles(), and ilObject\getRefId().

Referenced by leaveGroup().

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

◆ getGroupMemberData()

ilObjGroup::getGroupMemberData (   $a_mem_ids,
  $active = 1 
)

get all group Members regardless of group role.

fetch all users data in one shot to improve performance @access public

Parameters
arrayof user ids
Returns
return array of userdata

Definition at line 1252 of file class.ilObjGroup.php.

1253 {
1254 global $DIC;
1255
1256 $rbacadmin = $DIC['rbacadmin'];
1257 $rbacreview = $DIC['rbacreview'];
1258 $ilBench = $DIC['ilBench'];
1259 $ilDB = $DIC['ilDB'];
1260
1261 $usr_arr = array();
1262
1263 $q = "SELECT login,firstname,lastname,title,usr_id,last_login " .
1264 "FROM usr_data " .
1265 "WHERE usr_id IN (" . implode(',', ilUtil::quoteArray($a_mem_ids)) . ") ";
1266
1267 if (is_numeric($active) && $active > -1) {
1268 $q .= "AND active = '$active'";
1269 }
1270
1271 $q .= 'ORDER BY lastname,firstname';
1272
1273 $r = $ilDB->query($q);
1274
1275 while ($row = $r->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1276 $mem_arr[] = array("id" => $row->usr_id,
1277 "login" => $row->login,
1278 "firstname" => $row->firstname,
1279 "lastname" => $row->lastname,
1280 "last_login" => $row->last_login
1281 );
1282 }
1283
1284 return $mem_arr ? $mem_arr : array();
1285 }
global $ilBench
Definition: ilias.php:18

References $DIC, $ilBench, $ilDB, ilObject\$rbacadmin, ilObject\$rbacreview, ilDBConstants\FETCHMODE_OBJECT, and ilUtil\quoteArray().

+ Here is the call graph for this function:

◆ getGroupMemberIds()

ilObjGroup::getGroupMemberIds ( )

get all group Member ids regardless of role @access public

Returns
return array of users (obj_ids) that are assigned to the groupspecific roles (grp_member,grp_admin)

Definition at line 1223 of file class.ilObjGroup.php.

1224 {
1225 global $DIC;
1226
1227 $rbacadmin = $DIC['rbacadmin'];
1228 $rbacreview = $DIC['rbacreview'];
1229
1230 $usr_arr = array();
1231
1232 $rol = $this->getLocalGroupRoles();
1233
1234 foreach ($rol as $value) {
1235 foreach ($rbacreview->assignedUsers($value) as $member_id) {
1236 array_push($usr_arr, $member_id);
1237 }
1238 }
1239
1240 $mem_arr = array_unique($usr_arr);
1241
1242 return $mem_arr ? $mem_arr : array();
1243 }

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, and getLocalGroupRoles().

Referenced by getCountMembers(), and leaveGroup().

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

◆ getGroupStatus()

ilObjGroup::getGroupStatus ( )

get group status

@access public

Parameters
intgroup status

Definition at line 1499 of file class.ilObjGroup.php.

1500 {
1501 return $this->group_status;
1502 }

◆ getGroupType()

ilObjGroup::getGroupType ( )

get group type

@access public

Returns
int group type

Definition at line 207 of file class.ilObjGroup.php.

208 {
209 return $this->group_type;
210 }

References $group_type.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getGrpStatusClosedTemplateId()

ilObjGroup::getGrpStatusClosedTemplateId ( )

get group status closed template @access public

Parameters
returnobj_id of roletemplate containing permissionsettings for a closed group

Definition at line 1398 of file class.ilObjGroup.php.

1399 {
1400 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1401 $res = $this->ilias->db->query($q);
1402 $row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
1403
1404 return $row["obj_id"];
1405 }

References $res, and ilDBConstants\FETCHMODE_ASSOC.

◆ getGrpStatusOpenTemplateId()

ilObjGroup::getGrpStatusOpenTemplateId ( )

get group status open template @access public

Parameters
returnobj_id of roletemplate containing permissionsettings for an open group

Definition at line 1412 of file class.ilObjGroup.php.

1413 {
1414 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1415 $res = $this->ilias->db->query($q);
1416 $row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
1417
1418 return $row["obj_id"];
1419 }

References $res, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by setParentRolePermissions().

+ Here is the caller graph for this function:

◆ getInformation()

ilObjGroup::getInformation ( )

get Information

@access public

Parameters

return string information

Definition at line 185 of file class.ilObjGroup.php.

186 {
187 return $this->information;
188 }

References $information.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getLatitude()

ilObjGroup::getLatitude ( )

Get Latitude.

Returns
string Latitude

Definition at line 454 of file class.ilObjGroup.php.

455 {
456 return $this->latitude;
457 }

References $latitude.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getLocalGroupRoles()

ilObjGroup::getLocalGroupRoles (   $a_translate = false)

get ALL local roles of group, also those created and defined afterwards only fetch data once from database.

info is stored in object variable @access public

Returns
return array [title|id] of roles...

Definition at line 1364 of file class.ilObjGroup.php.

1365 {
1366 global $DIC;
1367
1368 $rbacadmin = $DIC['rbacadmin'];
1369 $rbacreview = $DIC['rbacreview'];
1370
1371 if (empty($this->local_roles)) {
1372 $this->local_roles = array();
1373 $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1374
1375 foreach ($role_arr as $role_id) {
1376 if ($rbacreview->isAssignable($role_id, $this->getRefId()) == true) {
1377 $role_Obj = &$this->ilias->obj_factory->getInstanceByObjId($role_id);
1378
1379 if ($a_translate) {
1380 $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1381 } else {
1382 $role_name = $role_Obj->getTitle();
1383 }
1384
1385 $this->local_roles[$role_name] = $role_Obj->getId();
1386 }
1387 }
1388 }
1389
1390 return $this->local_roles;
1391 }
static _getTranslation($a_role_title)

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, ilObjRole\_getTranslation(), and ilObject\getRefId().

Referenced by getDefaultAdminRole(), getDefaultMemberRole(), and getGroupMemberIds().

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

◆ getLocationZoom()

ilObjGroup::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

Definition at line 494 of file class.ilObjGroup.php.

495 {
496 return $this->locationzoom;
497 }

References $locationzoom.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getLongitude()

ilObjGroup::getLongitude ( )

Get Longitude.

Returns
string Longitude

Definition at line 474 of file class.ilObjGroup.php.

475 {
476 return $this->longitude;
477 }

References $longitude.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjGroup::getMailToMembersType ( )

Get mail to members type.

Returns
int

Definition at line 580 of file class.ilObjGroup.php.

581 {
582 return $this->mail_members;
583 }

References $mail_members.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ getMaxMembers()

ilObjGroup::getMaxMembers ( )

get max members

@access public

Returns

Definition at line 400 of file class.ilObjGroup.php.

401 {
403 }

References $reg_max_members.

Referenced by cloneObject(), create(), handleAutoFill(), register(), update(), and validate().

+ Here is the caller graph for this function:

◆ getMemberRoles()

ilObjGroup::getMemberRoles (   $a_user_id)

get group member status @access public

Parameters
integeruser_id
Returns
returns array of obj_ids of assigned local roles

Definition at line 1528 of file class.ilObjGroup.php.

1529 {
1530 global $DIC;
1531
1532 $rbacadmin = $DIC['rbacadmin'];
1533 $rbacreview = $DIC['rbacreview'];
1534 $ilBench = $DIC['ilBench'];
1535
1536 $ilBench->start("Group", "getMemberRoles");
1537
1538 $arr_assignedRoles = array();
1539
1540 $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id), $this->getLocalGroupRoles());
1541
1542 $ilBench->stop("Group", "getMemberRoles");
1543
1544 return $arr_assignedRoles;
1545 }

References $DIC, $ilBench, ilObject\$rbacadmin, and ilObject\$rbacreview.

Referenced by leave().

+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjGroup::getMembersObject ( )

Get members objects.

Returns
ilGroupParticipants

Definition at line 1950 of file class.ilObjGroup.php.

1951 {
1952 // #17886
1953 if (!$this->members_obj instanceof ilGroupParticipants) {
1954 $this->initParticipants();
1955 }
1956 return $this->members_obj;
1957 }
initParticipants()
init participants object

References $members_obj, and initParticipants().

Referenced by handleAutoFill().

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

◆ getMessage()

ilObjGroup::getMessage ( )

Definition at line 1852 of file class.ilObjGroup.php.

1853 {
1854 return $this->message;
1855 }
$message
Definition: xapiexit.php:14

References $message.

Referenced by appendMessage().

+ Here is the caller graph for this function:

◆ getMinMembers()

ilObjGroup::getMinMembers ( )

get min members

@access public

Returns

Definition at line 378 of file class.ilObjGroup.php.

379 {
381 }

References $reg_min_members.

Referenced by cloneObject(), create(), update(), and validate().

+ Here is the caller graph for this function:

◆ getPassword()

ilObjGroup::getPassword ( )

get password

@access public

Returns
string password

Definition at line 333 of file class.ilObjGroup.php.

334 {
335 return $this->reg_password;
336 }

References $reg_password.

Referenced by cloneObject(), create(), update(), and validate().

+ Here is the caller graph for this function:

◆ getRegistrationAccessCode()

ilObjGroup::getRegistrationAccessCode ( )

get access code

Returns

Definition at line 532 of file class.ilObjGroup.php.

533 {
535 }

References $reg_access_code.

Referenced by create(), and update().

+ Here is the caller graph for this function:

◆ getRegistrationEnd()

ilObjGroup::getRegistrationEnd ( )

get registration end

@access public

Returns
int registration end

Definition at line 311 of file class.ilObjGroup.php.

312 {
313 return $this->reg_end;
314 }

References $reg_end.

Referenced by cloneObject(), create(), prepareAppointments(), register(), update(), and validate().

+ Here is the caller graph for this function:

◆ getRegistrationStart()

ilObjGroup::getRegistrationStart ( )

get registration start

@access public

Returns
int registration start

Definition at line 287 of file class.ilObjGroup.php.

288 {
289 return $this->reg_start;
290 }

References $reg_start.

Referenced by cloneObject(), create(), prepareAppointments(), register(), update(), and validate().

+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjGroup::getRegistrationType ( )

get registration type

@access public

Returns
int registration type

Definition at line 230 of file class.ilObjGroup.php.

231 {
232 return $this->reg_type;
233 }

References $reg_type.

Referenced by cloneObject(), create(), isRegistrationEnabled(), update(), and validate().

+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjGroup::getShowMembers ( )

Definition at line 599 of file class.ilObjGroup.php.

600 {
601 return $this->show_members;
602 }

References $show_members.

Referenced by cloneObject(), and update().

+ Here is the caller graph for this function:

◆ getStart()

ilObjGroup::getStart ( )
Returns
\ilDateTime | null

Definition at line 672 of file class.ilObjGroup.php.

672 : ?\ilDateTime
673 {
674 return $this->grp_start;
675 }

Referenced by cloneObject(), create(), prepareAppointments(), and update().

+ Here is the caller graph for this function:

◆ getStartTimeIndication()

ilObjGroup::getStartTimeIndication ( )
Returns
bool

Definition at line 655 of file class.ilObjGroup.php.

655 : ?bool
656 {
657 return $this->start_time_indication;
658 }

Referenced by prepareAppointments(), and update().

+ Here is the caller graph for this function:

◆ getViewMode()

ilObjGroup::getViewMode ( )

Get effective container view mode.

Returns
int

Reimplemented from ilContainer.

Definition at line 1742 of file class.ilObjGroup.php.

1743 {
1745
1746 // default: by type
1747 $view = self::lookupViewMode($this->getId());
1748
1749 if ($view != ilContainer::VIEW_INHERIT) {
1750 return $view;
1751 }
1752
1753 $container_ref_id = $tree->checkForParentType($this->ref_id, 'crs');
1754 if ($container_ref_id) {
1756 // these three are available...
1757 if (
1761 return $view_mode;
1762 }
1763 }
1765 }
static _lookupViewMode($a_id)
Lookup view mode.
static lookupViewMode($a_obj_id)
lookup view mode @global $ilDB
static _lookupObjId($a_id)

References ilContainer\$tree, $view_mode, ilObject\_lookupObjId(), ilObjCourseAccess\_lookupViewMode(), ilObject\getId(), lookupViewMode(), ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_DEFAULT, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

+ Here is the call graph for this function:

◆ handleAutoFill()

ilObjGroup::handleAutoFill ( )

Definition at line 2056 of file class.ilObjGroup.php.

2057 {
2058 if ($this->isWaitingListEnabled() &&
2059 $this->hasWaitingListAutoFill()) {
2060 $max = $this->getMaxMembers();
2062 if ($max > $now) {
2063 // see assignFromWaitingListObject()
2064 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2065 $waiting_list = new ilGroupWaitingList($this->getId());
2066
2067 foreach ($waiting_list->getUserIds() as $user_id) {
2068 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
2069 continue;
2070 }
2071 if ($this->getMembersObject()->isAssigned($user_id)) {
2072 continue;
2073 }
2074 $this->getMembersObject()->add($user_id, IL_GRP_MEMBER); // #18213
2075 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
2077 $waiting_list->removeFromList($user_id);
2078
2079 $now++;
2080 if ($now >= $max) {
2081 break;
2082 }
2083 }
2084 }
2085 }
2086 }
const IL_GRP_MEMBER
Waiting list for groups.
getMembersObject()
Get members objects.
static lookupNumberOfMembers($a_ref_id)
Lookup number of members @global ilRbacReview $rbacreview @global <type> $ilObjDataCache.

References $waiting_list, ilObject\getId(), ilObjectFactory\getInstanceByObjId(), getMaxMembers(), getMembersObject(), ilObject\getRefId(), hasWaitingListAutoFill(), IL_GRP_MEMBER, isWaitingListEnabled(), ilParticipants\lookupNumberOfMembers(), and ilGroupMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER.

+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjGroup::hasWaitingListAutoFill ( )

Definition at line 434 of file class.ilObjGroup.php.

435 {
436 return (bool) $this->auto_fill_from_waiting;
437 }

References $auto_fill_from_waiting.

Referenced by cloneObject(), create(), handleAutoFill(), and update().

+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjGroup::initDefaultRoles ( )

init default roles settings @access public

Returns
array object IDs of created local roles.

Reimplemented from ilObject.

Definition at line 1572 of file class.ilObjGroup.php.

1573 {
1574 include_once './Services/AccessControl/classes/class.ilObjRole.php';
1576 'il_grp_admin_' . $this->getRefId(),
1577 "Groupadmin group obj_no." . $this->getId(),
1578 'il_grp_admin',
1579 $this->getRefId()
1580 );
1581 $this->m_roleAdminId = $role->getId();
1582
1584 'il_grp_member_' . $this->getRefId(),
1585 "Groupmember of group obj_no." . $this->getId(),
1586 'il_grp_member',
1587 $this->getRefId()
1588 );
1589 $this->m_roleMemberId = $role->getId();
1590
1591 return array();
1592 }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)

References ilObjRole\createDefaultRole(), ilObject\getId(), and ilObject\getRefId().

+ Here is the call graph for this function:

◆ initParticipants()

ilObjGroup::initParticipants ( )
protected

init participants object

@access protected

Returns

Definition at line 1939 of file class.ilObjGroup.php.

1940 {
1941 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1942 $this->members_obj = ilGroupParticipants::_getInstanceByObjId($this->getId());
1943 }

References ilGroupParticipants\_getInstanceByObjId(), and ilObject\getId().

Referenced by getMembersObject(), and read().

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

◆ isAdmin()

ilObjGroup::isAdmin (   $a_userId)

is Admin @access public

Parameters
integeruser_id
boolean,trueif user is group administrator

Definition at line 1553 of file class.ilObjGroup.php.

1554 {
1555 global $DIC;
1556
1557 $rbacreview = $DIC['rbacreview'];
1558
1559 $grp_Roles = $this->getDefaultGroupRoles();
1560
1561 if (in_array($a_userId, $rbacreview->assignedUsers($grp_Roles["grp_admin_role"]))) {
1562 return true;
1563 } else {
1564 return false;
1565 }
1566 }

References $DIC, ilObject\$rbacreview, and getDefaultGroupRoles().

Referenced by leaveGroup().

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

◆ isMembershipLimited()

ilObjGroup::isMembershipLimited ( )

is max member limited

@access public

Returns

Definition at line 356 of file class.ilObjGroup.php.

357 {
359 }

References $reg_membership_limitation.

Referenced by cloneObject(), create(), register(), update(), and validate().

+ Here is the caller graph for this function:

◆ isRegistrationAccessCodeEnabled()

ilObjGroup::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

Definition at line 551 of file class.ilObjGroup.php.

552 {
553 return (bool) $this->reg_access_code_enabled;
554 }

References $reg_access_code_enabled.

Referenced by cloneObject(), create(), and update().

+ Here is the caller graph for this function:

◆ isRegistrationEnabled()

ilObjGroup::isRegistrationEnabled ( )

is registration enabled

@access public

Returns
bool

Definition at line 241 of file class.ilObjGroup.php.

242 {
244 }
const GRP_REGISTRATION_DEACTIVATED

References getRegistrationType(), and GRP_REGISTRATION_DEACTIVATED.

Referenced by create(), register(), and update().

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

◆ isRegistrationUnlimited()

ilObjGroup::isRegistrationUnlimited ( )

is registration unlimited

@access public

Returns
bool

Definition at line 264 of file class.ilObjGroup.php.

265 {
267 }

References $reg_unlimited.

Referenced by cloneObject(), create(), prepareAppointments(), register(), and update().

+ Here is the caller graph for this function:

◆ isWaitingListEnabled()

ilObjGroup::isWaitingListEnabled ( )

is waiting list enabled

@access public

Parameters

return bool

Definition at line 424 of file class.ilObjGroup.php.

425 {
426 return $this->waiting_list;
427 }

References $waiting_list.

Referenced by cloneObject(), create(), handleAutoFill(), register(), update(), and validate().

+ Here is the caller graph for this function:

◆ join()

ilObjGroup::join (   $a_user_id,
  $a_mem_role = "" 
)

join Group, assigns user to role @access private

Parameters
integermember status = obj_id of local_group_role

Definition at line 1104 of file class.ilObjGroup.php.

1105 {
1106 global $DIC;
1107
1108 $rbacadmin = $DIC['rbacadmin'];
1109
1110 if (is_array($a_mem_role)) {
1111 foreach ($a_mem_role as $role) {
1112 $rbacadmin->assignUser($role, $a_user_id, false);
1113 }
1114 } else {
1115 $rbacadmin->assignUser($a_mem_role, $a_user_id, false);
1116 }
1117
1118 return true;
1119 }

References $DIC, and ilObject\$rbacadmin.

Referenced by addMember().

+ Here is the caller graph for this function:

◆ leave()

ilObjGroup::leave (   $a_user_id)

deassign member from group role @access private

Definition at line 1198 of file class.ilObjGroup.php.

1199 {
1200 global $DIC;
1201
1202 $rbacadmin = $DIC['rbacadmin'];
1203
1204 $arr_groupRoles = $this->getMemberRoles($a_user_id);
1205
1206 if (is_array($arr_groupRoles)) {
1207 foreach ($arr_groupRoles as $groupRole) {
1208 $rbacadmin->deassignUser($groupRole, $a_user_id);
1209 }
1210 } else {
1211 $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1212 }
1213
1214 return true;
1215 }
getMemberRoles($a_user_id)
get group member status @access public

References $DIC, ilObject\$rbacadmin, and getMemberRoles().

Referenced by leaveGroup().

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

◆ leaveGroup()

ilObjGroup::leaveGroup ( )

is called when a member decides to leave group @access public

Parameters
integeruser-Id
integergroup-Id

Definition at line 1171 of file class.ilObjGroup.php.

1172 {
1173 global $DIC;
1174
1175 $rbacadmin = $DIC['rbacadmin'];
1176 $rbacreview = $DIC['rbacreview'];
1177
1178 $member_ids = $this->getGroupMemberIds();
1179
1180 if (count($member_ids) <= 1 || !in_array($this->ilias->account->getId(), $member_ids)) {
1181 return 2;
1182 } else {
1183 if (!$this->isAdmin($this->ilias->account->getId())) {
1184 $this->leave($this->ilias->account->getId());
1185 $this->recommended_content_manager->removeObjectRecommendation($this->user->getId(), $this->getRefId());
1186
1187 return 0;
1188 } elseif (count($this->getGroupAdminIds()) == 1) {
1189 return 1;
1190 }
1191 }
1192 }
user()
Definition: user.php:4
leave($a_user_id)
deassign member from group role @access private
isAdmin($a_userId)
is Admin @access public
getGroupAdminIds($a_grpId="")
get Group Admin Id @access public

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, getGroupAdminIds(), getGroupMemberIds(), isAdmin(), leave(), and user().

+ Here is the call graph for this function:

◆ lookupGroupStatusTemplateId()

static ilObjGroup::lookupGroupStatusTemplateId (   $a_obj_id)
static

@global $ilDB $ilDB

Parameters
int$a_obj_id
Returns
int

Definition at line 1427 of file class.ilObjGroup.php.

1428 {
1429 global $DIC;
1430
1431 $ilDB = $DIC['ilDB'];
1432
1433 $type = self::lookupGroupTye($a_obj_id);
1434 if ($type == GRP_TYPE_CLOSED) {
1435 $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_closed', 'text');
1436 } else {
1437 $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_open', 'text');
1438 }
1439 $res = $ilDB->query($query);
1440 $row = $res->fetchRow(ilDBConstants::FETCHMODE_ASSOC);
1441
1442 return isset($row['obj_id']) ? $row['obj_id'] : 0;
1443 }
const GRP_TYPE_CLOSED
static lookupGroupTye($a_id)
Lookup group type.

References $DIC, $ilDB, $query, $res, ilObject\$type, ilDBConstants\FETCHMODE_ASSOC, GRP_TYPE_CLOSED, and lookupGroupTye().

Referenced by ilRbacAdmin\adjustMovedObjectPermissions().

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

◆ lookupGroupTye()

static ilObjGroup::lookupGroupTye (   $a_id)
static

Lookup group type.

Parameters
object$a_id
Returns

Definition at line 150 of file class.ilObjGroup.php.

151 {
152 global $DIC;
153
154 $ilDB = $DIC['ilDB'];
155
156 $query = "SELECT grp_type FROM grp_settings " .
157 "WHERE obj_id = " . $ilDB->quote($a_id, 'integer');
158 $res = $ilDB->query($query);
159 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
160 return $row->grp_type;
161 }
162 return GRP_TYPE_UNKNOWN;
163 }
const GRP_TYPE_UNKNOWN

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and GRP_TYPE_UNKNOWN.

Referenced by ilObjRole\createPermissionIntersection(), and lookupGroupStatusTemplateId().

+ Here is the caller graph for this function:

◆ lookupObjectsByCode()

static ilObjGroup::lookupObjectsByCode (   $a_code)
static
See also
interface.ilMembershipRegistrationCodes
Returns
array obj ids

Implements ilMembershipRegistrationCodes.

Definition at line 1963 of file class.ilObjGroup.php.

1964 {
1965 global $DIC;
1966
1967 $ilDB = $DIC['ilDB'];
1968
1969 $query = "SELECT obj_id FROM grp_settings " .
1970 "WHERE reg_ac_enabled = " . $ilDB->quote(1, 'integer') . " " .
1971 "AND reg_ac = " . $ilDB->quote($a_code, 'text');
1972 $res = $ilDB->query($query);
1973
1974 $obj_ids = array();
1975 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1976 $obj_ids[] = $row->obj_id;
1977 }
1978 return $obj_ids;
1979 }

References $DIC, $ilDB, $query, $res, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMembershipRegistrationCodeUtils\lookupObjectsByCode().

+ Here is the caller graph for this function:

◆ lookupShowMembersEnabled()

static ilObjGroup::lookupShowMembersEnabled ( int  $a_obj_id)
static

Definition at line 2164 of file class.ilObjGroup.php.

2164 : bool
2165 {
2166 global $DIC;
2167 $ilDB = $DIC["ilDB"];
2168 $query = 'SELECT show_members FROM grp_settings'
2169 .' WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer');
2170 $res = $ilDB->query($query);
2171 if($ilDB->numRows($res) == 0) {
2172 return false;
2173 }
2174 $row = $ilDB->fetchAssoc($res);
2175 return (bool)$row['show_members'];
2176 }

References $DIC, $ilDB, $query, and $res.

Referenced by ilParticipants\hasParticipantListAccess().

+ Here is the caller graph for this function:

◆ lookupViewMode()

static ilObjGroup::lookupViewMode (   $a_obj_id)
static

lookup view mode @global $ilDB

Definition at line 1781 of file class.ilObjGroup.php.

1782 {
1783 global $DIC;
1784
1785 $ilDB = $DIC['ilDB'];
1786
1787 $query = 'SELECT view_mode FROM grp_settings ' .
1788 'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
1789 $res = $ilDB->query($query);
1790
1791 $view_mode = null;
1792 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1793 $view_mode = $row->view_mode;
1794 }
1795 return $view_mode;
1796 }

References $DIC, $ilDB, $query, $res, $view_mode, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by getViewMode(), and ilObjGroupGUI\initForm().

+ Here is the caller graph for this function:

◆ mayLeave()

static ilObjGroup::mayLeave (   $a_group_id,
  $a_user_id = null,
$a_date = null 
)
static

Definition at line 2088 of file class.ilObjGroup.php.

2089 {
2090 global $DIC;
2091
2092 $ilUser = $DIC['ilUser'];
2093 $ilDB = $DIC['ilDB'];
2094
2095 if (!$a_user_id) {
2096 $a_user_id = $ilUser->getId();
2097 }
2098
2099 $set = $ilDB->query("SELECT leave_end" .
2100 " FROM grp_settings" .
2101 " WHERE obj_id = " . $ilDB->quote($a_group_id, "integer"));
2102 $row = $ilDB->fetchAssoc($set);
2103 if ($row && $row["leave_end"]) {
2104 // timestamp to date
2105 $limit = date("Ymd", $row["leave_end"]);
2106 if ($limit < date("Ymd")) {
2107 $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2108 return false;
2109 }
2110 }
2111 return true;
2112 }
const IL_CAL_DATE

References $DIC, $ilDB, $ilUser, and IL_CAL_DATE.

Referenced by ilObjGroupAccess\_checkAccess().

+ Here is the caller graph for this function:

◆ prepareAppointments()

ilObjGroup::prepareAppointments (   $a_mode = 'create')
protected

Prepare calendar appointments.

@access protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

Definition at line 1875 of file class.ilObjGroup.php.

1876 {
1877 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1878
1879 switch ($a_mode) {
1880 case 'create':
1881 case 'update':
1882
1883 $apps = array();
1884 if ($this->getStart() && $this->getEnd()) {
1885 $app = new ilCalendarAppointmentTemplate(self::CAL_START);
1886 $app->setTitle($this->getTitle());
1887 $app->setSubtitle('grp_cal_start');
1888 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1889 $app->setDescription($this->getLongDescription());
1890 $app->setStart($this->getStart());
1891 $app->setFullday(!$this->getStartTimeIndication());
1892 $apps[] = $app;
1893
1894 $app = new ilCalendarAppointmentTemplate(self::CAL_END);
1895 $app->setTitle($this->getTitle());
1896 $app->setSubtitle('grp_cal_end');
1897 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1898 $app->setDescription($this->getLongDescription());
1899 $app->setStart($this->getEnd());
1900 $app->setFullday(!$this->getStartTimeIndication());
1901 $apps[] = $app;
1902 }
1903 if ($this->isRegistrationUnlimited()) {
1904 return $apps;
1905 }
1906
1907 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1908 $app->setTitle($this->getTitle());
1909 $app->setSubtitle('grp_cal_reg_start');
1910 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1911 $app->setDescription($this->getLongDescription());
1912 $app->setStart($this->getRegistrationStart());
1913 $apps[] = $app;
1914
1915 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1916 $app->setTitle($this->getTitle());
1917 $app->setSubtitle('grp_cal_reg_end');
1918 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1919 $app->setDescription($this->getLongDescription());
1920 $app->setStart($this->getRegistrationEnd());
1921 $apps[] = $app;
1922
1923
1924 return $apps;
1925
1926 case 'delete':
1927 // Nothing to do: The category and all assigned appointments will be deleted.
1928 return array();
1929 }
1930 }
const IL_CAL_TRANSLATION_SYSTEM
Apointment templates are used for automatic generated apointments.
getLongDescription()
get object long description (stored in object_description)
getTitle()
get object title @access public
$app
Definition: cli.php:38

References $app, getEnd(), ilObject\getLongDescription(), getRegistrationEnd(), getRegistrationStart(), getStart(), getStartTimeIndication(), ilObject\getTitle(), IL_CAL_TRANSLATION_SYSTEM, and isRegistrationUnlimited().

Referenced by create(), delete(), and update().

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

◆ read()

ilObjGroup::read ( )

Read group.

Reimplemented from ilContainer.

Definition at line 908 of file class.ilObjGroup.php.

909 {
910 global $DIC;
911
912 $ilDB = $DIC['ilDB'];
913
914 parent::read();
915
916 $query = "SELECT * FROM grp_settings " .
917 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
918
919 $res = $ilDB->query($query);
920 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
921 $this->setInformation($row->information);
922 $this->setGroupType($row->grp_type);
923 $this->setRegistrationType($row->registration_type);
924 $this->enableUnlimitedRegistration($row->registration_unlimited);
925 $this->setRegistrationStart(new ilDateTime($row->registration_start, IL_CAL_DATETIME));
926 $this->setRegistrationEnd(new ilDateTime($row->registration_end, IL_CAL_DATETIME));
927 $this->setPassword($row->registration_password);
928 $this->enableMembershipLimitation((bool) $row->registration_mem_limit);
929 $this->setMaxMembers($row->registration_max_members);
930 $this->enableWaitingList($row->waiting_list);
931 $this->setLatitude($row->latitude);
932 $this->setLongitude($row->longitude);
933 $this->setLocationZoom($row->location_zoom);
934 $this->setEnableGroupMap($row->enablemap);
935 $this->enableRegistrationAccessCode($row->reg_ac_enabled);
936 $this->setRegistrationAccessCode($row->reg_ac);
937 $this->setViewMode($row->view_mode);
938 $this->setMailToMembersType($row->mail_members_type);
939 $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
940 $this->setMinMembers($row->registration_min_members);
941 $this->setWaitingListAutoFill($row->auto_wait);
942 $this->setShowMembers($row->show_members);
943 $this->setAutoNotification((bool) $row->auto_notification);
944 if ($row->period_time_indication) {
945 $this->setPeriod(
946 new \ilDateTime($row->period_start, IL_CAL_DATETIME, \ilTimeZone::UTC),
947 new \ilDateTime($row->period_end, IL_CAL_DATETIME, \ilTimeZone::UTC)
948 );
949 } elseif (!is_null($row->period_start) && !is_null($row->period_end)) {
950 $this->setPeriod(
951 new \ilDate($row->period_start, IL_CAL_DATE),
952 new \ilDate($row->period_end, IL_CAL_DATE)
953 );
954 }
955 $this->toggleStartTimeIndication((bool) $row->period_time_indication);
956 }
957 $this->initParticipants();
958
959 // Inherit order type from parent course (if exists)
960 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
962 }
static _lookupSortMode($a_obj_id)
lookup sort mode
setOrderType($a_value)
setPeriod(\ilDateTime $start=null, \ilDateTime $end=null)
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setPassword($a_pass)
set password
enableWaitingList($a_status)
enable waiting list
setAutoNotification(bool $a_status)
setRegistrationAccessCode($a_code)
Set refistration access code.
setRegistrationStart($a_start)
set registration start
setInformation($a_information)
set information
setMaxMembers($a_max)
set max members
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setCancellationEnd(ilDate $a_value=null)
setWaitingListAutoFill($a_value)
setLongitude($a_longitude)
Set Longitude.
setRegistrationEnd($a_end)
set registration end
setGroupType($a_type)
set group type
setMinMembers($a_max)
set min members
setMailToMembersType($a_type)
Set mail to members type.
setLatitude($a_latitude)
Set Latitude.
setLocationZoom($a_locationzoom)
Set LocationZoom.
setViewMode($a_view_mode)
Set group view mode.
setRegistrationType($a_type)
set registration type
enableMembershipLimitation($a_status)
enable max member limitation
setShowMembers($a_status)
enableUnlimitedRegistration($a_status)
enable unlimited registration
toggleStartTimeIndication(bool $time_indication)

References $DIC, $ilDB, $query, $res, ilContainerSortingSettings\_lookupSortMode(), enableMembershipLimitation(), enableRegistrationAccessCode(), enableUnlimitedRegistration(), enableWaitingList(), ilDBConstants\FETCHMODE_OBJECT, ilObject\getId(), IL_CAL_DATE, IL_CAL_DATETIME, IL_CAL_UNIX, initParticipants(), setAutoNotification(), setCancellationEnd(), setEnableGroupMap(), setGroupType(), setInformation(), setLatitude(), setLocationZoom(), setLongitude(), setMailToMembersType(), setMaxMembers(), setMinMembers(), ilContainer\setOrderType(), setPassword(), setPeriod(), setRegistrationAccessCode(), setRegistrationEnd(), setRegistrationStart(), setRegistrationType(), setShowMembers(), setViewMode(), setWaitingListAutoFill(), toggleStartTimeIndication(), and ilTimeZone\UTC.

+ Here is the call graph for this function:

◆ readGroupStatus()

ilObjGroup::readGroupStatus ( )

Read group type.

Returns
int

Definition at line 1508 of file class.ilObjGroup.php.

1508 : int
1509 {
1510 global $DIC;
1511
1512
1514 $logger = $DIC->logger()->grp();
1515 $logger->dump($tpl_id);
1516 if (!$tpl_id) {
1517 return GRP_TYPE_OPEN;
1518 }
1519 return GRP_TYPE_CLOSED;
1520 }
const GRP_TYPE_OPEN

References $DIC, ilObject\getRefId(), GRP_TYPE_CLOSED, GRP_TYPE_OPEN, and ilDidacticTemplateObjSettings\lookupTemplateId().

+ Here is the call graph for this function:

◆ register()

ilObjGroup::register (   $a_user_id,
  $a_role = IL_GRP_MEMBER,
  $a_force_registration = false 
)
See also
ilMembershipRegistrationCodes::register()
Parameters
intuser_id
introle
boolforce registration and do not check registration constraints.

Definition at line 1987 of file class.ilObjGroup.php.

1988 {
1989 include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1990 include_once "./Modules/Group/classes/class.ilGroupParticipants.php";
1992
1993 if ($part->isAssigned($a_user_id)) {
1994 return true;
1995 }
1996
1997 if (!$a_force_registration) {
1998 // Availability
1999 if (!$this->isRegistrationEnabled()) {
2000 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
2001
2003 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2004 ', group subscription is deactivated.', ilMembershipRegistrationException::REGISTRATION_CODE_DISABLED);
2005 }
2006 }
2007
2008 // Time Limitation
2009 if (!$this->isRegistrationUnlimited()) {
2010 $start = $this->getRegistrationStart();
2011 $end = $this->getRegistrationEnd();
2012 $time = new ilDateTime(time(), IL_CAL_UNIX);
2013
2014 if (!(ilDateTime::_after($time, $start) and ilDateTime::_before($time, $end))) {
2015 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2016 ', group is out of registration time.', ilMembershipRegistrationException::OUT_OF_REGISTRATION_PERIOD);
2017 }
2018 }
2019
2020 // Max members
2021 if ($this->isMembershipLimited()) {
2022 $free = max(0, $this->getMaxMembers() - $part->getCountMembers());
2023 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2024 $waiting_list = new ilGroupWaitingList($this->getId());
2025 if ($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers())) {
2026 $this->lng->loadLanguageModule("grp");
2027 $waiting_list->addToList($a_user_id);
2028
2029 $info = sprintf(
2030 $this->lng->txt('grp_added_to_list'),
2031 $this->getTitle(),
2032 $waiting_list->getPosition($a_user_id)
2033 );
2034
2035 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
2036 include_once('./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2037 $participants = ilGroupParticipants::_getInstanceByObjId($this->getId());
2038 $participants->sendNotification(ilGroupMembershipMailNotification::TYPE_WAITING_LIST_MEMBER, $a_user_id);
2039
2041 }
2042
2043 if (!$free or $waiting_list->getCountUsers()) {
2044 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2045 ', membership is limited.', ilMembershipRegistrationException::OBJECT_IS_FULL);
2046 }
2047 }
2048 }
2049
2050 $part->add($a_user_id, $a_role);
2051 $part->sendNotification(ilGroupMembershipMailNotification::TYPE_ADMISSION_MEMBER, $a_user_id);
2052 $part->sendNotification(ilGroupMembershipMailNotification::TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
2053 return true;
2054 }
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
static _usingRegistrationCode()
Using Registration code.

References $end, $start, $waiting_list, ilDateTime\_after(), ilDateTime\_before(), ilGroupParticipants\_getInstanceByObjId(), ilObjGroupAccess\_usingRegistrationCode(), ilMembershipRegistrationException\ADDED_TO_WAITINGLIST, ilObject\getId(), getMaxMembers(), getRegistrationEnd(), getRegistrationStart(), IL_CAL_UNIX, isMembershipLimited(), isRegistrationEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), ilMembershipRegistrationException\OBJECT_IS_FULL, ilMembershipRegistrationException\OUT_OF_REGISTRATION_PERIOD, ilMembershipRegistrationException\REGISTRATION_CODE_DISABLED, ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION, and ilGroupMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

+ Here is the call graph for this function:

◆ setAutoNotification()

ilObjGroup::setAutoNotification ( bool  $a_status)
Parameters
bool$a_status

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

608 {
609 $this->auto_notification = $a_status;
610 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setCancellationEnd()

ilObjGroup::setCancellationEnd ( ilDate  $a_value = null)

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

586 {
587 $this->leave_end = $a_value;
588 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnableGroupMap()

ilObjGroup::setEnableGroupMap (   $a_enablemap)

Set Enable Group Map.

Parameters
boolean$a_enablemapEnable Group Map

Definition at line 504 of file class.ilObjGroup.php.

505 {
506 $this->enablemap = $a_enablemap;
507 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnd()

ilObjGroup::setEnd ( ilDateTime  $a_value = null)
protected
Parameters
\ilDateTime | null$a_value

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

681 {
682 $this->grp_end = $a_value;
683 }

Referenced by setPeriod().

+ Here is the caller graph for this function:

◆ setGroupStatus()

ilObjGroup::setGroupStatus (   $a_status)

Set group status.

@access public

Parameters
intgroup status[0=public|2=closed]

Definition at line 1487 of file class.ilObjGroup.php.

1488 {
1489 $this->group_status = $a_status;
1490 }

◆ setGroupType()

ilObjGroup::setGroupType (   $a_type)

set group type

@access public

Parameters
inttype

Definition at line 196 of file class.ilObjGroup.php.

197 {
198 $this->group_type = $a_type;
199 }
$a_type
Definition: workflow.php:92

References $a_type.

Referenced by read().

+ Here is the caller graph for this function:

◆ setInformation()

ilObjGroup::setInformation (   $a_information)

set information

@access public

Parameters
stringinformation
Returns

Definition at line 173 of file class.ilObjGroup.php.

174 {
175 $this->information = $a_information;
176 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLatitude()

ilObjGroup::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

Definition at line 444 of file class.ilObjGroup.php.

445 {
446 $this->latitude = $a_latitude;
447 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjGroup::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

Definition at line 484 of file class.ilObjGroup.php.

485 {
486 $this->locationzoom = $a_locationzoom;
487 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setLongitude()

ilObjGroup::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

Definition at line 464 of file class.ilObjGroup.php.

465 {
466 $this->longitude = $a_longitude;
467 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMailToMembersType()

ilObjGroup::setMailToMembersType (   $a_type)

Set mail to members type.

See also
ilCourseConstants
Parameters
type$a_type

Definition at line 571 of file class.ilObjGroup.php.

572 {
573 $this->mail_members = $a_type;
574 }

References $a_type.

Referenced by read().

+ Here is the caller graph for this function:

◆ setMaxMembers()

ilObjGroup::setMaxMembers (   $a_max)

set max members

@access public

Parameters
intmax members

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

390 {
391 $this->reg_max_members = $a_max;
392 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMessage()

ilObjGroup::setMessage (   $a_message)

Definition at line 1856 of file class.ilObjGroup.php.

1857 {
1858 $this->message = $a_message;
1859 }

◆ setMinMembers()

ilObjGroup::setMinMembers (   $a_max)

set min members

@access public

Parameters
intmin members

Definition at line 367 of file class.ilObjGroup.php.

368 {
369 $this->reg_min_members = $a_max;
370 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setParentRolePermissions()

ilObjGroup::setParentRolePermissions (   $a_parent_ref)

This method is called before "initDefaultRoles".

Therefore no local group roles are created.

Grants permissions on the group object for all parent roles. Each permission is granted by computing the intersection of the template il_grp_status and the permission template of the parent role.

Parameters
intparent ref id

Reimplemented from ilObject.

Definition at line 1603 of file class.ilObjGroup.php.

1604 {
1605 $rbacadmin = $GLOBALS['DIC']->rbac()->admin();
1606 $rbacreview = $GLOBALS['DIC']->rbac()->review();
1607
1608 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1609 foreach ((array) $parent_roles as $parent_role) {
1610 if ($parent_role['parent'] == $this->getRefId()) {
1611 continue;
1612 }
1613 if ($rbacreview->isProtected($parent_role['parent'], $parent_role['rol_id'])) {
1614 $operations = $rbacreview->getOperationsOfRole(
1615 $parent_role['obj_id'],
1616 $this->getType(),
1617 $parent_role['parent']
1618 );
1619 $rbacadmin->grantPermission(
1620 $parent_role['obj_id'],
1621 $operations,
1622 $this->getRefId()
1623 );
1624 continue;
1625 }
1626
1627 $rbacadmin->initIntersectionPermissions(
1628 $this->getRefId(),
1629 $parent_role['obj_id'],
1630 $parent_role['parent'],
1632 ROLE_FOLDER_ID
1633 );
1634 }
1635 }
getGrpStatusOpenTemplateId()
get group status open template @access public
getType()
get object type @access public

References $GLOBALS, ilObject\$rbacadmin, ilObject\$rbacreview, getGrpStatusOpenTemplateId(), ilObject\getRefId(), and ilObject\getType().

Referenced by applyDidacticTemplate().

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

◆ setPassword()

ilObjGroup::setPassword (   $a_pass)

set password

@access public

Parameters
stringpassword

Definition at line 322 of file class.ilObjGroup.php.

323 {
324 $this->reg_password = $a_pass;
325 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setPeriod()

ilObjGroup::setPeriod ( \ilDateTime  $start = null,
\ilDateTime  $end = null 
)
Parameters
\ilDateTime | null$start
\ilDateTime | null$end
Exceptions
InvalidArgumentException

Definition at line 626 of file class.ilObjGroup.php.

627 {
628 if (
629 ($start instanceof \ilDate && !$end instanceof ilDate) ||
630 ($end instanceof \ilDate && !$start instanceof ilDate)
631 ) {
632 throw new InvalidArgumentException('Different date types not supported.');
633 }
634
635 if ($start instanceof \ilDate) {
636 $this->toggleStartTimeIndication(false);
637 } else {
638 $this->toggleStartTimeIndication(true);
639 }
640 $this->setStart($start);
641 $this->setEnd($end);
642 }
setEnd(ilDateTime $a_value=null)
setStart(ilDateTime $a_value=null)

References $end, $start, setEnd(), setStart(), and toggleStartTimeIndication().

Referenced by read().

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

◆ setRegistrationAccessCode()

ilObjGroup::setRegistrationAccessCode (   $a_code)

Set refistration access code.

Parameters
string$a_code
Returns

Definition at line 542 of file class.ilObjGroup.php.

543 {
544 $this->reg_access_code = $a_code;
545 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRegistrationEnd()

ilObjGroup::setRegistrationEnd (   $a_end)

set registration end

@access public

Parameters
intunix time
Returns

Definition at line 300 of file class.ilObjGroup.php.

301 {
302 $this->reg_end = $a_end;
303 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRegistrationStart()

ilObjGroup::setRegistrationStart (   $a_start)

set registration start

@access public

Parameters
objectilDateTime
Returns

Definition at line 276 of file class.ilObjGroup.php.

277 {
278 $this->reg_start = $a_start;
279 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjGroup::setRegistrationType (   $a_type)

set registration type

@access public

Parameters
intregistration type
Returns

Definition at line 219 of file class.ilObjGroup.php.

220 {
221 $this->reg_type = $a_type;
222 }

References $a_type.

Referenced by read().

+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjGroup::setShowMembers (   $a_status)

Definition at line 595 of file class.ilObjGroup.php.

596 {
597 $this->show_members = $a_status;
598 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setStart()

ilObjGroup::setStart ( ilDateTime  $a_value = null)
protected
Parameters
\ilDateTime | null$a_value

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

665 {
666 $this->grp_start = $a_value;
667 }

Referenced by setPeriod().

+ Here is the caller graph for this function:

◆ setViewMode()

ilObjGroup::setViewMode (   $a_view_mode)

Set group view mode.

Parameters
int$a_view_mode

Definition at line 1772 of file class.ilObjGroup.php.

1773 {
1774 $this->view_mode = $a_view_mode;
1775 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjGroup::setWaitingListAutoFill (   $a_value)

Definition at line 429 of file class.ilObjGroup.php.

430 {
431 $this->auto_fill_from_waiting = (bool) $a_value;
432 }

Referenced by read().

+ Here is the caller graph for this function:

◆ toggleStartTimeIndication()

ilObjGroup::toggleStartTimeIndication ( bool  $time_indication)
protected
Parameters
bool$time_indication

Definition at line 647 of file class.ilObjGroup.php.

648 {
649 $this->start_time_indication = $time_indication;
650 }

Referenced by read(), and setPeriod().

+ Here is the caller graph for this function:

◆ translateViewMode()

static ilObjGroup::translateViewMode (   $a_obj_id,
  $a_view_mode,
  $a_ref_id = null 
)
static

translate view mode

Parameters
int$a_obj_id
int$a_view_mode
int$a_ref_id
Returns
int

Definition at line 1805 of file class.ilObjGroup.php.

1806 {
1807 global $DIC;
1808
1809 $tree = $DIC['tree'];
1810
1811 if (!$a_view_mode) {
1812 $a_view_mode = ilContainer::VIEW_DEFAULT;
1813 }
1814
1815 // view mode is inherit => check for parent course
1816 if ($a_view_mode == ilContainer::VIEW_INHERIT) {
1817 if (!$a_ref_id) {
1818 $ref = ilObject::_getAllReferences($a_obj_id);
1819 $a_ref_id = end($ref);
1820 }
1821
1822 $crs_ref = $tree->checkForParentType($a_ref_id, 'crs');
1823 if (!$crs_ref) {
1825 }
1826
1827 include_once './Modules/Course/classes/class.ilObjCourse.php';
1829
1830 // validate course view mode
1831 if (!in_array($view_mode, array(ilContainer::VIEW_SESSIONS,
1834 }
1835
1836 return $view_mode;
1837 }
1838
1839 return $a_view_mode;
1840 }
static _lookupViewMode($a_id)
lookup view mode of container

References $DIC, ilContainer\$tree, $view_mode, ilObject\_getAllReferences(), ilObject\_lookupObjId(), ilObjCourse\_lookupViewMode(), ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_DEFAULT, ilContainer\VIEW_INHERIT, ilContainer\VIEW_SESSIONS, and ilContainer\VIEW_SIMPLE.

+ Here is the call graph for this function:

◆ update()

ilObjGroup::update ( )

Update group.

Reimplemented from ilContainer.

Definition at line 812 of file class.ilObjGroup.php.

813 {
814 global $DIC;
815
816 $ilDB = $DIC['ilDB'];
817 $ilAppEventHandler = $DIC['ilAppEventHandler'];
818
819 if (!parent::update()) {
820 return false;
821 }
822
823 $query = "UPDATE grp_settings " .
824 "SET information = " . $ilDB->quote($this->getInformation(), 'text') . ", " .
825 "grp_type = " . $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
826 "registration_type = " . $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
827 "registration_enabled = " . $ilDB->quote($this->isRegistrationEnabled() ? 1 : 0, 'integer') . ", " .
828 "registration_unlimited = " . $ilDB->quote($this->isRegistrationUnlimited() ? 1 : 0, 'integer') . ", " .
829 "registration_start = " . $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
830 "registration_end = " . $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
831 "registration_password = " . $ilDB->quote($this->getPassword(), 'text') . ", " .
832// "registration_membership_limited = ".$ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
833 "registration_mem_limit = " . $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
834 "registration_max_members = " . $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
835 "waiting_list = " . $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
836 "latitude = " . $ilDB->quote($this->getLatitude(), 'text') . ", " .
837 "longitude = " . $ilDB->quote($this->getLongitude(), 'text') . ", " .
838 "location_zoom = " . $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
839 "enablemap = " . $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
840 'reg_ac_enabled = ' . $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
841 'reg_ac = ' . $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
842 'view_mode = ' . $ilDB->quote($this->view_mode, 'integer') . ', ' .
843 'mail_members_type = ' . $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
844 'leave_end = ' . $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
845 "registration_min_members = " . $ilDB->quote($this->getMinMembers(), 'integer') . ", " .
846 "auto_wait = " . $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
847 "show_members = " . $ilDB->quote((int) $this->getShowMembers(), 'integer') . ", " .
848 'period_start = ' . $ilDB->quote(\ilCalendarUtil::convertDateToUtcDBTimestamp($this->getStart()), \ilDBConstants::T_TIMESTAMP) . ', ' .
849 'period_end = ' . $ilDB->quote(\ilCalendarUtil::convertDateToUtcDBTimestamp($this->getEnd()), \ilDBConstants::T_TIMESTAMP) . ', ' .
850 'period_time_indication = ' . $ilDB->quote($this->getStartTimeIndication() ? 1 : 0, \ilDBConstants::T_INTEGER) . ', ' .
851 'auto_notification = ' . $ilDB->quote($this->getAutoNotification(), \ilDBConstants::T_INTEGER) . ' ' .
852 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
853 $res = $ilDB->manipulate($query);
854
855 $ilAppEventHandler->raise(
856 'Modules/Group',
857 'update',
858 array('object' => $this,
859 'obj_id' => $this->getId(),
860 'appointments' => $this->prepareAppointments('update'))
861 );
862
863
864 return true;
865 }
static convertDateToUtcDBTimestamp(\ilDateTime $date=null)

References $DIC, $ilDB, $query, $res, ilCalendarUtil\convertDateToUtcDBTimestamp(), getAutoNotification(), getCancellationEnd(), getEnableGroupMap(), getEnd(), getGroupType(), ilObject\getId(), getInformation(), getLatitude(), getLocationZoom(), getLongitude(), getMailToMembersType(), getMaxMembers(), getMinMembers(), getPassword(), getRegistrationAccessCode(), getRegistrationEnd(), getRegistrationStart(), getRegistrationType(), getShowMembers(), getStart(), getStartTimeIndication(), hasWaitingListAutoFill(), IL_CAL_DATETIME, IL_CAL_UNIX, isMembershipLimited(), isRegistrationAccessCodeEnabled(), isRegistrationEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), prepareAppointments(), ilDBConstants\T_INTEGER, and ilDBConstants\T_TIMESTAMP.

+ Here is the call graph for this function:

◆ updateGroupType()

ilObjGroup::updateGroupType (   $a_group_type = GRP_TYPE_OPEN)

Change group type.

Revokes permissions of all parent non-protected roles and initiates these roles with the according il_grp_(open|closed) template.

@access public

Returns

Definition at line 1456 of file class.ilObjGroup.php.

1457 {
1458 global $DIC;
1459
1460 $logger = $DIC->logger()->grp();
1461
1462 if ($a_group_type == GRP_TYPE_OPEN) {
1463 $this->applyDidacticTemplate(0);
1464 return;
1465 }
1466
1467 $templates = ilDidacticTemplateSettings::getInstanceByObjectType($this->getType())->getTemplates();
1468 foreach ($templates as $template) {
1469 // the closed template
1470 if ($template->isAutoGenerated()) {
1471 $logger->info('Appying default closed template');
1472 $this->applyDidacticTemplate($template->getId());
1473 return;
1474 }
1475 }
1476 $logger->warning('No closed didactic template available.');
1477 }
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
applyDidacticTemplate($a_tpl_id)
Apply template.

References $DIC, applyDidacticTemplate(), ilDidacticTemplateSettings\getInstanceByObjectType(), ilObject\getType(), and GRP_TYPE_OPEN.

+ Here is the call graph for this function:

◆ validate()

ilObjGroup::validate ( )

validate group settings

@access public

Returns
bool

Definition at line 701 of file class.ilObjGroup.php.

702 {
703 global $DIC;
704
705 $ilErr = $DIC['ilErr'];
706
707 if (!$this->getTitle()) {
708 $this->title = '';
709 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
710 }
711 if ($this->getRegistrationType() == GRP_REGISTRATION_PASSWORD and !strlen($this->getPassword())) {
712 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
713 }
714 /*
715 if(ilDateTime::_before($this->getRegistrationEnd(),$this->getRegistrationStart()))
716 {
717 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
718 }
719 */
720 if ($this->isMembershipLimited()) {
721 if ($this->getMinMembers() <= 0 && $this->getMaxMembers() <= 0) {
722 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
723 }
724 if ($this->getMaxMembers() <= 0 && $this->isWaitingListEnabled()) {
725 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
726 }
727 if ($this->getMaxMembers() > 0 && $this->getMinMembers() > $this->getMaxMembers()) {
728 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
729 }
730 }
731 if (
732 ($this->getRegistrationStart() && !$this->getRegistrationEnd()) ||
733 (!$this->getRegistrationStart() && $this->getRegistrationEnd()) ||
734 $this->getRegistrationEnd() <= $this->getRegistrationStart()
735 ) {
736 $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
737 }
738
739 return strlen($ilErr->getMessage()) == 0;
740 }
const GRP_REGISTRATION_PASSWORD
$ilErr
Definition: raiseError.php:18

References $DIC, $ilErr, getMaxMembers(), getMinMembers(), getPassword(), getRegistrationEnd(), getRegistrationStart(), getRegistrationType(), ilObject\getTitle(), GRP_REGISTRATION_PASSWORD, isMembershipLimited(), and isWaitingListEnabled().

+ Here is the call graph for this function:

Field Documentation

◆ $auto_fill_from_waiting

ilObjGroup::$auto_fill_from_waiting
protected

Definition at line 70 of file class.ilObjGroup.php.

Referenced by hasWaitingListAutoFill().

◆ $auto_notification

ilObjGroup::$auto_notification = true
protected

Definition at line 77 of file class.ilObjGroup.php.

Referenced by getAutoNotification().

◆ $enablemap

ilObjGroup::$enablemap = 0
private

Definition at line 101 of file class.ilObjGroup.php.

Referenced by getEnableGroupMap().

◆ $end

ilObjGroup::$end = null
protected

Definition at line 94 of file class.ilObjGroup.php.

Referenced by register(), and setPeriod().

◆ $file_obj

ilObjGroup::$file_obj = null

Group file object for handling of export files.

Definition at line 117 of file class.ilObjGroup.php.

◆ $group_type

ilObjGroup::$group_type = null
protected

Definition at line 59 of file class.ilObjGroup.php.

Referenced by getGroupType().

◆ $grp_start_time_indication

ilObjGroup::$grp_start_time_indication = false
protected

Definition at line 83 of file class.ilObjGroup.php.

◆ $information

ilObjGroup::$information
protected

Definition at line 58 of file class.ilObjGroup.php.

Referenced by getInformation().

◆ $latitude

ilObjGroup::$latitude = ''
private

Definition at line 98 of file class.ilObjGroup.php.

Referenced by getLatitude().

◆ $leave_end

ilObjGroup::$leave_end
protected

Definition at line 71 of file class.ilObjGroup.php.

Referenced by getCancellationEnd().

◆ $locationzoom

ilObjGroup::$locationzoom = 0
private

Definition at line 100 of file class.ilObjGroup.php.

Referenced by getLocationZoom().

◆ $longitude

ilObjGroup::$longitude = ''
private

Definition at line 99 of file class.ilObjGroup.php.

Referenced by getLongitude().

◆ $m_grpStatus

ilObjGroup::$m_grpStatus

Definition at line 119 of file class.ilObjGroup.php.

◆ $m_roleAdminId

ilObjGroup::$m_roleAdminId

Definition at line 123 of file class.ilObjGroup.php.

◆ $m_roleMemberId

ilObjGroup::$m_roleMemberId

Definition at line 121 of file class.ilObjGroup.php.

◆ $mail_members

ilObjGroup::$mail_members = self::MAIL_ALLOWED_ALL
private

Definition at line 108 of file class.ilObjGroup.php.

Referenced by getMailToMembersType().

◆ $members_obj

ilObjGroup::$members_obj

Definition at line 111 of file class.ilObjGroup.php.

Referenced by getMembersObject().

◆ $reg_access_code

ilObjGroup::$reg_access_code = ''
private

Definition at line 103 of file class.ilObjGroup.php.

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjGroup::$reg_access_code_enabled = false
private

Definition at line 104 of file class.ilObjGroup.php.

Referenced by isRegistrationAccessCodeEnabled().

◆ $reg_enabled

ilObjGroup::$reg_enabled = true
protected

Definition at line 61 of file class.ilObjGroup.php.

◆ $reg_end

ilObjGroup::$reg_end = null
protected

Definition at line 64 of file class.ilObjGroup.php.

Referenced by getRegistrationEnd().

◆ $reg_max_members

ilObjGroup::$reg_max_members = 0
protected

Definition at line 68 of file class.ilObjGroup.php.

Referenced by getMaxMembers().

◆ $reg_membership_limitation

ilObjGroup::$reg_membership_limitation = false
protected

Definition at line 66 of file class.ilObjGroup.php.

Referenced by isMembershipLimited().

◆ $reg_min_members

ilObjGroup::$reg_min_members = 0
protected

Definition at line 67 of file class.ilObjGroup.php.

Referenced by getMinMembers().

◆ $reg_password

ilObjGroup::$reg_password = ''
protected

Definition at line 65 of file class.ilObjGroup.php.

Referenced by getPassword().

◆ $reg_start

ilObjGroup::$reg_start = null
protected

Definition at line 63 of file class.ilObjGroup.php.

Referenced by getRegistrationStart().

◆ $reg_type

ilObjGroup::$reg_type = GRP_REGISTRATION_DIRECT
protected

Definition at line 60 of file class.ilObjGroup.php.

Referenced by getRegistrationType().

◆ $reg_unlimited

ilObjGroup::$reg_unlimited = true
protected

Definition at line 62 of file class.ilObjGroup.php.

Referenced by isRegistrationUnlimited().

◆ $show_members

ilObjGroup::$show_members = 1
protected

Definition at line 72 of file class.ilObjGroup.php.

Referenced by getShowMembers().

◆ $SHOW_MEMBERS_DISABLED

ilObjGroup::$SHOW_MEMBERS_DISABLED = 0

Definition at line 56 of file class.ilObjGroup.php.

◆ $SHOW_MEMBERS_ENABLED

ilObjGroup::$SHOW_MEMBERS_ENABLED = 1

Definition at line 55 of file class.ilObjGroup.php.

◆ $start

ilObjGroup::$start = null
protected

Definition at line 89 of file class.ilObjGroup.php.

Referenced by register(), and setPeriod().

◆ $view_mode

ilObjGroup::$view_mode = ilContainer::VIEW_DEFAULT
private

Definition at line 106 of file class.ilObjGroup.php.

Referenced by getViewMode(), lookupViewMode(), and translateViewMode().

◆ $waiting_list

ilObjGroup::$waiting_list = false
protected

Definition at line 69 of file class.ilObjGroup.php.

Referenced by handleAutoFill(), isWaitingListEnabled(), and register().

◆ CAL_END

const ilObjGroup::CAL_END = 4

Definition at line 38 of file class.ilObjGroup.php.

◆ CAL_REG_END

const ilObjGroup::CAL_REG_END = 2

Definition at line 36 of file class.ilObjGroup.php.

◆ CAL_REG_START

const ilObjGroup::CAL_REG_START = 1

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

◆ CAL_START

const ilObjGroup::CAL_START = 3

Definition at line 37 of file class.ilObjGroup.php.

◆ ERR_MISSING_GROUP_TYPE

const ilObjGroup::ERR_MISSING_GROUP_TYPE = 'grp_missing_grp_type'

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

◆ ERR_MISSING_MIN_MAX_MEMBERS

const ilObjGroup::ERR_MISSING_MIN_MAX_MEMBERS = 'grp_wrong_min_max_members'

Definition at line 48 of file class.ilObjGroup.php.

◆ ERR_MISSING_PASSWORD

const ilObjGroup::ERR_MISSING_PASSWORD = 'grp_missing_password'

Definition at line 45 of file class.ilObjGroup.php.

◆ ERR_MISSING_TITLE

const ilObjGroup::ERR_MISSING_TITLE = 'msg_no_title'

Definition at line 43 of file class.ilObjGroup.php.

◆ ERR_WRONG_MAX_MEMBERS

const ilObjGroup::ERR_WRONG_MAX_MEMBERS = 'grp_wrong_max_members'

Definition at line 46 of file class.ilObjGroup.php.

◆ ERR_WRONG_MIN_MAX_MEMBERS

const ilObjGroup::ERR_WRONG_MIN_MAX_MEMBERS = 'grp_max_and_min_members_invalid'

Definition at line 49 of file class.ilObjGroup.php.

◆ ERR_WRONG_REG_TIME_LIMIT

const ilObjGroup::ERR_WRONG_REG_TIME_LIMIT = 'grp_wrong_reg_time_limit'

Definition at line 47 of file class.ilObjGroup.php.

◆ ERR_WRONG_REGISTRATION_LIMITED

const ilObjGroup::ERR_WRONG_REGISTRATION_LIMITED = 'grp_err_registration_limited'

Definition at line 50 of file class.ilObjGroup.php.

◆ GRP_ADMIN

const ilObjGroup::GRP_ADMIN = 2

Definition at line 41 of file class.ilObjGroup.php.

◆ GRP_MEMBER

const ilObjGroup::GRP_MEMBER = 1

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

◆ MAIL_ALLOWED_ALL

const ilObjGroup::MAIL_ALLOWED_ALL = 1

Definition at line 52 of file class.ilObjGroup.php.

Referenced by ilObjGroupGUI\executeCommand(), and ilObjGroupGUI\initForm().

◆ MAIL_ALLOWED_TUTORS

const ilObjGroup::MAIL_ALLOWED_TUTORS = 2

Definition at line 53 of file class.ilObjGroup.php.

Referenced by ilObjGroupGUI\initForm().


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