ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 getStart ()
 Get group start. More...
 
 setStart (ilDate $start=null)
 Set start. More...
 
 getEnd ()
 Get end. More...
 
 setEnd (ilDate $end=null)
 Set end. More...
 
 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...
 
 initGroupStatus ($a_grpStatus=GRP_TYPE_PUBLIC)
 set group status More...
 
 setGroupStatus ($a_status)
 Set group status. More...
 
 getGroupStatus ()
 get group status More...
 
 readGroupStatus ()
 get group status, redundant method because @access public 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)
 
 getSubItems ($a_admin_panel_enabled=false, $a_include_side_block=false, $a_get_single=0)
 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)
 only called in ilTree::saveSubTree More...
 
static setDeletedDates ($a_ref_ids)
 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

 prepareAppointments ($a_mode='create')
 Prepare calendar appointments. More...
 
 initParticipants ()
 init participants object 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
 
 $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
 

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 113 of file class.ilObjGroup.php.

114 {
115 global $DIC;
116
117 $tree = $DIC['tree'];
118
119 $this->tree = &$tree;
120
121 $this->type = "grp";
122 parent::__construct($a_id, $a_call_by_reference);
123 $this->setRegisterMode(true); // ???
124 }
setRegisterMode($a_bool)
global $DIC
Definition: saml.php:7

References $DIC, ilContainer\$tree, and ilObject\setRegisterMode().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getMembers()

ilObjGroup::_getMembers (   $a_obj_id)

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

1735 {
1736 global $DIC;
1737
1738 $rbacreview = $DIC['rbacreview'];
1739
1740 // get reference
1741 $ref_ids = ilObject::_getAllReferences($a_obj_id);
1742 $ref_id = current($ref_ids);
1743
1744 $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
1745
1746 $users = array();
1747 foreach ($local_roles as $role_id) {
1748 $users = array_merge($users, $rbacreview->assignedUsers($role_id));
1749 }
1750
1751 return array_unique($users);
1752 }
$users
Definition: authpage.php:44
static _getAllReferences($a_id)
get all reference ids of object

References $DIC, ilObject\$rbacreview, ilObject\$ref_id, $users, 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 1685 of file class.ilObjGroup.php.

1686 {
1687 global $DIC;
1688
1689 $rbacreview = $DIC['rbacreview'];
1690 $ilObjDataCache = $DIC['ilObjDataCache'];
1691 $ilDB = $DIC['ilDB'];
1692
1693 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
1694 $user_roles = $rbacreview->assignedRoles($a_user_id);
1695
1696 // Used for membership limitations -> check membership by given field
1697 if ($a_field) {
1698 include_once './Services/User/classes/class.ilObjUser.php';
1699
1700 $tmp_user = &ilObjectFactory::getInstanceByObjId($a_user_id);
1701 switch ($a_field) {
1702 case 'login':
1703 $and = "AND login = '" . $tmp_user->getLogin() . "' ";
1704 break;
1705 case 'email':
1706 $and = "AND email = '" . $tmp_user->getEmail() . "' ";
1707 break;
1708 case 'matriculation':
1709 $and = "AND matriculation = '" . $tmp_user->getMatriculation() . "' ";
1710 break;
1711
1712 default:
1713 $and = "AND usr_id = '" . $a_user_id . "'";
1714 break;
1715 }
1716 if (!$members = ilObjGroup::_getMembers($ilObjDataCache->lookupObjId($a_ref_id))) {
1717 return false;
1718 }
1719 $query = "SELECT * FROM usr_data as ud " .
1720 "WHERE usr_id IN (" . implode(",", ilUtil::quoteArray($members)) . ") " .
1721 $and;
1722 $res = $ilDB->query($query);
1723
1724 return $res->numRows() ? true : false;
1725 }
1726
1727 if (!array_intersect($local_roles, $user_roles)) {
1728 return false;
1729 }
1730
1731 return true;
1732 }
_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 1669 of file class.ilObjGroup.php.

1670 {
1671 global $DIC;
1672
1673 $ilDB = $DIC['ilDB'];
1674
1675 $query = "SELECT * FROM object_data WHERE title = " .
1676 $ilDB->quote($a_title, 'text') . " AND type = 'grp'";
1677 $res = $ilDB->query($query);
1678 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1679 return $row->obj_id;
1680 }
1681 return 0;
1682 }
$row

References $DIC, $ilDB, $query, $res, $row, 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 1862 of file class.ilObjGroup.php.

1863 {
1864 include_once './Services/Object/classes/class.ilObjectActivation.php';
1866 }
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 1063 of file class.ilObjGroup.php.

1064 {
1065 global $DIC;
1066
1067 $rbacadmin = $DIC['rbacadmin'];
1068
1069 if (isset($a_user_id) && isset($a_mem_role)) {
1070 $this->join($a_user_id, $a_mem_role);
1071 return true;
1072 } else {
1073 $this->ilias->raiseError(get_class($this) . "::addMember(): Missing parameters !", $this->ilias->error_obj->WARNING);
1074 return false;
1075 }
1076 }
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 1876 of file class.ilObjGroup.php.

1877 {
1878 if ($this->getMessage()) {
1879 $this->message .= "<br /> ";
1880 }
1881 $this->message .= $a_message;
1882 }

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 1658 of file class.ilObjGroup.php.

1659 {
1660 parent::applyDidacticTemplate($a_tpl_id);
1661
1662 if (!$a_tpl_id) {
1663 // init default type
1664 $this->setParentRolePermissions($this->getRefId());
1665 }
1666 }
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 988 of file class.ilObjGroup.php.

989 {
990 global $DIC;
991
992 $rbacadmin = $DIC['rbacadmin'];
993 $rbacreview = $DIC['rbacreview'];
994
995 $admin = $this->getDefaultAdminRole();
996 $new_admin = $new_obj->getDefaultAdminRole();
997 if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
998 ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_admin');
999 }
1000 $rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
1001 ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_admin.');
1002
1003 $member = $this->getDefaultMemberRole();
1004 $new_member = $new_obj->getDefaultMemberRole();
1005 if (!$member || !$new_member) {
1006 ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_member');
1007 }
1008 $rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
1009 ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_member.');
1010 }
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 960 of file class.ilObjGroup.php.

961 {
962 global $DIC;
963
964 $tree = $DIC['tree'];
965
966 parent::cloneDependencies($a_target_id, $a_copy_id);
967
968 include_once('Services/Object/classes/class.ilObjectActivation.php');
969 ilObjectActivation::cloneDependencies($this->getRefId(), $a_target_id, $a_copy_id);
970
971 // clone membership limitation
972 foreach (\ilObjCourseGrouping::_getGroupings($this->getId()) as $grouping_id) {
973 \ilLoggerFactory::getLogger('grp')->info('Handling grouping id: ' . $grouping_id);
974 $grouping = new \ilObjCourseGrouping($grouping_id);
975 $grouping->cloneGrouping($a_target_id, $a_copy_id);
976 }
977
978 return true;
979 }
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 884 of file class.ilObjGroup.php.

885 {
886 global $DIC;
887
888 $ilDB = $DIC['ilDB'];
889 $ilUser = $DIC['ilUser'];
890 $ilSetting = $DIC['ilSetting'];
891
892 $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
893
894 // current template
895 $current_template = ilDidacticTemplateObjSettings::lookupTemplateId($this->getRefId());
896 $new_obj->applyDidacticTemplate($current_template);
897 $this->cloneAutoGeneratedRoles($new_obj);
898 $this->cloneMetaData($new_obj);
899
900 $new_obj->setRegistrationType($this->getRegistrationType());
901 $new_obj->setInformation($this->getInformation());
902 $new_obj->setRegistrationStart($this->getRegistrationStart());
903 $new_obj->setRegistrationEnd($this->getRegistrationEnd());
904 $new_obj->enableUnlimitedRegistration($this->isRegistrationUnlimited());
905 $new_obj->setPassword($this->getPassword());
906 $new_obj->enableMembershipLimitation($this->isMembershipLimited());
907 $new_obj->setMaxMembers($this->getMaxMembers());
908 $new_obj->enableWaitingList($this->isWaitingListEnabled());
909 $new_obj->setShowMembers($this->getShowMembers());
910
911 // map
912 $new_obj->setLatitude($this->getLatitude());
913 $new_obj->setLongitude($this->getLongitude());
914 $new_obj->setLocationZoom($this->getLocationZoom());
915 $new_obj->setEnableGroupMap($this->getEnableGroupMap());
916 $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
917 include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
918 $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
919
920 $new_obj->setViewMode($this->view_mode);
921 $new_obj->setMailToMembersType($this->getMailToMembersType());
922
923 $new_obj->setCancellationEnd($this->getCancellationEnd());
924 $new_obj->setMinMembers($this->getMinMembers());
925 $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
926
927 $new_obj->setStart($this->getStart());
928 $new_obj->setEnd($this->getEnd());
929
930 $new_obj->update();
931
932 // #13008 - Group Defined Fields
933 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
934 ilCourseDefinedFieldDefinition::_clone($this->getId(), $new_obj->getId());
935
936 // Assign user as admin
937 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
938 $part = ilGroupParticipants::_getInstanceByObjId($new_obj->getId());
939 $part->add($ilUser->getId(), IL_GRP_ADMIN);
940 $part->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
941 $part->updateContact($ilUser->getId(), true);
942
943 // Copy learning progress settings
944 include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
945 $obj_settings = new ilLPObjSettings($this->getId());
946 $obj_settings->cloneSettings($new_obj->getId());
947 unset($obj_settings);
948
949 return $new_obj;
950 }
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
getEnd()
Get end.
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.
getStart()
Get group start.
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(), 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 674 of file class.ilObjGroup.php.

675 {
676 global $DIC;
677
678 $ilDB = $DIC['ilDB'];
679 $ilAppEventHandler = $DIC['ilAppEventHandler'];
680
681 if (!parent::create()) {
682 return false;
683 }
684
685 if (!$a_upload) {
686 $this->createMetaData();
687 }
688
689
690 $query = "INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
691 "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
692 "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
693 "leave_end,registration_min_members,auto_wait, grp_start, grp_end) " .
694 "VALUES(" .
695 $ilDB->quote($this->getId(), 'integer') . ", " .
696 $ilDB->quote($this->getInformation(), 'text') . ", " .
697 $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
698 $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
699 $ilDB->quote(($this->isRegistrationEnabled() ? 1 : 0), 'integer') . ", " .
700 $ilDB->quote(($this->isRegistrationUnlimited() ? 1 : 0), 'integer') . ", " .
701 $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
702 $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
703 $ilDB->quote($this->getPassword(), 'text') . ", " .
704 $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
705 $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
706 $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
707 $ilDB->quote($this->getLatitude(), 'text') . ", " .
708 $ilDB->quote($this->getLongitude(), 'text') . ", " .
709 $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
710 $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
711 $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
712 $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
713 $ilDB->quote($this->view_mode, 'integer') . ', ' .
714 $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
715 $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
716 $ilDB->quote($this->getMinMembers(), 'integer') . ', ' .
717 $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ', ' .
718 $ilDB->quote($this->getStart() instanceof ilDate ? $this->getStart()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
719 $ilDB->quote($this->getEnd() instanceof ilDate ? $this->getEnd()->get(IL_CAL_UNIX) : null, 'integer') . ' ' .
720 ")";
721 $res = $ilDB->manipulate($query);
722
723 $ilAppEventHandler->raise(
724 'Modules/Group',
725 'create',
726 array('object' => $this,
727 'obj_id' => $this->getId(),
728 'appointments' => $this->prepareAppointments('create'))
729 );
730
731 return $this->getId();
732 }
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(), 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(), and prepareAppointments().

+ 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 796 of file class.ilObjGroup.php.

797 {
798 global $DIC;
799
800 $ilDB = $DIC['ilDB'];
801 $ilAppEventHandler = $DIC['ilAppEventHandler'];
802
803 // always call parent delete function first!!
804 if (!parent::delete()) {
805 return false;
806 }
807
808 $query = "DELETE FROM grp_settings " .
809 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
810 $res = $ilDB->manipulate($query);
811
812 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
814
815 $ilAppEventHandler->raise(
816 'Modules/Group',
817 'delete',
818 array('object' => $this,
819 'obj_id' => $this->getId(),
820 'appointments' => $this->prepareAppointments('delete'))
821 );
822
823
824 return true;
825 }
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 326 of file class.ilObjGroup.php.

327 {
328 $this->reg_membership_limitation = $a_status;
329 }

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 542 of file class.ilObjGroup.php.

543 {
544 $this->reg_access_code_enabled = $a_status;
545 }

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 234 of file class.ilObjGroup.php.

235 {
236 $this->reg_unlimited = $a_status;
237 }

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 393 of file class.ilObjGroup.php.

394 {
395 $this->waiting_list = $a_status;
396 }

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 2135 of file class.ilObjGroup.php.

2136 {
2137 $ilDB = $GLOBALS['DIC']->database();
2138 $tree = $GLOBALS['DIC']->repositoryTree();
2139
2140 $res = array();
2141
2142 $now = date("Y-m-d H:i:s");
2143
2144 $before = new ilDateTime(time(), IL_CAL_UNIX);
2145 $before->increment(IL_CAL_DAY, -1);
2146 $now_date = $before->get(IL_CAL_DATETIME);
2147 $now = $before->get(IL_CAL_UNIX);
2148
2149 $set = $ilDB->query($q = "SELECT obj_id, registration_min_members" .
2150 " FROM grp_settings" .
2151 " WHERE registration_min_members > " . $ilDB->quote(0, "integer") .
2152 " AND registration_mem_limit = " . $ilDB->quote(1, "integer") . // #17206
2153 " AND ((leave_end IS NOT NULL" .
2154 " AND leave_end < " . $ilDB->quote($now, "integer") . ")" .
2155 " OR (leave_end IS NULL" .
2156 " AND registration_end IS NOT NULL" .
2157 " AND registration_end < " . $ilDB->quote($now_date, "text") . "))" .
2158 " AND (grp_start IS NULL OR grp_start > " . $ilDB->quote($now, "integer") . ")");
2159 while ($row = $ilDB->fetchAssoc($set)) {
2160 $refs = ilObject::_getAllReferences($row['obj_id']);
2161 $ref = end($refs);
2162
2163 if ($tree->isDeleted($ref)) {
2164 continue;
2165 }
2166
2167 $part = new ilGroupParticipants($row["obj_id"]);
2168 $reci = $part->getNotificationRecipients();
2169 if (sizeof($reci)) {
2170 $missing = (int) $row["registration_min_members"] - $part->getCountMembers();
2171 if ($missing > 0) {
2172 $res[$row["obj_id"]] = array($missing, $reci);
2173 }
2174 }
2175 }
2176
2177 return $res;
2178 }
const IL_CAL_DAY
@classDescription Date and time handling
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

References $GLOBALS, $ilDB, $res, $row, 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:

◆ getCancellationEnd()

ilObjGroup::getCancellationEnd ( )

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

572 {
573 return $this->leave_end;
574 }

References $leave_end.

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

+ Here is the caller graph for this function:

◆ getCountMembers()

ilObjGroup::getCountMembers ( )

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

1203 {
1204 return count($this->getGroupMemberIds());
1205 }
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 1050 of file class.ilObjGroup.php.

1051 {
1052 $local_group_Roles = $this->getLocalGroupRoles();
1053
1054 return $local_group_Roles["il_grp_admin_" . $this->getRefId()];
1055 }
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 1240 of file class.ilObjGroup.php.

1241 {
1242 global $DIC;
1243
1244 $rbacadmin = $DIC['rbacadmin'];
1245 $rbacreview = $DIC['rbacreview'];
1246
1247 if (strlen($a_grp_id) > 0) {
1248 $grp_id = $a_grp_id;
1249 } else {
1250 $grp_id = $this->getRefId();
1251 }
1252
1253 $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1254
1255 foreach ($role_arr as $role_id) {
1256 $role_Obj = &$this->ilias->obj_factory->getInstanceByObjId($role_id);
1257
1258 $grp_Member = "il_grp_member_" . $grp_id;
1259 $grp_Admin = "il_grp_admin_" . $grp_id;
1260
1261 if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
1262 $arr_grpDefaultRoles["grp_member_role"] = $role_Obj->getId();
1263 }
1264
1265 if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
1266 $arr_grpDefaultRoles["grp_admin_role"] = $role_Obj->getId();
1267 }
1268 }
1269
1270 return $arr_grpDefaultRoles;
1271 }

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

Referenced by getGroupAdminIds(), isAdmin(), and readGroupStatus().

+ 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 1039 of file class.ilObjGroup.php.

1040 {
1041 $local_group_Roles = $this->getLocalGroupRoles();
1042
1043 return $local_group_Roles["il_grp_member_" . $this->getRefId()];
1044 }

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 504 of file class.ilObjGroup.php.

505 {
506 return (bool) $this->enablemap;
507 }

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 494 of file class.ilObjGroup.php.

495 {
496 return $this->getEnableGroupMap();
497 }

References getEnableGroupMap().

+ Here is the call graph for this function:

◆ getEnd()

ilObjGroup::getEnd ( )

Get end.

Returns
ilDate

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

608 {
609 return $this->end;
610 }

References $end.

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 1213 of file class.ilObjGroup.php.

1214 {
1215 global $DIC;
1216
1217 $rbacreview = $DIC['rbacreview'];
1218
1219 if (!empty($a_grpId)) {
1220 $grp_id = $a_grpId;
1221 } else {
1222 $grp_id = $this->getRefId();
1223 }
1224
1225 $usr_arr = array();
1226 $roles = $this->getDefaultGroupRoles($this->getRefId());
1227
1228 foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
1229 array_push($usr_arr, $member_id);
1230 }
1231
1232 return $usr_arr;
1233 }
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 1167 of file class.ilObjGroup.php.

1168 {
1169 global $DIC;
1170
1171 $rbacadmin = $DIC['rbacadmin'];
1172 $rbacreview = $DIC['rbacreview'];
1173 $ilBench = $DIC['ilBench'];
1174 $ilDB = $DIC['ilDB'];
1175
1176 $usr_arr = array();
1177
1178 $q = "SELECT login,firstname,lastname,title,usr_id,last_login " .
1179 "FROM usr_data " .
1180 "WHERE usr_id IN (" . implode(',', ilUtil::quoteArray($a_mem_ids)) . ") ";
1181
1182 if (is_numeric($active) && $active > -1) {
1183 $q .= "AND active = '$active'";
1184 }
1185
1186 $q .= 'ORDER BY lastname,firstname';
1187
1188 $r = $ilDB->query($q);
1189
1190 while ($row = $r->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1191 $mem_arr[] = array("id" => $row->usr_id,
1192 "login" => $row->login,
1193 "firstname" => $row->firstname,
1194 "lastname" => $row->lastname,
1195 "last_login" => $row->last_login
1196 );
1197 }
1198
1199 return $mem_arr ? $mem_arr : array();
1200 }
$r
Definition: example_031.php:79
global $ilBench
Definition: ilias.php:18

References $DIC, $ilBench, $ilDB, $r, ilObject\$rbacadmin, ilObject\$rbacreview, $row, 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 1138 of file class.ilObjGroup.php.

1139 {
1140 global $DIC;
1141
1142 $rbacadmin = $DIC['rbacadmin'];
1143 $rbacreview = $DIC['rbacreview'];
1144
1145 $usr_arr = array();
1146
1147 $rol = $this->getLocalGroupRoles();
1148
1149 foreach ($rol as $value) {
1150 foreach ($rbacreview->assignedUsers($value) as $member_id) {
1151 array_push($usr_arr, $member_id);
1152 }
1153 }
1154
1155 $mem_arr = array_unique($usr_arr);
1156
1157 return $mem_arr ? $mem_arr : array();
1158 }

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 1506 of file class.ilObjGroup.php.

1507 {
1508 return $this->group_status;
1509 }

◆ getGroupType()

ilObjGroup::getGroupType ( )

get group type

@access public

Returns
int group type

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

189 {
190 return $this->group_type;
191 }

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 1313 of file class.ilObjGroup.php.

1314 {
1315 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1316 $res = $this->ilias->db->query($q);
1318
1319 return $row["obj_id"];
1320 }

References $res, $row, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by initGroupStatus().

+ Here is the caller graph for this function:

◆ getGrpStatusOpenTemplateId()

ilObjGroup::getGrpStatusOpenTemplateId ( )

get group status open template @access public

Parameters
returnobj_id of roletemplate containing permissionsettings for an open group

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

1328 {
1329 $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1330 $res = $this->ilias->db->query($q);
1332
1333 return $row["obj_id"];
1334 }

References $res, $row, and ilDBConstants\FETCHMODE_ASSOC.

Referenced by initGroupStatus(), and setParentRolePermissions().

+ Here is the caller graph for this function:

◆ getInformation()

ilObjGroup::getInformation ( )

get Information

@access public

Parameters

return string information

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

167 {
168 return $this->information;
169 }

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 435 of file class.ilObjGroup.php.

436 {
437 return $this->latitude;
438 }

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 1279 of file class.ilObjGroup.php.

1280 {
1281 global $DIC;
1282
1283 $rbacadmin = $DIC['rbacadmin'];
1284 $rbacreview = $DIC['rbacreview'];
1285
1286 if (empty($this->local_roles)) {
1287 $this->local_roles = array();
1288 $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1289
1290 foreach ($role_arr as $role_id) {
1291 if ($rbacreview->isAssignable($role_id, $this->getRefId()) == true) {
1292 $role_Obj = &$this->ilias->obj_factory->getInstanceByObjId($role_id);
1293
1294 if ($a_translate) {
1295 $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1296 } else {
1297 $role_name = $role_Obj->getTitle();
1298 }
1299
1300 $this->local_roles[$role_name] = $role_Obj->getId();
1301 }
1302 }
1303 }
1304
1305 return $this->local_roles;
1306 }
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 475 of file class.ilObjGroup.php.

476 {
477 return $this->locationzoom;
478 }

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 455 of file class.ilObjGroup.php.

456 {
457 return $this->longitude;
458 }

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 561 of file class.ilObjGroup.php.

562 {
563 return $this->mail_members;
564 }

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 381 of file class.ilObjGroup.php.

382 {
384 }

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 1544 of file class.ilObjGroup.php.

1545 {
1546 global $DIC;
1547
1548 $rbacadmin = $DIC['rbacadmin'];
1549 $rbacreview = $DIC['rbacreview'];
1550 $ilBench = $DIC['ilBench'];
1551
1552 $ilBench->start("Group", "getMemberRoles");
1553
1554 $arr_assignedRoles = array();
1555
1556 $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id), $this->getLocalGroupRoles());
1557
1558 $ilBench->stop("Group", "getMemberRoles");
1559
1560 return $arr_assignedRoles;
1561 }

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 1966 of file class.ilObjGroup.php.

1967 {
1968 // #17886
1969 if (!$this->members_obj instanceof ilGroupParticipants) {
1970 $this->initParticipants();
1971 }
1972 return $this->members_obj;
1973 }
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 1868 of file class.ilObjGroup.php.

1869 {
1870 return $this->message;
1871 }
catch(Exception $e) $message

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 359 of file class.ilObjGroup.php.

360 {
362 }

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 314 of file class.ilObjGroup.php.

315 {
316 return $this->reg_password;
317 }

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 513 of file class.ilObjGroup.php.

514 {
516 }

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 292 of file class.ilObjGroup.php.

293 {
294 return $this->reg_end;
295 }

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 268 of file class.ilObjGroup.php.

269 {
270 return $this->reg_start;
271 }

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 211 of file class.ilObjGroup.php.

212 {
213 return $this->reg_type;
214 }

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 580 of file class.ilObjGroup.php.

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

References $show_members.

Referenced by cloneObject(), and update().

+ Here is the caller graph for this function:

◆ getStart()

ilObjGroup::getStart ( )

Get group start.

Returns
ilDate

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

590 {
591 return $this->start;
592 }

References $start.

Referenced by cloneObject(), create(), 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 1758 of file class.ilObjGroup.php.

1759 {
1761
1762 // default: by type
1763 $view = self::lookupViewMode($this->getId());
1764
1765 if ($view != ilContainer::VIEW_INHERIT) {
1766 return $view;
1767 }
1768
1769 $container_ref_id = $tree->checkForParentType($this->ref_id, 'crs');
1770 if ($container_ref_id) {
1772 // these three are available...
1773 if (
1777 return $view_mode;
1778 }
1779 }
1781 }
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 2072 of file class.ilObjGroup.php.

2073 {
2074 if ($this->isWaitingListEnabled() &&
2075 $this->hasWaitingListAutoFill()) {
2076 $max = $this->getMaxMembers();
2078 if ($max > $now) {
2079 // see assignFromWaitingListObject()
2080 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2081 $waiting_list = new ilGroupWaitingList($this->getId());
2082
2083 foreach ($waiting_list->getUserIds() as $user_id) {
2084 if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
2085 continue;
2086 }
2087 if ($this->getMembersObject()->isAssigned($user_id)) {
2088 continue;
2089 }
2090 $this->getMembersObject()->add($user_id, IL_GRP_MEMBER); // #18213
2091 include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
2093 $waiting_list->removeFromList($user_id);
2094
2095 $now++;
2096 if ($now >= $max) {
2097 break;
2098 }
2099 }
2100 }
2101 }
2102 }
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 415 of file class.ilObjGroup.php.

416 {
417 return (bool) $this->auto_fill_from_waiting;
418 }

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 1588 of file class.ilObjGroup.php.

1589 {
1590 include_once './Services/AccessControl/classes/class.ilObjRole.php';
1592 'il_grp_admin_' . $this->getRefId(),
1593 "Groupadmin group obj_no." . $this->getId(),
1594 'il_grp_admin',
1595 $this->getRefId()
1596 );
1597 $this->m_roleAdminId = $role->getId();
1598
1600 'il_grp_member_' . $this->getRefId(),
1601 "Groupmember of group obj_no." . $this->getId(),
1602 'il_grp_member',
1603 $this->getRefId()
1604 );
1605 $this->m_roleMemberId = $role->getId();
1606
1607 return array();
1608 }
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:

◆ initGroupStatus()

ilObjGroup::initGroupStatus (   $a_grpStatus = GRP_TYPE_PUBLIC)

set group status

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

Creates linked roles in the local role folder object for all parent roles and initializes their permission templates. Each permission template is initialized by computing the intersection of the role template il_grp_status_open/_closed and the permission template of the parent role.

@access public

Parameters
integergroup status GRP_TYPE_PUBLIC or GRP_TYPE_CLOSED
Deprecated:
with 5.3 use ilObjGroup->updateGroupType

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

1414 {
1415 global $DIC;
1416
1417 $rbacadmin = $DIC['rbacadmin'];
1418 $rbacreview = $DIC['rbacreview'];
1419 $rbacsystem = $DIC['rbacsystem'];
1420
1421 //define all relevant roles that rights are needed to be changed
1422 $arr_parentRoles = $rbacreview->getParentRoleIds($this->getRefId());
1423
1424 $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId(), false);
1425 $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles), $real_local_roles);
1426
1427 //group status open (aka public) or group status closed
1428 if ($a_grpStatus == GRP_TYPE_PUBLIC || $a_grpStatus == GRP_TYPE_CLOSED) {
1429 if ($a_grpStatus == GRP_TYPE_PUBLIC) {
1431 } else {
1433 }
1434 //get defined operations from template
1435 $template_ops = $rbacreview->getOperationsOfRole($template_id, 'grp', ROLE_FOLDER_ID);
1436
1437 foreach ($arr_relevantParentRoleIds as $parentRole) {
1438 if ($rbacreview->isProtected($arr_parentRoles[$parentRole]['parent'], $parentRole)) {
1439 continue;
1440 }
1441
1442 $granted_permissions = array();
1443
1444 // Delete the linked role for the parent role
1445 // (just in case if it already exists).
1446
1447 // Added additional check, since this operation is very dangerous.
1448 // If there is no role folder ALL parent roles are deleted.
1449
1450 // @todo refactor rolf
1451 $rbacadmin->deleteLocalRole($parentRole, $this->getRefId());
1452
1453 // Grant permissions on the group object for
1454 // the parent role. In the foreach loop we
1455 // compute the intersection of the role
1456 // template il_grp_status_open/_closed and the
1457 // permission template of the parent role.
1458 $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->getRefId());
1459 $rbacadmin->revokePermission($this->getRefId(), $parentRole);
1460 foreach ($template_ops as $template_op) {
1461 if (in_array($template_op, $current_ops)) {
1462 array_push($granted_permissions, $template_op);
1463 }
1464 }
1465 if (!empty($granted_permissions)) {
1466 $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->getRefId());
1467 }
1468
1469 // Create a linked role for the parent role and
1470 // initialize it with the intersection of
1471 // il_grp_status_open/_closed and the permission
1472 // template of the parent role
1473
1474 $rbacadmin->copyRolePermissionIntersection(
1476 ROLE_FOLDER_ID,
1477 $parentRole,
1478 $arr_parentRoles[$parentRole]['parent'],
1479 $this->getRefId(),
1480 $parentRole
1481 );
1482 $rbacadmin->assignRoleToFolder($parentRole, $this->getRefId(), "false");
1483 }//END foreach
1484 }
1485 }
const GRP_TYPE_CLOSED
const GRP_TYPE_PUBLIC
getGrpStatusClosedTemplateId()
get group status closed template @access public
getGrpStatusOpenTemplateId()
get group status open template @access public
$template_id

References $DIC, ilObject\$rbacadmin, ilObject\$rbacreview, ilContainer\$rbacsystem, $template_id, getGrpStatusClosedTemplateId(), getGrpStatusOpenTemplateId(), ilObject\getRefId(), GRP_TYPE_CLOSED, and GRP_TYPE_PUBLIC.

+ Here is the call graph for this function:

◆ initParticipants()

ilObjGroup::initParticipants ( )
protected

init participants object

@access protected

Returns

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

1956 {
1957 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1958 $this->members_obj = ilGroupParticipants::_getInstanceByObjId($this->getId());
1959 }

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 1569 of file class.ilObjGroup.php.

1570 {
1571 global $DIC;
1572
1573 $rbacreview = $DIC['rbacreview'];
1574
1575 $grp_Roles = $this->getDefaultGroupRoles();
1576
1577 if (in_array($a_userId, $rbacreview->assignedUsers($grp_Roles["grp_admin_role"]))) {
1578 return true;
1579 } else {
1580 return false;
1581 }
1582 }

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 337 of file class.ilObjGroup.php.

338 {
340 }

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 532 of file class.ilObjGroup.php.

533 {
534 return (bool) $this->reg_access_code_enabled;
535 }

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 222 of file class.ilObjGroup.php.

223 {
225 }
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 245 of file class.ilObjGroup.php.

246 {
248 }

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 405 of file class.ilObjGroup.php.

406 {
407 return $this->waiting_list;
408 }

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 1018 of file class.ilObjGroup.php.

1019 {
1020 global $DIC;
1021
1022 $rbacadmin = $DIC['rbacadmin'];
1023
1024 if (is_array($a_mem_role)) {
1025 foreach ($a_mem_role as $role) {
1026 $rbacadmin->assignUser($role, $a_user_id, false);
1027 }
1028 } else {
1029 $rbacadmin->assignUser($a_mem_role, $a_user_id, false);
1030 }
1031
1032 return true;
1033 }

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 1113 of file class.ilObjGroup.php.

1114 {
1115 global $DIC;
1116
1117 $rbacadmin = $DIC['rbacadmin'];
1118
1119 $arr_groupRoles = $this->getMemberRoles($a_user_id);
1120
1121 if (is_array($arr_groupRoles)) {
1122 foreach ($arr_groupRoles as $groupRole) {
1123 $rbacadmin->deassignUser($groupRole, $a_user_id);
1124 }
1125 } else {
1126 $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1127 }
1128
1129 return true;
1130 }
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 1085 of file class.ilObjGroup.php.

1086 {
1087 global $DIC;
1088
1089 $rbacadmin = $DIC['rbacadmin'];
1090 $rbacreview = $DIC['rbacreview'];
1091
1092 $member_ids = $this->getGroupMemberIds();
1093
1094 if (count($member_ids) <= 1 || !in_array($this->ilias->account->getId(), $member_ids)) {
1095 return 2;
1096 } else {
1097 if (!$this->isAdmin($this->ilias->account->getId())) {
1098 $this->leave($this->ilias->account->getId());
1099 $member = new ilObjUser($this->ilias->account->getId());
1100 $member->dropDesktopItem($this->getRefId(), "grp");
1101
1102 return 0;
1103 } elseif (count($this->getGroupAdminIds()) == 1) {
1104 return 1;
1105 }
1106 }
1107 }
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(), ilObject\getRefId(), isAdmin(), and leave().

+ 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 1342 of file class.ilObjGroup.php.

1343 {
1344 global $DIC;
1345
1346 $ilDB = $DIC['ilDB'];
1347
1348 $type = self::lookupGroupTye($a_obj_id);
1349 if ($type == GRP_TYPE_CLOSED) {
1350 $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_closed', 'text');
1351 } else {
1352 $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_open', 'text');
1353 }
1354 $res = $ilDB->query($query);
1356
1357 return isset($row['obj_id']) ? $row['obj_id'] : 0;
1358 }
static lookupGroupTye($a_id)
Lookup group type.

References $DIC, $ilDB, $query, $res, $row, 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 131 of file class.ilObjGroup.php.

132 {
133 global $DIC;
134
135 $ilDB = $DIC['ilDB'];
136
137 $query = "SELECT grp_type FROM grp_settings " .
138 "WHERE obj_id = " . $ilDB->quote($a_id, 'integer');
139 $res = $ilDB->query($query);
140 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
141 return $row->grp_type;
142 }
143 return GRP_TYPE_UNKNOWN;
144 }
const GRP_TYPE_UNKNOWN

References $DIC, $ilDB, $query, $res, $row, 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 1979 of file class.ilObjGroup.php.

1980 {
1981 global $DIC;
1982
1983 $ilDB = $DIC['ilDB'];
1984
1985 $query = "SELECT obj_id FROM grp_settings " .
1986 "WHERE reg_ac_enabled = " . $ilDB->quote(1, 'integer') . " " .
1987 "AND reg_ac = " . $ilDB->quote($a_code, 'text');
1988 $res = $ilDB->query($query);
1989
1990 $obj_ids = array();
1991 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1992 $obj_ids[] = $row->obj_id;
1993 }
1994 return $obj_ids;
1995 }

References $DIC, $ilDB, $query, $res, $row, 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 2180 of file class.ilObjGroup.php.

2180 : bool
2181 {
2182 global $DIC;
2183 $ilDB = $DIC["ilDB"];
2184 $query = 'SELECT show_members FROM grp_settings'
2185 .' WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer');
2186 $res = $ilDB->query($query);
2187 if($ilDB->numRows($res) == 0) {
2188 return false;
2189 }
2190 $row = $ilDB->fetchAssoc($res);
2191 return (bool)$row['show_members'];
2192 }

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

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 1797 of file class.ilObjGroup.php.

1798 {
1799 global $DIC;
1800
1801 $ilDB = $DIC['ilDB'];
1802
1803 $query = 'SELECT view_mode FROM grp_settings ' .
1804 'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
1805 $res = $ilDB->query($query);
1806
1807 $view_mode = null;
1808 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1809 $view_mode = $row->view_mode;
1810 }
1811 return $view_mode;
1812 }

References $DIC, $ilDB, $query, $res, $row, $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 2104 of file class.ilObjGroup.php.

2105 {
2106 global $DIC;
2107
2108 $ilUser = $DIC['ilUser'];
2109 $ilDB = $DIC['ilDB'];
2110
2111 if (!$a_user_id) {
2112 $a_user_id = $ilUser->getId();
2113 }
2114
2115 $set = $ilDB->query("SELECT leave_end" .
2116 " FROM grp_settings" .
2117 " WHERE obj_id = " . $ilDB->quote($a_group_id, "integer"));
2118 $row = $ilDB->fetchAssoc($set);
2119 if ($row && $row["leave_end"]) {
2120 // timestamp to date
2121 $limit = date("Ymd", $row["leave_end"]);
2122 if ($limit < date("Ymd")) {
2123 $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2124 return false;
2125 }
2126 }
2127 return true;
2128 }
const IL_CAL_DATE

References $DIC, $ilDB, $ilUser, $row, 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 1891 of file class.ilObjGroup.php.

1892 {
1893 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1894
1895 switch ($a_mode) {
1896 case 'create':
1897 case 'update':
1898
1899 $apps = array();
1900 if ($this->getStart() && $this->getEnd()) {
1901 $app = new ilCalendarAppointmentTemplate(self::CAL_START);
1902 $app->setTitle($this->getTitle());
1903 $app->setSubtitle('grp_cal_start');
1904 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1905 $app->setDescription($this->getLongDescription());
1906 $app->setStart($this->getStart());
1907 $app->setFullday(true);
1908 $apps[] = $app;
1909
1910 $app = new ilCalendarAppointmentTemplate(self::CAL_END);
1911 $app->setTitle($this->getTitle());
1912 $app->setSubtitle('grp_cal_end');
1913 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1914 $app->setDescription($this->getLongDescription());
1915 $app->setStart($this->getEnd());
1916 $app->setFullday(true);
1917 $apps[] = $app;
1918 }
1919 if ($this->isRegistrationUnlimited()) {
1920 return $apps;
1921 }
1922
1923 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1924 $app->setTitle($this->getTitle());
1925 $app->setSubtitle('grp_cal_reg_start');
1926 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1927 $app->setDescription($this->getLongDescription());
1928 $app->setStart($this->getRegistrationStart());
1929 $apps[] = $app;
1930
1931 $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1932 $app->setTitle($this->getTitle());
1933 $app->setSubtitle('grp_cal_reg_end');
1934 $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1935 $app->setDescription($this->getLongDescription());
1936 $app->setStart($this->getRegistrationEnd());
1937 $apps[] = $app;
1938
1939
1940 return $apps;
1941
1942 case 'delete':
1943 // Nothing to do: The category and all assigned appointments will be deleted.
1944 return array();
1945 }
1946 }
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

References getEnd(), ilObject\getLongDescription(), getRegistrationEnd(), getRegistrationStart(), getStart(), 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 831 of file class.ilObjGroup.php.

832 {
833 global $DIC;
834
835 $ilDB = $DIC['ilDB'];
836
837 parent::read();
838
839 $query = "SELECT * FROM grp_settings " .
840 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
841
842 $res = $ilDB->query($query);
843 while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
844 $this->setInformation($row->information);
845 $this->setGroupType($row->grp_type);
846 $this->setRegistrationType($row->registration_type);
847 $this->enableUnlimitedRegistration($row->registration_unlimited);
848 $this->setRegistrationStart(new ilDateTime($row->registration_start, IL_CAL_DATETIME));
849 $this->setRegistrationEnd(new ilDateTime($row->registration_end, IL_CAL_DATETIME));
850 $this->setPassword($row->registration_password);
851 $this->enableMembershipLimitation((bool) $row->registration_mem_limit);
852 $this->setMaxMembers($row->registration_max_members);
853 $this->enableWaitingList($row->waiting_list);
854 $this->setLatitude($row->latitude);
855 $this->setLongitude($row->longitude);
856 $this->setLocationZoom($row->location_zoom);
857 $this->setEnableGroupMap($row->enablemap);
858 $this->enableRegistrationAccessCode($row->reg_ac_enabled);
859 $this->setRegistrationAccessCode($row->reg_ac);
860 $this->setViewMode($row->view_mode);
861 $this->setMailToMembersType($row->mail_members_type);
862 $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
863 $this->setMinMembers($row->registration_min_members);
864 $this->setWaitingListAutoFill($row->auto_wait);
865 $this->setShowMembers($row->show_members);
866 $this->setStart($row->grp_start ? new ilDate($row->grp_start, IL_CAL_UNIX) : null);
867 $this->setEnd($row->grp_end ? new ilDate($row->grp_end, IL_CAL_UNIX) : null);
868 }
869 $this->initParticipants();
870
871 // Inherit order type from parent course (if exists)
872 include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
874 }
static _lookupSortMode($a_obj_id)
lookup sort mode
setOrderType($a_value)
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setPassword($a_pass)
set password
enableWaitingList($a_status)
enable waiting list
setRegistrationAccessCode($a_code)
Set refistration access code.
setRegistrationStart($a_start)
set registration start
setInformation($a_information)
set information
setEnd(ilDate $end=null)
Set end.
setMaxMembers($a_max)
set max members
setStart(ilDate $start=null)
Set start.
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

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

+ Here is the call graph for this function:

◆ readGroupStatus()

ilObjGroup::readGroupStatus ( )

get group status, redundant method because @access public

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

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

1517 {
1518 global $DIC;
1519
1520 $rbacsystem = $DIC['rbacsystem'];
1521 $rbacreview = $DIC['rbacreview'];
1522
1523 $local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1524
1525 //get all relevant roles
1526 $arr_globalRoles = array_diff($local_roles, $this->getDefaultGroupRoles());
1527
1528 //if one global role has no permission to join the group is officially closed !
1529 foreach ($arr_globalRoles as $globalRole) {
1530 if ($rbacsystem->checkPermission($this->getRefId(), $globalRole, "join")) {
1531 return $this->group_status = GRP_TYPE_PUBLIC;
1532 }
1533 }
1534
1535 return $this->group_status = GRP_TYPE_CLOSED;
1536 }

References $DIC, ilObject\$rbacreview, ilContainer\$rbacsystem, getDefaultGroupRoles(), ilObject\getRefId(), GRP_TYPE_CLOSED, and GRP_TYPE_PUBLIC.

+ 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 2003 of file class.ilObjGroup.php.

2004 {
2005 include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
2006 include_once "./Modules/Group/classes/class.ilGroupParticipants.php";
2008
2009 if ($part->isAssigned($a_user_id)) {
2010 return true;
2011 }
2012
2013 if (!$a_force_registration) {
2014 // Availability
2015 if (!$this->isRegistrationEnabled()) {
2016 include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
2017
2019 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2020 ', group subscription is deactivated.', ilMembershipRegistrationException::REGISTRATION_CODE_DISABLED);
2021 }
2022 }
2023
2024 // Time Limitation
2025 if (!$this->isRegistrationUnlimited()) {
2026 $start = $this->getRegistrationStart();
2027 $end = $this->getRegistrationEnd();
2028 $time = new ilDateTime(time(), IL_CAL_UNIX);
2029
2031 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2032 ', group is out of registration time.', ilMembershipRegistrationException::OUT_OF_REGISTRATION_PERIOD);
2033 }
2034 }
2035
2036 // Max members
2037 if ($this->isMembershipLimited()) {
2038 $free = max(0, $this->getMaxMembers() - $part->getCountMembers());
2039 include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2040 $waiting_list = new ilGroupWaitingList($this->getId());
2041 if ($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers())) {
2042 $this->lng->loadLanguageModule("grp");
2043 $waiting_list->addToList($a_user_id);
2044
2045 $info = sprintf(
2046 $this->lng->txt('grp_added_to_list'),
2047 $this->getTitle(),
2048 $waiting_list->getPosition($a_user_id)
2049 );
2050
2051 include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
2052 include_once('./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2053 $participants = ilGroupParticipants::_getInstanceByObjId($this->getId());
2054 $participants->sendNotification(ilGroupMembershipMailNotification::TYPE_WAITING_LIST_MEMBER, $a_user_id);
2055
2057 }
2058
2059 if (!$free or $waiting_list->getCountUsers()) {
2060 throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
2061 ', membership is limited.', ilMembershipRegistrationException::OBJECT_IS_FULL);
2062 }
2063 }
2064 }
2065
2066 $part->add($a_user_id, $a_role);
2067 $part->sendNotification(ilGroupMembershipMailNotification::TYPE_ADMISSION_MEMBER, $a_user_id);
2068 $part->sendNotification(ilGroupMembershipMailNotification::TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
2069 return true;
2070 }
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.
$time
Definition: cron.php:21
$info
Definition: index.php:5

References $end, $info, $start, $time, $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:

◆ setCancellationEnd()

ilObjGroup::setCancellationEnd ( ilDate  $a_value = null)

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

567 {
568 $this->leave_end = $a_value;
569 }

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 485 of file class.ilObjGroup.php.

486 {
487 $this->enablemap = $a_enablemap;
488 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setEnd()

ilObjGroup::setEnd ( ilDate  $end = null)

Set end.

Parameters
ilDate$end

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

617 {
618 $this->end = $end;
619 }

References $end.

Referenced by read().

+ 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 1494 of file class.ilObjGroup.php.

1495 {
1496 $this->group_status = $a_status;
1497 }

◆ setGroupType()

ilObjGroup::setGroupType (   $a_type)

set group type

@access public

Parameters
inttype

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

178 {
179 $this->group_type = $a_type;
180 }
$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 154 of file class.ilObjGroup.php.

155 {
156 $this->information = $a_information;
157 }

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 425 of file class.ilObjGroup.php.

426 {
427 $this->latitude = $a_latitude;
428 }

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 465 of file class.ilObjGroup.php.

466 {
467 $this->locationzoom = $a_locationzoom;
468 }

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 445 of file class.ilObjGroup.php.

446 {
447 $this->longitude = $a_longitude;
448 }

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 552 of file class.ilObjGroup.php.

553 {
554 $this->mail_members = $a_type;
555 }

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 370 of file class.ilObjGroup.php.

371 {
372 $this->reg_max_members = $a_max;
373 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setMessage()

ilObjGroup::setMessage (   $a_message)

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

1873 {
1874 $this->message = $a_message;
1875 }

◆ setMinMembers()

ilObjGroup::setMinMembers (   $a_max)

set min members

@access public

Parameters
intmin members

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

349 {
350 $this->reg_min_members = $a_max;
351 }

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 1619 of file class.ilObjGroup.php.

1620 {
1621 $rbacadmin = $GLOBALS['DIC']->rbac()->admin();
1622 $rbacreview = $GLOBALS['DIC']->rbac()->review();
1623
1624 $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1625 foreach ((array) $parent_roles as $parent_role) {
1626 if ($parent_role['parent'] == $this->getRefId()) {
1627 continue;
1628 }
1629 if ($rbacreview->isProtected($parent_role['parent'], $parent_role['rol_id'])) {
1630 $operations = $rbacreview->getOperationsOfRole(
1631 $parent_role['obj_id'],
1632 $this->getType(),
1633 $parent_role['parent']
1634 );
1635 $rbacadmin->grantPermission(
1636 $parent_role['obj_id'],
1637 $operations,
1638 $this->getRefId()
1639 );
1640 continue;
1641 }
1642
1643 $rbacadmin->initIntersectionPermissions(
1644 $this->getRefId(),
1645 $parent_role['obj_id'],
1646 $parent_role['parent'],
1648 ROLE_FOLDER_ID
1649 );
1650 }
1651 }
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 303 of file class.ilObjGroup.php.

304 {
305 $this->reg_password = $a_pass;
306 }

Referenced by read().

+ 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 523 of file class.ilObjGroup.php.

524 {
525 $this->reg_access_code = $a_code;
526 }

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 281 of file class.ilObjGroup.php.

282 {
283 $this->reg_end = $a_end;
284 }

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 257 of file class.ilObjGroup.php.

258 {
259 $this->reg_start = $a_start;
260 }

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 200 of file class.ilObjGroup.php.

201 {
202 $this->reg_type = $a_type;
203 }

References $a_type.

Referenced by read().

+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjGroup::setShowMembers (   $a_status)

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

577 {
578 $this->show_members = $a_status;
579 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setStart()

ilObjGroup::setStart ( ilDate  $start = null)

Set start.

Parameters
ilDate$start

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

599 {
600 $this->start = $start;
601 }

References $start.

Referenced by read().

+ 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 1788 of file class.ilObjGroup.php.

1789 {
1790 $this->view_mode = $a_view_mode;
1791 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjGroup::setWaitingListAutoFill (   $a_value)

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

411 {
412 $this->auto_fill_from_waiting = (bool) $a_value;
413 }

Referenced by read().

+ 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 1821 of file class.ilObjGroup.php.

1822 {
1823 global $DIC;
1824
1825 $tree = $DIC['tree'];
1826
1827 if (!$a_view_mode) {
1828 $a_view_mode = ilContainer::VIEW_DEFAULT;
1829 }
1830
1831 // view mode is inherit => check for parent course
1832 if ($a_view_mode == ilContainer::VIEW_INHERIT) {
1833 if (!$a_ref_id) {
1834 $ref = ilObject::_getAllReferences($a_obj_id);
1835 $a_ref_id = end($ref);
1836 }
1837
1838 $crs_ref = $tree->checkForParentType($a_ref_id, 'crs');
1839 if (!$crs_ref) {
1841 }
1842
1843 include_once './Modules/Course/classes/class.ilObjCourse.php';
1845
1846 // validate course view mode
1847 if (!in_array($view_mode, array(ilContainer::VIEW_SESSIONS,
1850 }
1851
1852 return $view_mode;
1853 }
1854
1855 return $a_view_mode;
1856 }
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 737 of file class.ilObjGroup.php.

738 {
739 global $DIC;
740
741 $ilDB = $DIC['ilDB'];
742 $ilAppEventHandler = $DIC['ilAppEventHandler'];
743
744 if (!parent::update()) {
745 return false;
746 }
747
748 $query = "UPDATE grp_settings " .
749 "SET information = " . $ilDB->quote($this->getInformation(), 'text') . ", " .
750 "grp_type = " . $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
751 "registration_type = " . $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
752 "registration_enabled = " . $ilDB->quote($this->isRegistrationEnabled() ? 1 : 0, 'integer') . ", " .
753 "registration_unlimited = " . $ilDB->quote($this->isRegistrationUnlimited() ? 1 : 0, 'integer') . ", " .
754 "registration_start = " . $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
755 "registration_end = " . $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
756 "registration_password = " . $ilDB->quote($this->getPassword(), 'text') . ", " .
757// "registration_membership_limited = ".$ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
758 "registration_mem_limit = " . $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
759 "registration_max_members = " . $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
760 "waiting_list = " . $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
761 "latitude = " . $ilDB->quote($this->getLatitude(), 'text') . ", " .
762 "longitude = " . $ilDB->quote($this->getLongitude(), 'text') . ", " .
763 "location_zoom = " . $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
764 "enablemap = " . $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
765 'reg_ac_enabled = ' . $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
766 'reg_ac = ' . $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
767 'view_mode = ' . $ilDB->quote($this->view_mode, 'integer') . ', ' .
768 'mail_members_type = ' . $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
769 'leave_end = ' . $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
770 "registration_min_members = " . $ilDB->quote($this->getMinMembers(), 'integer') . ", " .
771 "auto_wait = " . $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
772 "show_members = " . $ilDB->quote((int) $this->getShowMembers(), 'integer') . ", " .
773 'grp_start = ' . $ilDB->quote($this->getStart() instanceof ilDate ? $this->getStart()->get(IL_CAL_UNIX) : null) . ', ' .
774 'grp_end = ' . $ilDB->quote($this->getEnd() instanceof ilDate ? $this->getEnd()->get(IL_CAL_UNIX) : null) . ' ' .
775 "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
776 $res = $ilDB->manipulate($query);
777
778 $ilAppEventHandler->raise(
779 'Modules/Group',
780 'update',
781 array('object' => $this,
782 'obj_id' => $this->getId(),
783 'appointments' => $this->prepareAppointments('update'))
784 );
785
786
787 return true;
788 }
update($pash, $contents, Config $config)

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

+ 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 1371 of file class.ilObjGroup.php.

1372 {
1373 global $DIC;
1374
1375 $logger = $DIC->logger()->grp();
1376
1377 if ($a_group_type == GRP_TYPE_OPEN) {
1378 $this->applyDidacticTemplate(0);
1379 return;
1380 }
1381
1382 $templates = ilDidacticTemplateSettings::getInstanceByObjectType($this->getType())->getTemplates();
1383 foreach ($templates as $template) {
1384 // the closed template
1385 if ($template->isAutoGenerated()) {
1386 $logger->info('Appying default closed template');
1387 $this->applyDidacticTemplate($template->getId());
1388 return;
1389 }
1390 }
1391 $logger->warning('No closed didactic template available.');
1392 }
const GRP_TYPE_OPEN
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
applyDidacticTemplate($a_tpl_id)
Apply template.
$template

References $DIC, $template, 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 627 of file class.ilObjGroup.php.

628 {
629 global $DIC;
630
631 $ilErr = $DIC['ilErr'];
632
633 if (!$this->getTitle()) {
634 $this->title = '';
635 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
636 }
637 if ($this->getRegistrationType() == GRP_REGISTRATION_PASSWORD and !strlen($this->getPassword())) {
638 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
639 }
640 /*
641 if(ilDateTime::_before($this->getRegistrationEnd(),$this->getRegistrationStart()))
642 {
643 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
644 }
645 */
646 if ($this->isMembershipLimited()) {
647 if ($this->getMinMembers() <= 0 && $this->getMaxMembers() <= 0) {
648 $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
649 }
650 if ($this->getMaxMembers() <= 0 && $this->isWaitingListEnabled()) {
651 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
652 }
653 if ($this->getMaxMembers() > 0 && $this->getMinMembers() > $this->getMaxMembers()) {
654 $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
655 }
656 }
657 if (
658 ($this->getRegistrationStart() && !$this->getRegistrationEnd()) ||
659 (!$this->getRegistrationStart() && $this->getRegistrationEnd()) ||
660 $this->getRegistrationEnd() <= $this->getRegistrationStart()
661 ) {
662 $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
663 }
664
665 return strlen($ilErr->getMessage()) == 0;
666 }
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().

◆ $enablemap

ilObjGroup::$enablemap = 0
private

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

Referenced by getEnableGroupMap().

◆ $end

ilObjGroup::$end = null
protected

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

Referenced by getEnd(), register(), and setEnd().

◆ $file_obj

ilObjGroup::$file_obj = null

Group file object for handling of export files.

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

◆ $group_type

ilObjGroup::$group_type = null
protected

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

Referenced by getGroupType().

◆ $information

ilObjGroup::$information
protected

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

Referenced by getInformation().

◆ $latitude

ilObjGroup::$latitude = ''
private

Definition at line 80 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 82 of file class.ilObjGroup.php.

Referenced by getLocationZoom().

◆ $longitude

ilObjGroup::$longitude = ''
private

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

Referenced by getLongitude().

◆ $m_grpStatus

ilObjGroup::$m_grpStatus

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

◆ $m_roleAdminId

ilObjGroup::$m_roleAdminId

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

◆ $m_roleMemberId

ilObjGroup::$m_roleMemberId

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

◆ $mail_members

ilObjGroup::$mail_members = self::MAIL_ALLOWED_ALL
private

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

Referenced by getMailToMembersType().

◆ $members_obj

ilObjGroup::$members_obj

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

Referenced by getMembersObject().

◆ $reg_access_code

ilObjGroup::$reg_access_code = ''
private

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

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjGroup::$reg_access_code_enabled = false
private

Definition at line 86 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 75 of file class.ilObjGroup.php.

Referenced by getStart(), register(), and setStart().

◆ $view_mode

ilObjGroup::$view_mode = ilContainer::VIEW_DEFAULT
private

Definition at line 88 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: