ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 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 private More...
 
 getDefaultMemberRole ()
 returns object id of created default member role public More...
 
 getDefaultAdminRole ()
 returns object id of created default adminstrator role public More...
 
 addMember ($a_user_id, $a_mem_role)
 add Member to Group public More...
 
 leaveGroup ()
 is called when a member decides to leave group public More...
 
 leave ($a_user_id)
 deassign member from group role private More...
 
 getGroupMemberIds ()
 get all group Member ids regardless of role 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 public More...
 
 getDefaultGroupRoles ($a_grp_id="")
 get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin 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 public More...
 
 getGrpStatusOpenTemplateId ()
 get group status open template 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 public More...
 
 getMemberRoles ($a_user_id)
 get group member status public More...
 
 isAdmin ($a_userId)
 is Admin public More...
 
 initDefaultRoles ()
 init default roles settings 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 ($a_translate_inherit=true)
 get 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 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 public More...
 
 setId ($a_id)
 set object id public More...
 
 setRefId ($a_id)
 set reference id public More...
 
 getRefId ()
 get reference id public More...
 
 getType ()
 get object type public More...
 
 setType ($a_type)
 set object type public More...
 
 getPresentationTitle ()
 get presentation title Normally same as title Overwritten for sessions More...
 
 getTitle ()
 get object title public More...
 
 getUntranslatedTitle ()
 get untranslated object title 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...
 
 getOwner ()
 get object owner More...
 
 getOwnerName ()
 
 setOwner ($a_owner)
 set object owner More...
 
 getCreateDate ()
 get create date public More...
 
 getLastUpdateDate ()
 get last update date 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) 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)
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 getBigIconPath ()
 Get path for big icon. More...
 
 getSmallIconPath ()
 Get path for small icon. More...
 
 getTinyIconPath ()
 Get path for tiny icon. More...
 
 getCustomIconPath ()
 Get path for custom icon. 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...
 
 saveIcons ($a_custom_icon)
 save container icons More...
 
 removeCustomIcon ()
 remove small icon 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...
 
 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...
 
 update ()
 Update. More...
 
 read ()
 read More...
 
 readContainerSettings ()
 Read container settings. 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)
 $ilDB $ilDB More...
 
static _lookupIdByTitle ($a_title)
 
static lookupViewMode ($a_obj_id)
 lookup view mode $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 $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 _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 type $ilDB. 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 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 _getIcon ( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
 Get icon for repository item. 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 _lookupIconPath ($a_id, $a_size="big")
 lookup icon path More...
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) 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
 

Private Attributes

 $latitude = ''
 
 $longitude = ''
 
 $locationzoom = 0
 
 $enablemap = 0
 
 $reg_access_code = ''
 
 $reg_access_code_enabled = false
 
 $view_mode = null
 
 $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 public.

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

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

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

114  {
115  global $tree;
116 
117  $this->tree =&$tree;
118 
119  $this->type = "grp";
120  parent::__construct($a_id, $a_call_by_reference);
121  $this->setRegisterMode(true); // ???
122  }
setRegisterMode($a_bool)
+ Here is the call graph for this function:

Member Function Documentation

◆ _getMembers()

ilObjGroup::_getMembers (   $a_obj_id)

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

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

Referenced by _isMember().

1649  {
1650  global $rbacreview;
1651 
1652  // get reference
1653  $ref_ids = ilObject::_getAllReferences($a_obj_id);
1654  $ref_id = current($ref_ids);
1655 
1656  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id, false);
1657 
1658  $users = array();
1659  foreach ($local_roles as $role_id) {
1660  $users = array_merge($users, $rbacreview->assignedUsers($role_id));
1661  }
1662 
1663  return array_unique($users);
1664  }
static _getAllReferences($a_id)
get all reference ids of object
Create styles array
The data for the language used.
$users
Definition: authpage.php:44
+ 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 1603 of file class.ilObjGroup.php.

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

1604  {
1605  global $rbacreview,$ilObjDataCache,$ilDB;
1606 
1607  $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
1608  $user_roles = $rbacreview->assignedRoles($a_user_id);
1609 
1610  // Used for membership limitations -> check membership by given field
1611  if ($a_field) {
1612  include_once './Services/User/classes/class.ilObjUser.php';
1613 
1614  $tmp_user =&ilObjectFactory::getInstanceByObjId($a_user_id);
1615  switch ($a_field) {
1616  case 'login':
1617  $and = "AND login = '" . $tmp_user->getLogin() . "' ";
1618  break;
1619  case 'email':
1620  $and = "AND email = '" . $tmp_user->getEmail() . "' ";
1621  break;
1622  case 'matriculation':
1623  $and = "AND matriculation = '" . $tmp_user->getMatriculation() . "' ";
1624  break;
1625 
1626  default:
1627  $and = "AND usr_id = '" . $a_user_id . "'";
1628  break;
1629  }
1630  if (!$members = ilObjGroup::_getMembers($ilObjDataCache->lookupObjId($a_ref_id))) {
1631  return false;
1632  }
1633  $query = "SELECT * FROM usr_data as ud " .
1634  "WHERE usr_id IN (" . implode(",", ilUtil::quoteArray($members)) . ") " .
1635  $and;
1636  $res = $ilDB->query($query);
1637 
1638  return $res->numRows() ? true : false;
1639  }
1640 
1641  if (!array_intersect($local_roles, $user_roles)) {
1642  return false;
1643  }
1644 
1645  return true;
1646  }
_getMembers($a_obj_id)
foreach($_POST as $key=> $value) $res
$query
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.
global $ilDB
+ 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 1589 of file class.ilObjGroup.php.

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

Referenced by ilMailGroupAddressType\resolve().

1590  {
1591  global $ilDB;
1592 
1593  $query = "SELECT * FROM object_data WHERE title = " .
1594  $ilDB->quote($a_title, 'text') . " AND type = 'grp'";
1595  $res = $ilDB->query($query);
1596  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1597  return $row->obj_id;
1598  }
1599  return 0;
1600  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ 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.

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

References ilObjectActivation\addAdditionalSubItemInformation().

1757  {
1758  include_once './Services/Object/classes/class.ilObjectActivation.php';
1760  }
static addAdditionalSubItemInformation(array &$a_item)
Parse item data for list entries.
+ Here is the call graph for this function:

◆ addMember()

ilObjGroup::addMember (   $a_user_id,
  $a_mem_role 
)

add Member to Group public

Parameters
integeruser_id
integermember role_id of local group_role

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

References ilObject\$rbacadmin, and join().

1022  {
1023  global $rbacadmin;
1024 
1025  if (isset($a_user_id) && isset($a_mem_role)) {
1026  $this->join($a_user_id, $a_mem_role);
1027  return true;
1028  } else {
1029  $this->ilias->raiseError(get_class($this) . "::addMember(): Missing parameters !", $this->ilias->error_obj->WARNING);
1030  return false;
1031  }
1032  }
join($a_user_id, $a_mem_role="")
join Group, assigns user to role private
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ appendMessage()

ilObjGroup::appendMessage (   $a_message)

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

References getMessage().

1771  {
1772  if ($this->getMessage()) {
1773  $this->message .= "<br /> ";
1774  }
1775  $this->message .= $a_message;
1776  }
+ Here is the call graph for this function:

◆ applyDidacticTemplate()

ilObjGroup::applyDidacticTemplate (   $a_tpl_id)

Apply template.

Parameters
int$a_tpl_id

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

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

Referenced by updateGroupType().

1579  {
1580  parent::applyDidacticTemplate($a_tpl_id);
1581 
1582  if (!$a_tpl_id) {
1583  // init default type
1584  $this->setParentRolePermissions($this->getRefId());
1585  }
1586  }
setParentRolePermissions($a_parent_ref)
This method is called before "initDefaultRoles".
getRefId()
get reference id public
+ 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.

public

Parameters
objectnew group object

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

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

Referenced by cloneObject().

952  {
953  global $rbacadmin,$rbacreview;
954 
955  $admin = $this->getDefaultAdminRole();
956  $new_admin = $new_obj->getDefaultAdminRole();
957  if (!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId()) {
958  ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_admin');
959  }
960  $rbacadmin->copyRolePermissions($admin, $this->getRefId(), $new_obj->getRefId(), $new_admin, true);
961  ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_admin.');
962 
963  $member = $this->getDefaultMemberRole();
964  $new_member = $new_obj->getDefaultMemberRole();
965  if (!$member || !$new_member) {
966  ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_member');
967  }
968  $rbacadmin->copyRolePermissions($member, $this->getRefId(), $new_obj->getRefId(), $new_member, true);
969  ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_member.');
970  }
getDefaultAdminRole()
returns object id of created default adminstrator role public
getDefaultMemberRole()
returns object id of created default member role public
getRefId()
get reference id public
static getLogger($a_component_id)
Get component logger.
+ 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)

public

Parameters
inttarget ref id of new course
intcopy id

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

References ilContainer\$tree, ilObjectActivation\cloneDependencies(), and ilObject\getRefId().

933  {
934  global $tree;
935 
936  parent::cloneDependencies($a_target_id, $a_copy_id);
937 
938  include_once('Services/Object/classes/class.ilObjectActivation.php');
939  ilObjectActivation::cloneDependencies($this->getRefId(), $a_target_id, $a_copy_id);
940 
941  return true;
942  }
static cloneDependencies($a_ref_id, $a_target_id, $a_copy_id)
Clone dependencies.
getRefId()
get reference id public
+ 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)

public

Parameters
inttarget ref_id
intcopy id

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

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

863  {
864  global $ilDB,$ilUser, $ilSetting;
865 
866  $new_obj = parent::cloneObject($a_target_id, $a_copy_id, $a_omit_tree);
867 
868  // current template
869  $current_template = ilDidacticTemplateObjSettings::lookupTemplateId($this->getRefId());
870  $new_obj->applyDidacticTemplate($current_template);
871  $this->cloneAutoGeneratedRoles($new_obj);
872 
873  $new_obj->setRegistrationType($this->getRegistrationType());
874  $new_obj->setInformation($this->getInformation());
875  $new_obj->setRegistrationStart($this->getRegistrationStart());
876  $new_obj->setRegistrationEnd($this->getRegistrationEnd());
877  $new_obj->enableUnlimitedRegistration($this->isRegistrationUnlimited());
878  $new_obj->setPassword($this->getPassword());
879  $new_obj->enableMembershipLimitation($this->isMembershipLimited());
880  $new_obj->setMaxMembers($this->getMaxMembers());
881  $new_obj->enableWaitingList($this->isWaitingListEnabled());
882  $new_obj->setShowMembers($this->getShowMembers());
883 
884  // map
885  $new_obj->setLatitude($this->getLatitude());
886  $new_obj->setLongitude($this->getLongitude());
887  $new_obj->setLocationZoom($this->getLocationZoom());
888  $new_obj->setEnableGroupMap($this->getEnableGroupMap());
889  $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
890  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
891  $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
892 
893  $new_obj->setViewMode($this->getViewMode());
894  $new_obj->setMailToMembersType($this->getMailToMembersType());
895 
896  $new_obj->setCancellationEnd($this->getCancellationEnd());
897  $new_obj->setMinMembers($this->getMinMembers());
898  $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
899 
900  $new_obj->setStart($this->getStart());
901  $new_obj->setEnd($this->getEnd());
902 
903  $new_obj->update();
904 
905  // #13008 - Group Defined Fields
906  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
907  ilCourseDefinedFieldDefinition::_clone($this->getId(), $new_obj->getId());
908 
909  // Assign user as admin
910  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
911  $part = ilGroupParticipants::_getInstanceByObjId($new_obj->getId());
912  $part->add($ilUser->getId(), IL_GRP_ADMIN);
913  $part->updateNotification($ilUser->getId(), $ilSetting->get('mail_grp_admin_notification', true));
914 
915  // Copy learning progress settings
916  include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
917  $obj_settings = new ilLPObjSettings($this->getId());
918  $obj_settings->cloneSettings($new_obj->getId());
919  unset($obj_settings);
920 
921  return $new_obj;
922  }
static lookupTemplateId($a_ref_id)
Lookup template id ilDB $ilDB.
getMaxMembers()
get max members
cloneAutoGeneratedRoles($new_obj)
Clone group admin and member role permissions.
getLongitude()
Get Longitude.
isRegistrationUnlimited()
is registration unlimited
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
const IL_GRP_ADMIN
getRegistrationEnd()
get registration end
getLatitude()
Get Latitude.
getViewMode()
Get container view mode.
getRegistrationStart()
get registration start
static _clone($a_source_id, $a_target_id)
Clone fields.
getId()
get object id public
getLocationZoom()
Get LocationZoom.
$ilUser
Definition: imgupload.php:18
getEnd()
Get end.
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getStart()
Get group start.
getPassword()
get password
static generateCode()
Generate new registration key.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
global $ilSetting
Definition: privfeed.php:17
global $ilDB
getRefId()
get reference id public
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
+ Here is the call graph for this function:

◆ create()

ilObjGroup::create ( )

Create group.

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

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

669  {
670  global $ilDB,$ilAppEventHandler;
671 
672  if (!parent::create()) {
673  return false;
674  }
675 
676  $query = "INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled," .
677  "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit," .
678  "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type," .
679  "leave_end,registration_min_members,auto_wait, grp_start, grp_end) " .
680  "VALUES(" .
681  $ilDB->quote($this->getId(), 'integer') . ", " .
682  $ilDB->quote($this->getInformation(), 'text') . ", " .
683  $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
684  $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
685  $ilDB->quote(($this->isRegistrationEnabled() ? 1 : 0), 'integer') . ", " .
686  $ilDB->quote(($this->isRegistrationUnlimited() ? 1 : 0), 'integer') . ", " .
687  $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
688  $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
689  $ilDB->quote($this->getPassword(), 'text') . ", " .
690  $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
691  $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
692  $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
693  $ilDB->quote($this->getLatitude(), 'text') . ", " .
694  $ilDB->quote($this->getLongitude(), 'text') . ", " .
695  $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
696  $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
697  $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
698  $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
699  $ilDB->quote($this->getViewMode(), 'integer') . ', ' .
700  $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
701  $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
702  $ilDB->quote($this->getMinMembers(), 'integer') . ', ' .
703  $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ', ' .
704  $ilDB->quote($this->getStart() instanceof ilDate ? $this->getStart()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
705  $ilDB->quote($this->getEnd() instanceof ilDate ? $this->getEnd()->get(IL_CAL_UNIX) : null, 'integer') . ' ' .
706  ")";
707  $res = $ilDB->manipulate($query);
708 
709  $ilAppEventHandler->raise(
710  'Modules/Group',
711  'create',
712  array('object' => $this,
713  'obj_id' => $this->getId(),
714  'appointments' => $this->prepareAppointments('create'))
715  );
716 
717  return $this->getId();
718  }
getMaxMembers()
get max members
isRegistrationEnabled()
is registration enabled
getLongitude()
Get Longitude.
isRegistrationUnlimited()
is registration unlimited
const IL_CAL_DATETIME
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
getRegistrationEnd()
get registration end
getLatitude()
Get Latitude.
getRegistrationAccessCode()
get access code
getViewMode()
Get container view mode.
const IL_CAL_UNIX
getRegistrationStart()
get registration start
getGroupType()
get group type
Class for single dates.
foreach($_POST as $key=> $value) $res
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
getLocationZoom()
Get LocationZoom.
getEnd()
Get end.
$query
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
Create styles array
The data for the language used.
getStart()
Get group start.
getPassword()
get password
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
global $ilDB
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
+ Here is the call graph for this function:

◆ delete()

ilObjGroup::delete ( )

delete group and all related data

public

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

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

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

780  {
781  global $ilDB,$ilAppEventHandler;
782 
783  // always call parent delete function first!!
784  if (!parent::delete()) {
785  return false;
786  }
787 
788  $query = "DELETE FROM grp_settings " .
789  "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
790  $res = $ilDB->manipulate($query);
791 
792  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
794 
795  $ilAppEventHandler->raise(
796  'Modules/Group',
797  'delete',
798  array('object' => $this,
799  'obj_id' => $this->getId(),
800  'appointments' => $this->prepareAppointments('delete'))
801  );
802 
803 
804  return true;
805  }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
foreach($_POST as $key=> $value) $res
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ enableMembershipLimitation()

ilObjGroup::enableMembershipLimitation (   $a_status)

enable max member limitation

public

Parameters
boolstatus
Returns

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

Referenced by read().

323  {
324  $this->reg_membership_limitation = $a_status;
325  }
+ 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 538 of file class.ilObjGroup.php.

Referenced by read().

539  {
540  $this->reg_access_code_enabled = $a_status;
541  }
+ Here is the caller graph for this function:

◆ enableUnlimitedRegistration()

ilObjGroup::enableUnlimitedRegistration (   $a_status)

enable unlimited registration

public

Parameters
bool
Returns

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

Referenced by read().

231  {
232  $this->reg_unlimited = $a_status;
233  }
+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjGroup::enableWaitingList (   $a_status)

enable waiting list

public

Parameters
bool
Returns

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

Referenced by read().

390  {
391  $this->waiting_list = $a_status;
392  }
+ Here is the caller graph for this function:

◆ findGroupsWithNotEnoughMembers()

static ilObjGroup::findGroupsWithNotEnoughMembers ( )
static

Minimum members check $ilDB $ilDB.

Returns
array

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

References $GLOBALS, $ilDB, $res, $row, ilContainer\$tree, ilObject\_getAllReferences(), array, and date.

Referenced by ilMembershipCronMinMembers\getGroups().

2025  {
2026  $ilDB = $GLOBALS['DIC']->database();
2027  $tree = $GLOBALS['DIC']->repositoryTree();
2028 
2029  $res = array();
2030 
2031  $now = date("Y-m-d H:i:s");
2032 
2033  include_once "Modules/Group/classes/class.ilGroupParticipants.php";
2034 
2035  $set = $ilDB->query("SELECT obj_id, registration_min_members" .
2036  " FROM grp_settings" .
2037  " WHERE registration_min_members > " . $ilDB->quote(0, "integer") .
2038  " AND registration_mem_limit = " . $ilDB->quote(1, "integer") . // #17206
2039  " AND ((leave_end IS NOT NULL" .
2040  " AND leave_end < " . $ilDB->quote($now, "text") . ")" .
2041  " OR (leave_end IS NULL" .
2042  " AND registration_end IS NOT NULL" .
2043  " AND registration_end < " . $ilDB->quote($now, "text") . "))" .
2044  " AND (grp_start IS NULL OR grp_start > " . $ilDB->quote($now, "integer") . ")");
2045  while ($row = $ilDB->fetchAssoc($set)) {
2046  $refs = ilObject::_getAllReferences($row['obj_id']);
2047  $ref = end($refs);
2048 
2049  if ($tree->isDeleted($ref)) {
2050  continue;
2051  }
2052 
2053  $part = new ilGroupParticipants($row["obj_id"]);
2054  $reci = $part->getNotificationRecipients();
2055  if (sizeof($reci)) {
2056  $missing = (int) $row["registration_min_members"]-$part->getCountMembers();
2057  if ($missing > 0) {
2058  $res[$row["obj_id"]] = array($missing, $reci);
2059  }
2060  }
2061  }
2062 
2063  return $res;
2064  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getAllReferences($a_id)
get all reference ids of object
foreach($_POST as $key=> $value) $res
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCancellationEnd()

ilObjGroup::getCancellationEnd ( )

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

References $leave_end.

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

568  {
569  return $this->leave_end;
570  }
+ Here is the caller graph for this function:

◆ getCountMembers()

ilObjGroup::getCountMembers ( )

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

References getGroupMemberIds().

1146  {
1147  return count($this->getGroupMemberIds());
1148  }
getGroupMemberIds()
get all group Member ids regardless of role public
+ Here is the call graph for this function:

◆ getDefaultAdminRole()

ilObjGroup::getDefaultAdminRole ( )

returns object id of created default adminstrator role public

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

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

Referenced by cloneAutoGeneratedRoles().

1009  {
1010  $local_group_Roles = $this->getLocalGroupRoles();
1011 
1012  return $local_group_Roles["il_grp_admin_" . $this->getRefId()];
1013  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
getRefId()
get reference id public
+ 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 public

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

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

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

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

1182  {
1183  global $rbacadmin, $rbacreview;
1184 
1185  if (strlen($a_grp_id) > 0) {
1186  $grp_id = $a_grp_id;
1187  } else {
1188  $grp_id = $this->getRefId();
1189  }
1190 
1191  $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1192 
1193  foreach ($role_arr as $role_id) {
1194  $role_Obj =&$this->ilias->obj_factory->getInstanceByObjId($role_id);
1195 
1196  $grp_Member ="il_grp_member_" . $grp_id;
1197  $grp_Admin ="il_grp_admin_" . $grp_id;
1198 
1199  if (strcmp($role_Obj->getTitle(), $grp_Member) == 0) {
1200  $arr_grpDefaultRoles["grp_member_role"] = $role_Obj->getId();
1201  }
1202 
1203  if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0) {
1204  $arr_grpDefaultRoles["grp_admin_role"] = $role_Obj->getId();
1205  }
1206  }
1207 
1208  return $arr_grpDefaultRoles;
1209  }
redirection script todo: (a better solution should control the processing via a xml file) ...
getRefId()
get reference id public
+ 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 public

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

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

Referenced by cloneAutoGeneratedRoles().

998  {
999  $local_group_Roles = $this->getLocalGroupRoles();
1000 
1001  return $local_group_Roles["il_grp_member_" . $this->getRefId()];
1002  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
getRefId()
get reference id public
+ 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 500 of file class.ilObjGroup.php.

References $enablemap.

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

501  {
502  return (bool) $this->enablemap;
503  }
+ Here is the caller graph for this function:

◆ getEnableMap()

ilObjGroup::getEnableMap ( )

Type independent wrapper.

Returns
type

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

References getEnableGroupMap().

491  {
492  return $this->getEnableGroupMap();
493  }
getEnableGroupMap()
Get Enable Group Map.
+ Here is the call graph for this function:

◆ getEnd()

ilObjGroup::getEnd ( )

Get end.

Returns
ilDate

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

References $end.

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

604  {
605  return $this->end;
606  }
+ Here is the caller graph for this function:

◆ getGroupAdminIds()

ilObjGroup::getGroupAdminIds (   $a_grpId = "")

get Group Admin Id public

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

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

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

Referenced by leaveGroup().

1157  {
1158  global $rbacreview;
1159 
1160  if (!empty($a_grpId)) {
1161  $grp_id = $a_grpId;
1162  } else {
1163  $grp_id = $this->getRefId();
1164  }
1165 
1166  $usr_arr = array();
1167  $roles = $this->getDefaultGroupRoles($this->getRefId());
1168 
1169  foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id) {
1170  array_push($usr_arr, $member_id);
1171  }
1172 
1173  return $usr_arr;
1174  }
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
Create styles array
The data for the language used.
getRefId()
get reference id public
+ 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 public

Parameters
arrayof user ids
Returns
return array of userdata

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

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

1116  {
1118 
1119  $usr_arr= array();
1120 
1121  $q = "SELECT login,firstname,lastname,title,usr_id,last_login " .
1122  "FROM usr_data " .
1123  "WHERE usr_id IN (" . implode(',', ilUtil::quoteArray($a_mem_ids)) . ") ";
1124 
1125  if (is_numeric($active) && $active > -1) {
1126  $q .= "AND active = '$active'";
1127  }
1128 
1129  $q .= 'ORDER BY lastname,firstname';
1130 
1131  $r = $ilDB->query($q);
1132 
1133  while ($row = $r->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1134  $mem_arr[] = array("id" => $row->usr_id,
1135  "login" => $row->login,
1136  "firstname" => $row->firstname,
1137  "lastname" => $row->lastname,
1138  "last_login" => $row->last_login
1139  );
1140  }
1141 
1142  return $mem_arr ? $mem_arr : array();
1143  }
$r
Definition: example_031.php:79
Create styles array
The data for the language used.
static quoteArray($a_array)
Quotes all members of an array for usage in DB query statement.
global $ilBench
Definition: ilias.php:18
global $ilDB
+ Here is the call graph for this function:

◆ getGroupMemberIds()

ilObjGroup::getGroupMemberIds ( )

get all group Member ids regardless of role public

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

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

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

Referenced by getCountMembers(), and leaveGroup().

1090  {
1091  global $rbacadmin, $rbacreview;
1092 
1093  $usr_arr= array();
1094 
1095  $rol = $this->getLocalGroupRoles();
1096 
1097  foreach ($rol as $value) {
1098  foreach ($rbacreview->assignedUsers($value) as $member_id) {
1099  array_push($usr_arr, $member_id);
1100  }
1101  }
1102 
1103  $mem_arr = array_unique($usr_arr);
1104 
1105  return $mem_arr ? $mem_arr : array();
1106  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGroupStatus()

ilObjGroup::getGroupStatus ( )

get group status

public

Parameters
intgroup status

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

1436  {
1437  return $this->group_status;
1438  }

◆ getGroupType()

ilObjGroup::getGroupType ( )

get group type

public

Returns
int group type

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

References $group_type.

Referenced by create(), and update().

185  {
186  return $this->group_type;
187  }
+ Here is the caller graph for this function:

◆ getGrpStatusClosedTemplateId()

ilObjGroup::getGrpStatusClosedTemplateId ( )

get group status closed template public

Parameters
returnobj_id of roletemplate containing permissionsettings for a closed group

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

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

Referenced by initGroupStatus().

1249  {
1250  $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1251  $res = $this->ilias->db->query($q);
1253 
1254  return $row["obj_id"];
1255  }
foreach($_POST as $key=> $value) $res
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the caller graph for this function:

◆ getGrpStatusOpenTemplateId()

ilObjGroup::getGrpStatusOpenTemplateId ( )

get group status open template public

Parameters
returnobj_id of roletemplate containing permissionsettings for an open group

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

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

Referenced by initGroupStatus(), and setParentRolePermissions().

1263  {
1264  $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1265  $res = $this->ilias->db->query($q);
1267 
1268  return $row["obj_id"];
1269  }
foreach($_POST as $key=> $value) $res
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the caller graph for this function:

◆ getInformation()

ilObjGroup::getInformation ( )

get Information

public

Parameters

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

References $information.

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

163  {
164  return $this->information;
165  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjGroup::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

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

432  {
433  return $this->latitude;
434  }
+ 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 public

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

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

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

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

1218  {
1219  global $rbacadmin,$rbacreview;
1220 
1221  if (empty($this->local_roles)) {
1222  $this->local_roles = array();
1223  $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1224 
1225  foreach ($role_arr as $role_id) {
1226  if ($rbacreview->isAssignable($role_id, $this->getRefId()) == true) {
1227  $role_Obj =&$this->ilias->obj_factory->getInstanceByObjId($role_id);
1228 
1229  if ($a_translate) {
1230  $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1231  } else {
1232  $role_name = $role_Obj->getTitle();
1233  }
1234 
1235  $this->local_roles[$role_name] = $role_Obj->getId();
1236  }
1237  }
1238  }
1239 
1240  return $this->local_roles;
1241  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static _getTranslation($a_role_title)
Create styles array
The data for the language used.
getRefId()
get reference id public
+ 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 471 of file class.ilObjGroup.php.

References $locationzoom.

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

472  {
473  return $this->locationzoom;
474  }
+ Here is the caller graph for this function:

◆ getLongitude()

ilObjGroup::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

References $longitude.

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

452  {
453  return $this->longitude;
454  }
+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjGroup::getMailToMembersType ( )

Get mail to members type.

Returns
int

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

References $mail_members.

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

558  {
559  return $this->mail_members;
560  }
+ Here is the caller graph for this function:

◆ getMaxMembers()

ilObjGroup::getMaxMembers ( )

get max members

public

Returns

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

References $reg_max_members.

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

378  {
379  return $this->reg_max_members;
380  }
+ Here is the caller graph for this function:

◆ getMemberRoles()

ilObjGroup::getMemberRoles (   $a_user_id)

get group member status public

Parameters
integeruser_id
Returns
returns array of obj_ids of assigned local roles

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

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

Referenced by leave().

1471  {
1473 
1474  $ilBench->start("Group", "getMemberRoles");
1475 
1476  $arr_assignedRoles = array();
1477 
1478  $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id), $this->getLocalGroupRoles());
1479 
1480  $ilBench->stop("Group", "getMemberRoles");
1481 
1482  return $arr_assignedRoles;
1483  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
Create styles array
The data for the language used.
global $ilBench
Definition: ilias.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMembersObject()

ilObjGroup::getMembersObject ( )

Get members objects.

Returns
ilGroupParticipants

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

References $members_obj, and initParticipants().

Referenced by handleAutoFill().

1861  {
1862  // #17886
1863  if (!$this->members_obj instanceof ilGroupParticipants) {
1864  $this->initParticipants();
1865  }
1866  return $this->members_obj;
1867  }
initParticipants()
init participants object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessage()

ilObjGroup::getMessage ( )

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

References $message.

Referenced by appendMessage().

1763  {
1764  return $this->message;
1765  }
catch(Exception $e) $message
+ Here is the caller graph for this function:

◆ getMinMembers()

ilObjGroup::getMinMembers ( )

get min members

public

Returns

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

References $reg_min_members.

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

356  {
357  return $this->reg_min_members;
358  }
+ Here is the caller graph for this function:

◆ getPassword()

ilObjGroup::getPassword ( )

get password

public

Returns
string password

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

References $reg_password.

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

311  {
312  return $this->reg_password;
313  }
+ Here is the caller graph for this function:

◆ getRegistrationAccessCode()

ilObjGroup::getRegistrationAccessCode ( )

get access code

Returns

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

References $reg_access_code.

Referenced by create(), and update().

510  {
511  return $this->reg_access_code;
512  }
+ Here is the caller graph for this function:

◆ getRegistrationEnd()

ilObjGroup::getRegistrationEnd ( )

get registration end

public

Returns
int registration end

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

References $reg_end.

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

289  {
290  return $this->reg_end;
291  }
+ Here is the caller graph for this function:

◆ getRegistrationStart()

ilObjGroup::getRegistrationStart ( )

get registration start

public

Returns
int registration start

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

References $reg_start.

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

265  {
266  return $this->reg_start;
267  }
+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjGroup::getRegistrationType ( )

get registration type

public

Returns
int registration type

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

References $reg_type.

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

208  {
209  return $this->reg_type;
210  }
+ Here is the caller graph for this function:

◆ getShowMembers()

ilObjGroup::getShowMembers ( )

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

References $show_members.

Referenced by cloneObject(), and update().

577  {
578  return $this->show_members;
579  }
+ Here is the caller graph for this function:

◆ getStart()

ilObjGroup::getStart ( )

Get group start.

Returns
ilDate

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

References $start.

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

586  {
587  return $this->start;
588  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilObjGroup::getViewMode (   $a_translate_inherit = true)

get view mode

public

Returns
int view mode

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

References ilContainer\VIEW_DEFAULT.

1673  {
1674  $view = (int) $this->view_mode;
1675 
1676  if (!$view) {
1677  $view = ilContainer::VIEW_DEFAULT;
1678  }
1679  return $view;
1680  }

◆ handleAutoFill()

ilObjGroup::handleAutoFill ( )

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

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

1965  {
1966  if ($this->isWaitingListEnabled() &&
1967  $this->hasWaitingListAutoFill()) {
1968  $max = $this->getMaxMembers();
1970  if ($max > $now) {
1971  // see assignFromWaitingListObject()
1972  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1973  $waiting_list = new ilGroupWaitingList($this->getId());
1974 
1975  foreach ($waiting_list->getUserIds() as $user_id) {
1976  if (!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
1977  continue;
1978  }
1979  if ($this->getMembersObject()->isAssigned($user_id)) {
1980  continue;
1981  }
1982  $this->getMembersObject()->add($user_id, IL_GRP_MEMBER); // #18213
1983  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
1985  $waiting_list->removeFromList($user_id);
1986 
1987  $now++;
1988  if ($now >= $max) {
1989  break;
1990  }
1991  }
1992  }
1993  }
1994  }
getMaxMembers()
get max members
static lookupNumberOfMembers($a_ref_id)
Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache.
getMembersObject()
Get members objects.
const IL_GRP_MEMBER
getId()
get object id public
Waiting list for groups.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getRefId()
get reference id public
isWaitingListEnabled()
is waiting list enabled
+ Here is the call graph for this function:

◆ hasWaitingListAutoFill()

ilObjGroup::hasWaitingListAutoFill ( )

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

References $auto_fill_from_waiting.

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

412  {
413  return (bool) $this->auto_fill_from_waiting;
414  }
+ Here is the caller graph for this function:

◆ initDefaultRoles()

ilObjGroup::initDefaultRoles ( )

init default roles settings public

Returns
array object IDs of created local roles.

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

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

1509  {
1510  include_once './Services/AccessControl/classes/class.ilObjRole.php';
1512  'il_grp_admin_' . $this->getRefId(),
1513  "Groupadmin group obj_no." . $this->getId(),
1514  'il_grp_admin',
1515  $this->getRefId()
1516  );
1517  $this->m_roleAdminId = $role->getId();
1518 
1520  'il_grp_member_' . $this->getRefId(),
1521  "Groupmember of group obj_no." . $this->getId(),
1522  'il_grp_member',
1523  $this->getRefId()
1524  );
1525  $this->m_roleMemberId = $role->getId();
1526 
1527  return array();
1528  }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
getId()
get object id public
Create styles array
The data for the language used.
getRefId()
get reference id public
+ 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.

public

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

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

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

1347  {
1349 
1350  //define all relevant roles that rights are needed to be changed
1351  $arr_parentRoles = $rbacreview->getParentRoleIds($this->getRefId());
1352 
1353  $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId(), false);
1354  $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles), $real_local_roles);
1355 
1356  //group status open (aka public) or group status closed
1357  if ($a_grpStatus == GRP_TYPE_PUBLIC || $a_grpStatus == GRP_TYPE_CLOSED) {
1358  if ($a_grpStatus == GRP_TYPE_PUBLIC) {
1360  } else {
1362  }
1363  //get defined operations from template
1364  $template_ops = $rbacreview->getOperationsOfRole($template_id, 'grp', ROLE_FOLDER_ID);
1365 
1366  foreach ($arr_relevantParentRoleIds as $parentRole) {
1367  if ($rbacreview->isProtected($arr_parentRoles[$parentRole]['parent'], $parentRole)) {
1368  continue;
1369  }
1370 
1371  $granted_permissions = array();
1372 
1373  // Delete the linked role for the parent role
1374  // (just in case if it already exists).
1375 
1376  // Added additional check, since this operation is very dangerous.
1377  // If there is no role folder ALL parent roles are deleted.
1378 
1379  // @todo refactor rolf
1380  $rbacadmin->deleteLocalRole($parentRole, $this->getRefId());
1381 
1382  // Grant permissions on the group object for
1383  // the parent role. In the foreach loop we
1384  // compute the intersection of the role
1385  // template il_grp_status_open/_closed and the
1386  // permission template of the parent role.
1387  $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->getRefId());
1388  $rbacadmin->revokePermission($this->getRefId(), $parentRole);
1389  foreach ($template_ops as $template_op) {
1390  if (in_array($template_op, $current_ops)) {
1391  array_push($granted_permissions, $template_op);
1392  }
1393  }
1394  if (!empty($granted_permissions)) {
1395  $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->getRefId());
1396  }
1397 
1398  // Create a linked role for the parent role and
1399  // initialize it with the intersection of
1400  // il_grp_status_open/_closed and the permission
1401  // template of the parent role
1402 
1403  $rbacadmin->copyRolePermissionIntersection(
1404  $template_id,
1405  ROLE_FOLDER_ID,
1406  $parentRole,
1407  $arr_parentRoles[$parentRole]['parent'],
1408  $this->getRefId(),
1409  $parentRole
1410  );
1411  $rbacadmin->assignRoleToFolder($parentRole, $this->getRefId(), "false");
1412  }//END foreach
1413  }
1414  }
const GRP_TYPE_PUBLIC
getGrpStatusOpenTemplateId()
get group status open template public
getGrpStatusClosedTemplateId()
get group status closed template public
const GRP_TYPE_CLOSED
Create styles array
The data for the language used.
getRefId()
get reference id public
$template_id
+ Here is the call graph for this function:

◆ initParticipants()

ilObjGroup::initParticipants ( )
protected

init participants object

protected

Returns

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

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

Referenced by getMembersObject(), and read().

1850  {
1851  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1852  $this->members_obj = ilGroupParticipants::_getInstanceByObjId($this->getId());
1853  }
getId()
get object id public
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAdmin()

ilObjGroup::isAdmin (   $a_userId)

is Admin public

Parameters
integeruser_id
boolean,trueif user is group administrator

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

References ilObject\$rbacreview, and getDefaultGroupRoles().

Referenced by leaveGroup().

1492  {
1493  global $rbacreview;
1494 
1495  $grp_Roles = $this->getDefaultGroupRoles();
1496 
1497  if (in_array($a_userId, $rbacreview->assignedUsers($grp_Roles["grp_admin_role"]))) {
1498  return true;
1499  } else {
1500  return false;
1501  }
1502  }
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isMembershipLimited()

ilObjGroup::isMembershipLimited ( )

is max member limited

public

Returns

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

References $reg_membership_limitation.

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

334  {
335  return (bool) $this->reg_membership_limitation;
336  }
+ Here is the caller graph for this function:

◆ isRegistrationAccessCodeEnabled()

ilObjGroup::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

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

References $reg_access_code_enabled.

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

529  {
530  return (bool) $this->reg_access_code_enabled;
531  }
+ Here is the caller graph for this function:

◆ isRegistrationEnabled()

ilObjGroup::isRegistrationEnabled ( )

is registration enabled

public

Returns
bool

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

References getRegistrationType(), and GRP_REGISTRATION_DEACTIVATED.

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

219  {
221  }
const GRP_REGISTRATION_DEACTIVATED
getRegistrationType()
get registration type
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isRegistrationUnlimited()

ilObjGroup::isRegistrationUnlimited ( )

is registration unlimited

public

Returns
bool

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

References $reg_unlimited.

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

242  {
243  return $this->reg_unlimited;
244  }
+ Here is the caller graph for this function:

◆ isWaitingListEnabled()

ilObjGroup::isWaitingListEnabled ( )

is waiting list enabled

public

Parameters

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

References $waiting_list.

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

402  {
403  return $this->waiting_list;
404  }
+ Here is the caller graph for this function:

◆ join()

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

join Group, assigns user to role private

Parameters
integermember status = obj_id of local_group_role

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

References ilObject\$rbacadmin.

Referenced by addMember().

979  {
980  global $rbacadmin;
981 
982  if (is_array($a_mem_role)) {
983  foreach ($a_mem_role as $role) {
984  $rbacadmin->assignUser($role, $a_user_id, false);
985  }
986  } else {
987  $rbacadmin->assignUser($a_mem_role, $a_user_id, false);
988  }
989 
990  return true;
991  }
+ Here is the caller graph for this function:

◆ leave()

ilObjGroup::leave (   $a_user_id)

deassign member from group role private

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

References ilObject\$rbacadmin, and getMemberRoles().

Referenced by leaveGroup().

1067  {
1068  global $rbacadmin;
1069 
1070  $arr_groupRoles = $this->getMemberRoles($a_user_id);
1071 
1072  if (is_array($arr_groupRoles)) {
1073  foreach ($arr_groupRoles as $groupRole) {
1074  $rbacadmin->deassignUser($groupRole, $a_user_id);
1075  }
1076  } else {
1077  $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1078  }
1079 
1080  return true;
1081  }
getMemberRoles($a_user_id)
get group member status public
+ 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 public

Parameters
integeruser-Id
integergroup-Id

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

References ilObject\$rbacadmin, ilObject\$rbacreview, ilObjUser\dropDesktopItem(), getGroupAdminIds(), getGroupMemberIds(), ilObject\getRefId(), isAdmin(), and leave().

1042  {
1043  global $rbacadmin, $rbacreview;
1044 
1045  $member_ids = $this->getGroupMemberIds();
1046 
1047  if (count($member_ids) <= 1 || !in_array($this->ilias->account->getId(), $member_ids)) {
1048  return 2;
1049  } else {
1050  if (!$this->isAdmin($this->ilias->account->getId())) {
1051  $this->leave($this->ilias->account->getId());
1052  $member = new ilObjUser($this->ilias->account->getId());
1053  $member->dropDesktopItem($this->getRefId(), "grp");
1054 
1055  return 0;
1056  } elseif (count($this->getGroupAdminIds()) == 1) {
1057  return 1;
1058  }
1059  }
1060  }
dropDesktopItem($a_item_id, $a_type)
drop an item from user&#39;s personal desktop
leave($a_user_id)
deassign member from group role private
redirection script todo: (a better solution should control the processing via a xml file) ...
getGroupAdminIds($a_grpId="")
get Group Admin Id public
getRefId()
get reference id public
getGroupMemberIds()
get all group Member ids regardless of role public
isAdmin($a_userId)
is Admin public
+ Here is the call graph for this function:

◆ lookupGroupStatusTemplateId()

static ilObjGroup::lookupGroupStatusTemplateId (   $a_obj_id)
static

$ilDB $ilDB

Parameters
int$a_obj_id
Returns
int

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

References $ilDB, $query, $res, $row, ilObject\$type, ilDBConstants\FETCHMODE_ASSOC, and GRP_TYPE_CLOSED.

Referenced by ilRbacAdmin\adjustMovedObjectPermissions().

1278  {
1279  global $ilDB;
1280 
1281  $type = self::lookupGroupTye($a_obj_id);
1282  if ($type == GRP_TYPE_CLOSED) {
1283  $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_closed', 'text');
1284  } else {
1285  $query = 'SELECT obj_id FROM object_data WHERE type = ' . $ilDB->quote('rolt', 'text') . ' AND title = ' . $ilDB->quote('il_grp_status_open', 'text');
1286  }
1287  $res = $ilDB->query($query);
1289 
1290  return isset($row['obj_id']) ? $row['obj_id'] : 0;
1291  }
foreach($_POST as $key=> $value) $res
const GRP_TYPE_CLOSED
$query
global $ilDB
+ 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 129 of file class.ilObjGroup.php.

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

Referenced by ilObjRole\createPermissionIntersection().

130  {
131  global $ilDB;
132 
133  $query = "SELECT grp_type FROM grp_settings " .
134  "WHERE obj_id = " . $ilDB->quote($a_id, 'integer');
135  $res = $ilDB->query($query);
136  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
137  return $row->grp_type;
138  }
139  return GRP_TYPE_UNKNOWN;
140  }
const GRP_TYPE_UNKNOWN
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ 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 1873 of file class.ilObjGroup.php.

References $ilDB, $query, $res, $row, array, and ilDBConstants\FETCHMODE_OBJECT.

Referenced by ilMembershipRegistrationCodeUtils\lookupObjectsByCode().

1874  {
1875  global $ilDB;
1876 
1877  $query = "SELECT obj_id FROM grp_settings " .
1878  "WHERE reg_ac_enabled = " . $ilDB->quote(1, 'integer') . " " .
1879  "AND reg_ac = " . $ilDB->quote($a_code, 'text');
1880  $res = $ilDB->query($query);
1881 
1882  $obj_ids = array();
1883  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1884  $obj_ids[] = $row->obj_id;
1885  }
1886  return $obj_ids;
1887  }
foreach($_POST as $key=> $value) $res
$query
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ lookupShowMembersEnabled()

static ilObjGroup::lookupShowMembersEnabled ( int  $a_obj_id)
static

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

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

Referenced by ilParticipants\hasParticipantListAccess().

2067  {
2068  global $DIC;
2069  $ilDB = $DIC["ilDB"];
2070  $query = 'SELECT show_members FROM grp_settings'
2071  .' WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer');
2072  $res = $ilDB->query($query);
2073  if($ilDB->numRows($res) == 0) {
2074  return false;
2075  }
2076  $row = $ilDB->fetchAssoc($res);
2077  return (bool)$row['show_members'];
2078  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ lookupViewMode()

static ilObjGroup::lookupViewMode (   $a_obj_id)
static

lookup view mode $ilDB

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

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

1696  {
1697  global $ilDB;
1698 
1699  $query = 'SELECT view_mode FROM grp_settings ' .
1700  'WHERE obj_id = ' . $ilDB->quote($a_obj_id, 'integer');
1701  $res = $ilDB->query($query);
1702 
1703  $view_mode = null;
1704  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
1705  $view_mode = $row->view_mode;
1706  }
1707  return self::translateViewMode($a_obj_id, $view_mode);
1708  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB

◆ mayLeave()

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

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

References $ilDB, $ilUser, $row, date, and IL_CAL_DATE.

Referenced by ilObjGroupAccess\_checkAccess().

1997  {
1998  global $ilUser, $ilDB;
1999 
2000  if (!$a_user_id) {
2001  $a_user_id = $ilUser->getId();
2002  }
2003 
2004  $set = $ilDB->query("SELECT leave_end" .
2005  " FROM grp_settings" .
2006  " WHERE obj_id = " . $ilDB->quote($a_group_id, "integer"));
2007  $row = $ilDB->fetchAssoc($set);
2008  if ($row && $row["leave_end"]) {
2009  // timestamp to date
2010  $limit = date("Ymd", $row["leave_end"]);
2011  if ($limit < date("Ymd")) {
2012  $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2013  return false;
2014  }
2015  }
2016  return true;
2017  }
Class for single dates.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$ilUser
Definition: imgupload.php:18
const IL_CAL_DATE
global $ilDB
+ Here is the caller graph for this function:

◆ prepareAppointments()

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

Prepare calendar appointments.

protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

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

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

1786  {
1787  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1788 
1789  switch ($a_mode) {
1790  case 'create':
1791  case 'update':
1792 
1793  $apps = array();
1794  if ($this->getStart() && $this->getEnd()) {
1795  $app = new ilCalendarAppointmentTemplate(self::CAL_START);
1796  $app->setTitle($this->getTitle());
1797  $app->setSubtitle('grp_cal_start');
1798  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1799  $app->setDescription($this->getLongDescription());
1800  $app->setStart($this->getStart());
1801  $app->setFullday(true);
1802  $apps[] = $app;
1803 
1804  $app = new ilCalendarAppointmentTemplate(self::CAL_END);
1805  $app->setTitle($this->getTitle());
1806  $app->setSubtitle('grp_cal_end');
1807  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1808  $app->setDescription($this->getLongDescription());
1809  $app->setStart($this->getEnd());
1810  $app->setFullday(true);
1811  $apps[] = $app;
1812  }
1813  if ($this->isRegistrationUnlimited()) {
1814  return $apps;
1815  }
1816 
1817  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1818  $app->setTitle($this->getTitle());
1819  $app->setSubtitle('grp_cal_reg_start');
1820  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1821  $app->setDescription($this->getLongDescription());
1822  $app->setStart($this->getRegistrationStart());
1823  $apps[] = $app;
1824 
1825  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1826  $app->setTitle($this->getTitle());
1827  $app->setSubtitle('grp_cal_reg_end');
1828  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1829  $app->setDescription($this->getLongDescription());
1830  $app->setStart($this->getRegistrationEnd());
1831  $apps[] = $app;
1832 
1833 
1834  return $apps;
1835 
1836  case 'delete':
1837  // Nothing to do: The category and all assigned appointments will be deleted.
1838  return array();
1839  }
1840  }
isRegistrationUnlimited()
is registration unlimited
const IL_CAL_TRANSLATION_SYSTEM
getRegistrationEnd()
get registration end
Apointment templates are used for automatic generated apointments.
getRegistrationStart()
get registration start
getTitle()
get object title public
getEnd()
Get end.
Create styles array
The data for the language used.
getStart()
Get group start.
getLongDescription()
get object long description (stored in object_description)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

ilObjGroup::read ( )

Read group.

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

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

812  {
813  global $ilDB;
814 
815  parent::read();
816 
817  $query = "SELECT * FROM grp_settings " .
818  "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
819 
820  $res = $ilDB->query($query);
821  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
822  $this->setInformation($row->information);
823  $this->setGroupType($row->grp_type);
824  $this->setRegistrationType($row->registration_type);
825  $this->enableUnlimitedRegistration($row->registration_unlimited);
826  $this->setRegistrationStart(new ilDateTime($row->registration_start, IL_CAL_DATETIME));
827  $this->setRegistrationEnd(new ilDateTime($row->registration_end, IL_CAL_DATETIME));
828  $this->setPassword($row->registration_password);
829  $this->enableMembershipLimitation((bool) $row->registration_mem_limit);
830  $this->setMaxMembers($row->registration_max_members);
831  $this->enableWaitingList($row->waiting_list);
832  $this->setLatitude($row->latitude);
833  $this->setLongitude($row->longitude);
834  $this->setLocationZoom($row->location_zoom);
835  $this->setEnableGroupMap($row->enablemap);
836  $this->enableRegistrationAccessCode($row->reg_ac_enabled);
837  $this->setRegistrationAccessCode($row->reg_ac);
838  $this->setViewMode($row->view_mode);
839  $this->setMailToMembersType($row->mail_members_type);
840  $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
841  $this->setMinMembers($row->registration_min_members);
842  $this->setWaitingListAutoFill($row->auto_wait);
843  $this->setShowMembers($row->show_members);
844  $this->setStart($row->grp_start ? new ilDate($row->grp_start, IL_CAL_UNIX) : null);
845  $this->setEnd($row->grp_end ? new ilDate($row->grp_end, IL_CAL_UNIX) : null);
846  }
847  $this->initParticipants();
848 
849  // Inherit order type from parent course (if exists)
850  include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
852  }
setCancellationEnd(ilDate $a_value=null)
const IL_CAL_DATETIME
setEnd(ilDate $end=null)
Set end.
setWaitingListAutoFill($a_value)
setStart(ilDate $start=null)
Set start.
setLongitude($a_longitude)
Set Longitude.
const IL_CAL_UNIX
enableUnlimitedRegistration($a_status)
enable unlimited registration
enableWaitingList($a_status)
enable waiting list
setShowMembers($a_status)
setLatitude($a_latitude)
Set Latitude.
Class for single dates.
foreach($_POST as $key=> $value) $res
getId()
get object id public
enableMembershipLimitation($a_status)
enable max member limitation
setPassword($a_pass)
set password
setViewMode($a_view_mode)
Set group view mode.
setMaxMembers($a_max)
set max members
setRegistrationEnd($a_end)
set registration end
setRegistrationType($a_type)
set registration type
Date and time handling
initParticipants()
init participants object
$query
setGroupType($a_type)
set group type
setMinMembers($a_max)
set min members
setInformation($a_information)
set information
setEnableGroupMap($a_enablemap)
Set Enable Group Map.
setRegistrationStart($a_start)
set registration start
enableRegistrationAccessCode($a_status)
En/disable registration access code.
setLocationZoom($a_locationzoom)
Set LocationZoom.
setOrderType($a_value)
global $ilDB
static _lookupSortMode($a_obj_id)
lookup sort mode
setMailToMembersType($a_type)
Set mail to members type.
setRegistrationAccessCode($a_code)
Set refistration access code.
+ Here is the call graph for this function:

◆ readGroupStatus()

ilObjGroup::readGroupStatus ( )

get group status, redundant method because public

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

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

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

1446  {
1447  global $rbacsystem,$rbacreview;
1448 
1449  $local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1450 
1451  //get all relevant roles
1452  $arr_globalRoles = array_diff($local_roles, $this->getDefaultGroupRoles());
1453 
1454  //if one global role has no permission to join the group is officially closed !
1455  foreach ($arr_globalRoles as $globalRole) {
1456  if ($rbacsystem->checkPermission($this->getRefId(), $globalRole, "join")) {
1457  return $this->group_status = GRP_TYPE_PUBLIC;
1458  }
1459  }
1460 
1461  return $this->group_status = GRP_TYPE_CLOSED;
1462  }
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
const GRP_TYPE_PUBLIC
const GRP_TYPE_CLOSED
getRefId()
get reference id 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 1895 of file class.ilObjGroup.php.

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

1896  {
1897  include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
1898  include_once "./Modules/Group/classes/class.ilGroupParticipants.php";
1900 
1901  if ($part->isAssigned($a_user_id)) {
1902  return true;
1903  }
1904 
1905  if (!$a_force_registration) {
1906  // Availability
1907  if (!$this->isRegistrationEnabled()) {
1908  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
1909 
1911  throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
1912  ', group subscription is deactivated.', ilMembershipRegistrationException::REGISTRATION_CODE_DISABLED);
1913  }
1914  }
1915 
1916  // Time Limitation
1917  if (!$this->isRegistrationUnlimited()) {
1918  $start = $this->getRegistrationStart();
1919  $end = $this->getRegistrationEnd();
1920  $time = new ilDateTime(time(), IL_CAL_UNIX);
1921 
1923  throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
1924  ', group is out of registration time.', ilMembershipRegistrationException::OUT_OF_REGISTRATION_PERIOD);
1925  }
1926  }
1927 
1928  // Max members
1929  if ($this->isMembershipLimited()) {
1930  $free = max(0, $this->getMaxMembers() - $part->getCountMembers());
1931  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
1932  $waiting_list = new ilGroupWaitingList($this->getId());
1933  if ($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers())) {
1934  $this->lng->loadLanguageModule("grp");
1935  $waiting_list->addToList($a_user_id);
1936 
1937  $info = sprintf(
1938  $this->lng->txt('grp_added_to_list'),
1939  $this->getTitle(),
1940  $waiting_list->getPosition($a_user_id)
1941  );
1942 
1943  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1944  include_once('./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
1945  $participants = ilGroupParticipants::_getInstanceByObjId($this->getId());
1946  $participants->sendNotification(ilGroupMembershipMailNotification::TYPE_WAITING_LIST_MEMBER, $a_user_id);
1947 
1949  }
1950 
1951  if (!$free or $waiting_list->getCountUsers()) {
1952  throw new ilMembershipRegistrationException('Cannot registrate to group ' . $this->getId() .
1953  ', membership is limited.', ilMembershipRegistrationException::OBJECT_IS_FULL);
1954  }
1955  }
1956  }
1957 
1958  $part->add($a_user_id, $a_role);
1959  $part->sendNotification(ilGroupMembershipMailNotification::TYPE_ADMISSION_MEMBER, $a_user_id);
1960  $part->sendNotification(ilGroupMembershipMailNotification::TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
1961  return true;
1962  }
getMaxMembers()
get max members
isRegistrationEnabled()
is registration enabled
isRegistrationUnlimited()
is registration unlimited
isMembershipLimited()
is max member limited
getRegistrationEnd()
get registration end
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.
const IL_CAL_UNIX
getRegistrationStart()
get registration start
$time
Definition: cron.php:21
getId()
get object id public
static _usingRegistrationCode()
Using Registration code.
Waiting list for groups.
getTitle()
get object title public
Date and time handling
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
$info
Definition: index.php:5
isWaitingListEnabled()
is waiting list enabled
+ Here is the call graph for this function:

◆ setCancellationEnd()

ilObjGroup::setCancellationEnd ( ilDate  $a_value = null)

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

Referenced by read().

563  {
564  $this->leave_end = $a_value;
565  }
+ 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 481 of file class.ilObjGroup.php.

Referenced by read().

482  {
483  $this->enablemap = $a_enablemap;
484  }
+ Here is the caller graph for this function:

◆ setEnd()

ilObjGroup::setEnd ( ilDate  $end = null)

Set end.

Parameters
ilDate$end

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

References $end.

Referenced by read().

613  {
614  $this->end = $end;
615  }
+ Here is the caller graph for this function:

◆ setGroupStatus()

ilObjGroup::setGroupStatus (   $a_status)

Set group status.

public

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

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

1424  {
1425  $this->group_status = $a_status;
1426  }

◆ setGroupType()

ilObjGroup::setGroupType (   $a_type)

set group type

public

Parameters
inttype

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

References $a_type.

Referenced by read().

174  {
175  $this->group_type = $a_type;
176  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ setInformation()

ilObjGroup::setInformation (   $a_information)

set information

public

Parameters
stringinformation
Returns

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

Referenced by read().

151  {
152  $this->information = $a_information;
153  }
+ Here is the caller graph for this function:

◆ setLatitude()

ilObjGroup::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by read().

422  {
423  $this->latitude = $a_latitude;
424  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjGroup::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

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

Referenced by read().

462  {
463  $this->locationzoom = $a_locationzoom;
464  }
+ Here is the caller graph for this function:

◆ setLongitude()

ilObjGroup::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by read().

442  {
443  $this->longitude = $a_longitude;
444  }
+ 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 548 of file class.ilObjGroup.php.

References $a_type.

Referenced by read().

549  {
550  $this->mail_members = $a_type;
551  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ setMaxMembers()

ilObjGroup::setMaxMembers (   $a_max)

set max members

public

Parameters
intmax members

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

Referenced by read().

367  {
368  $this->reg_max_members = $a_max;
369  }
+ Here is the caller graph for this function:

◆ setMessage()

ilObjGroup::setMessage (   $a_message)

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

1767  {
1768  $this->message = $a_message;
1769  }

◆ setMinMembers()

ilObjGroup::setMinMembers (   $a_max)

set min members

public

Parameters
intmin members

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

Referenced by read().

345  {
346  $this->reg_min_members = $a_max;
347  }
+ 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

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

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

Referenced by applyDidacticTemplate().

1540  {
1541  $rbacadmin = $GLOBALS['DIC']->rbac()->admin();
1542  $rbacreview = $GLOBALS['DIC']->rbac()->review();
1543 
1544  $parent_roles = $rbacreview->getParentRoleIds($a_parent_ref);
1545  foreach ((array) $parent_roles as $parent_role) {
1546  if ($parent_role['parent'] == $this->getRefId()) {
1547  continue;
1548  }
1549  if ($rbacreview->isProtected($parent_role['parent'], $parent_role['rol_id'])) {
1550  $operations = $rbacreview->getOperationsOfRole(
1551  $parent_role['obj_id'],
1552  $this->getType(),
1553  $parent_role['parent']
1554  );
1555  $rbacadmin->grantPermission(
1556  $parent_role['obj_id'],
1557  $operations,
1558  $this->getRefId()
1559  );
1560  continue;
1561  }
1562 
1563  $rbacadmin->initIntersectionPermissions(
1564  $this->getRefId(),
1565  $parent_role['obj_id'],
1566  $parent_role['parent'],
1567  $this->getGrpStatusOpenTemplateId(),
1568  ROLE_FOLDER_ID
1569  );
1570  }
1571  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
getGrpStatusOpenTemplateId()
get group status open template public
getType()
get object type public
Create styles array
The data for the language used.
getRefId()
get reference id public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPassword()

ilObjGroup::setPassword (   $a_pass)

set password

public

Parameters
stringpassword

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

Referenced by read().

300  {
301  $this->reg_password = $a_pass;
302  }
+ 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 519 of file class.ilObjGroup.php.

Referenced by read().

520  {
521  $this->reg_access_code = $a_code;
522  }
+ Here is the caller graph for this function:

◆ setRegistrationEnd()

ilObjGroup::setRegistrationEnd (   $a_end)

set registration end

public

Parameters
intunix time
Returns

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

Referenced by read().

278  {
279  $this->reg_end = $a_end;
280  }
+ Here is the caller graph for this function:

◆ setRegistrationStart()

ilObjGroup::setRegistrationStart (   $a_start)

set registration start

public

Parameters
objectilDateTime
Returns

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

Referenced by read().

254  {
255  $this->reg_start = $a_start;
256  }
+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjGroup::setRegistrationType (   $a_type)

set registration type

public

Parameters
intregistration type
Returns

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

References $a_type.

Referenced by read().

197  {
198  $this->reg_type = $a_type;
199  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ setShowMembers()

ilObjGroup::setShowMembers (   $a_status)

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

Referenced by read().

573  {
574  $this->show_members = $a_status;
575  }
+ Here is the caller graph for this function:

◆ setStart()

ilObjGroup::setStart ( ilDate  $start = null)

Set start.

Parameters
ilDate$start

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

References $start.

Referenced by read().

595  {
596  $this->start = $start;
597  }
+ 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 1686 of file class.ilObjGroup.php.

Referenced by read().

1687  {
1688  $this->view_mode = $a_view_mode;
1689  }
+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjGroup::setWaitingListAutoFill (   $a_value)

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

Referenced by read().

407  {
408  $this->auto_fill_from_waiting = (bool) $a_value;
409  }
+ 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 1717 of file class.ilObjGroup.php.

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

Referenced by ilObjGroupGUI\initForm().

1718  {
1719  global $tree;
1720 
1721  if (!$a_view_mode) {
1722  $a_view_mode = ilContainer::VIEW_DEFAULT;
1723  }
1724 
1725  // view mode is inherit => check for parent course
1726  if ($a_view_mode == ilContainer::VIEW_INHERIT) {
1727  if (!$a_ref_id) {
1728  $ref = ilObject::_getAllReferences($a_obj_id);
1729  $a_ref_id = end($ref);
1730  }
1731 
1732  $crs_ref = $tree->checkForParentType($a_ref_id, 'crs');
1733  if (!$crs_ref) {
1735  }
1736 
1737  include_once './Modules/Course/classes/class.ilObjCourse.php';
1739 
1740  // validate course view mode
1744  }
1745 
1746  return $view_mode;
1747  }
1748 
1749  return $a_view_mode;
1750  }
static _lookupViewMode($a_id)
lookup view mode of container
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjId($a_id)
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilObjGroup::update ( )

Update group.

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

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

724  {
725  global $ilDB,$ilAppEventHandler;
726 
727  if (!parent::update()) {
728  return false;
729  }
730 
731  $query = "UPDATE grp_settings " .
732  "SET information = " . $ilDB->quote($this->getInformation(), 'text') . ", " .
733  "grp_type = " . $ilDB->quote((int) $this->getGroupType(), 'integer') . ", " .
734  "registration_type = " . $ilDB->quote($this->getRegistrationType(), 'integer') . ", " .
735  "registration_enabled = " . $ilDB->quote($this->isRegistrationEnabled() ? 1 : 0, 'integer') . ", " .
736  "registration_unlimited = " . $ilDB->quote($this->isRegistrationUnlimited() ? 1 : 0, 'integer') . ", " .
737  "registration_start = " . $ilDB->quote(($this->getRegistrationStart() && !$this->getRegistrationStart()->isNull()) ? $this->getRegistrationStart()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
738  "registration_end = " . $ilDB->quote(($this->getRegistrationEnd() && !$this->getRegistrationEnd()->isNull()) ? $this->getRegistrationEnd()->get(IL_CAL_DATETIME, '') : null, 'timestamp') . ", " .
739  "registration_password = " . $ilDB->quote($this->getPassword(), 'text') . ", " .
740 // "registration_membership_limited = ".$ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
741  "registration_mem_limit = " . $ilDB->quote((int) $this->isMembershipLimited(), 'integer') . ", " .
742  "registration_max_members = " . $ilDB->quote($this->getMaxMembers(), 'integer') . ", " .
743  "waiting_list = " . $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0, 'integer') . ", " .
744  "latitude = " . $ilDB->quote($this->getLatitude(), 'text') . ", " .
745  "longitude = " . $ilDB->quote($this->getLongitude(), 'text') . ", " .
746  "location_zoom = " . $ilDB->quote($this->getLocationZoom(), 'integer') . ", " .
747  "enablemap = " . $ilDB->quote((int) $this->getEnableGroupMap(), 'integer') . ", " .
748  'reg_ac_enabled = ' . $ilDB->quote($this->isRegistrationAccessCodeEnabled(), 'integer') . ', ' .
749  'reg_ac = ' . $ilDB->quote($this->getRegistrationAccessCode(), 'text') . ', ' .
750  'view_mode = ' . $ilDB->quote($this->getViewMode(), 'integer') . ', ' .
751  'mail_members_type = ' . $ilDB->quote($this->getMailToMembersType(), 'integer') . ', ' .
752  'leave_end = ' . $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer') . ', ' .
753  "registration_min_members = " . $ilDB->quote($this->getMinMembers(), 'integer') . ", " .
754  "auto_wait = " . $ilDB->quote($this->hasWaitingListAutoFill(), 'integer') . ", " .
755  "show_members = " . $ilDB->quote((int) $this->getShowMembers(), 'integer') . ", " .
756  'grp_start = ' . $ilDB->quote($this->getStart() instanceof ilDate ? $this->getStart()->get(IL_CAL_UNIX) : null) . ', ' .
757  'grp_end = ' . $ilDB->quote($this->getEnd() instanceof ilDate ? $this->getEnd()->get(IL_CAL_UNIX) : null) . ' ' .
758  "WHERE obj_id = " . $ilDB->quote($this->getId(), 'integer');
759  $res = $ilDB->manipulate($query);
760 
761  $ilAppEventHandler->raise(
762  'Modules/Group',
763  'update',
764  array('object' => $this,
765  'obj_id' => $this->getId(),
766  'appointments' => $this->prepareAppointments('update'))
767  );
768 
769 
770  return true;
771  }
getMaxMembers()
get max members
isRegistrationEnabled()
is registration enabled
getLongitude()
Get Longitude.
isRegistrationUnlimited()
is registration unlimited
const IL_CAL_DATETIME
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
getRegistrationEnd()
get registration end
getLatitude()
Get Latitude.
getRegistrationAccessCode()
get access code
getViewMode()
Get container view mode.
const IL_CAL_UNIX
getRegistrationStart()
get registration start
getGroupType()
get group type
Class for single dates.
foreach($_POST as $key=> $value) $res
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
getLocationZoom()
Get LocationZoom.
getEnd()
Get end.
$query
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
Create styles array
The data for the language used.
getStart()
Get group start.
update($pash, $contents, Config $config)
getPassword()
get password
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
global $ilDB
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
+ 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.

public

Returns

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

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

1305  {
1306  global $DIC;
1307 
1308  $logger = $DIC->logger()->grp();
1309 
1310  if ($a_group_type == GRP_TYPE_OPEN) {
1311  $this->applyDidacticTemplate(0);
1312  return;
1313  }
1314 
1315  $templates = ilDidacticTemplateSettings::getInstanceByObjectType($this->getType())->getTemplates();
1316  foreach ($templates as $template) {
1317  // the closed template
1318  if ($template->isAutoGenerated()) {
1319  $logger->info('Appying default closed template');
1320  $this->applyDidacticTemplate($template->getId());
1321  return;
1322  }
1323  }
1324  $logger->warning('No closed didactic template available.');
1325  }
const GRP_TYPE_OPEN
$template
global $DIC
Definition: saml.php:7
applyDidacticTemplate($a_tpl_id)
Apply template.
getType()
get object type public
static getInstanceByObjectType($a_obj_type)
Get instance by obj type.
+ Here is the call graph for this function:

◆ validate()

ilObjGroup::validate ( )

validate group settings

public

Returns
bool

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

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

624  {
625  global $ilErr;
626 
627  if (!$this->getTitle()) {
628  $this->title = '';
629  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
630  }
631  if ($this->getRegistrationType() == GRP_REGISTRATION_PASSWORD and !strlen($this->getPassword())) {
632  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
633  }
634  /*
635  if(ilDateTime::_before($this->getRegistrationEnd(),$this->getRegistrationStart()))
636  {
637  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
638  }
639  */
640  if ($this->isMembershipLimited()) {
641  if ($this->getMinMembers() <= 0 && $this->getMaxMembers() <= 0) {
642  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
643  }
644  if ($this->getMaxMembers() <= 0 && $this->isWaitingListEnabled()) {
645  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
646  }
647  if ($this->getMaxMembers() > 0 && $this->getMinMembers() > $this->getMaxMembers()) {
648  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
649  }
650  }
651  if (
652  ($this->getRegistrationStart() && !$this->getRegistrationEnd()) ||
653  (!$this->getRegistrationStart() && $this->getRegistrationEnd()) ||
654  $this->getRegistrationEnd() <= $this->getRegistrationStart()
655  ) {
656  $ilErr->appendMessage($this->lng->txt((self::ERR_WRONG_REGISTRATION_LIMITED)));
657  }
658 
659  return strlen($ilErr->getMessage()) == 0;
660  }
getMaxMembers()
get max members
global $ilErr
Definition: raiseError.php:16
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
getRegistrationEnd()
get registration end
const GRP_REGISTRATION_PASSWORD
getRegistrationStart()
get registration start
getTitle()
get object title public
getPassword()
get password
getMinMembers()
get min members
isWaitingListEnabled()
is waiting list enabled
+ 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 = null
private

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

Referenced by 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: