ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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...
 
 isGroupTypeModified ($a_old_type)
 check if group type is modified 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...
 
 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 ()
 
 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)
 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 ()
 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...
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event happend, each object may decide how it reacts. More...
 
 exportXML ()
 
 deleteExportFiles ($a_files)
 
 downloadExportFile ($file)
 
 _lookupIdByTitle ($a_title)
 
 _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...
 
 __initFileObject ()
 
 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
 ilObject ($a_id=0, $a_reference=true)
 Constructor public. More...
 
 withReferences ()
 determines wehter objects are referenced or not (got ref ids or not) More...
 
 read ($a_force_db=false)
 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 ()
 
 _lookupOwnerName ($a_owner_id)
 lookup owner name for owner id More...
 
 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...
 
 setObjDataRecord ($a_record)
 set object_data record (note: this method should only be called from the ilObjectFactory class) 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...
 
 _getIdForImportId ($a_import_id)
 get current object id for import id (static) More...
 
 _lookupOwner ($a_id)
 lookup object owner More...
 
 _lookupLastUpdate ($a_id, $a_as_string=false)
 lookup last update More...
 
 _getLastUpdateOfObjects ($a_objs)
 Get last update for a set of media objects. More...
 
 _setDeletedDate ($a_ref_id)
 only called in ilTree::saveSubTree More...
 
 _resetDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _lookupDeletedDate ($a_ref_id)
 only called in ilObjectGUI::insertSavedNodes More...
 
 _writeTitle ($a_obj_id, $a_title)
 write title to db (static) More...
 
 _writeDescription ($a_obj_id, $a_desc)
 write description to db (static) More...
 
 _writeImportId ($a_obj_id, $a_import_id)
 write import id to db (static) More...
 
 _isInTrash ($a_ref_id)
 checks wether object is in trash More...
 
 _hasUntrashedReference ($a_obj_id)
 checks wether an object has at least one reference that is not in trash More...
 
 _getObjectsDataForType ($a_type, $a_omit_trash=false)
 get all objects of a certain type 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...
 
 delete ()
 delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! 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...
 
 notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
 notifys an object about an event occured Based on the event passed, each object may decide how it reacts. More...
 
 setRegisterMode ($a_bool)
 
 isUserRegistered ($a_user_id=0)
 
 requireRegistration ()
 
 getXMLZip ()
 
 getHTMLDirectory ()
 
 cloneObject ($a_target_id, $a_copy_id=0, $a_omit_tree=false)
 Clone object permissions, put in tree ... More...
 
 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...
 
 _lookupCreationDate ($a_id)
 Lookup creation date. 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
 ilContainer ($a_id=0, $a_call_by_reference=true)
 Constructor public. More...
 
 createContainerDirectory ()
 Create directory for the container. More...
 
 getContainerDirectory ()
 Get the container directory. More...
 
 _getContainerDirectory ($a_id)
 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...
 
 _lookupContainerSetting ($a_id, $a_keyword, $a_default_value=NULL)
 Lookup a container setting. More...
 
 _writeContainerSetting ($a_id, $a_keyword, $a_value)
 
 _lookupIconPath ($a_id, $a_size="big")
 lookup icon path More...
 
 saveIcons ($a_custom_icon)
 save container icons More...
 
 removeCustomIcon ()
 remove small icon More...
 
 cloneObject ($a_target_id, $a_copy_id=0)
 Clone container settings. 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...
 
- 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...
 
 _importFromXMLString ($xml, $parent_id)
 Static used for importing a group from xml string. More...
 
 _importFromFile ($file, $parent_id)
 Static used for importing an group from xml zip file. More...
 
static lookupViewMode ($a_obj_id)
 lookup view mode $ilDB 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 Public Member Functions inherited from ilObject
static _lookupObjIdByImportId ($a_import_id)
 
static _lookupImportId ($a_obj_id)
 
static _getAllReferences ($a_id)
 get all reference ids of object More...
 
static _lookupTitle ($a_id)
 lookup object title More...
 
static _getIdsForTitle ($title, $type='', $partialmatch=false)
 
static _lookupDescription ($a_id)
 lookup object description More...
 
static _lookupObjId ($a_id)
 
static setDeletedDates ($a_ref_ids)
 Set deleted date type $ilDB. More...
 
static _lookupType ($a_id, $a_reference=false)
 lookup object type More...
 
static _lookupObjectId ($a_ref_id)
 lookup object id 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 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 _getContainerSettings ($a_id)
 
static _deleteContainerSettings ($a_id, $a_keyword=null, $a_keyword_like=false)
 
static _exportContainerSettings (ilXmlWriter $a_xml, $a_obj_id)
 
static getCompleteDescriptions (array $objects)
 overwrites description fields to long or short description in an assoc array keys needed (obj_id and description) More...
 

Data Fields

const CAL_REG_START = 1
 
const CAL_REG_END = 2
 
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 MAIL_ALLOWED_ALL = 1
 
const MAIL_ALLOWED_TUTORS = 2
 
 $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
 
 $ilias
 
 $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
 
 $obj_data_record
 object_data record More...
 
- 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...
 

Static Protected Member Functions

static translateViewMode ($a_obj_id, $a_view_mode, $a_ref_id=null)
 translate view mode 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
 
- Protected Attributes inherited from ilContainer
 $order_type = 0
 
 $hiddenfilesfound = false
 

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

References ilObject\ilObject(), and ilObject\setRegisterMode().

103  {
104  global $tree;
105 
106  $this->tree =& $tree;
107 
108  $this->type = "grp";
109  $this->ilObject($a_id,$a_call_by_reference);
110  $this->setRegisterMode(true); // ???
111  }
ilObject($a_id=0, $a_reference=true)
Constructor public.
setRegisterMode($a_bool)
+ Here is the call graph for this function:

Member Function Documentation

◆ __initFileObject()

ilObjGroup::__initFileObject ( )

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

References $file_obj.

Referenced by deleteExportFiles(), downloadExportFile(), and exportXML().

1893  {
1894  if($this->file_obj)
1895  {
1896  return $this->file_obj;
1897  }
1898  else
1899  {
1900  include_once './Modules/Group/classes/class.ilFileDataGroup.php';
1901 
1902  return $this->file_obj = new ilFileDataGroup($this);
1903  }
1904  }
$file_obj
Group file object for handling of export files.
+ Here is the caller graph for this function:

◆ _getMembers()

ilObjGroup::_getMembers (   $a_obj_id)

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

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

Referenced by _isMember(), and ilLPStatusManualByTutor\getMembers().

1763  {
1764  global $rbacreview;
1765 
1766  // get reference
1767  $ref_ids = ilObject::_getAllReferences($a_obj_id);
1768  $ref_id = current($ref_ids);
1769 
1770  $local_roles = $rbacreview->getRolesOfRoleFolder($ref_id,false);
1771 
1772  $users = array();
1773  foreach($local_roles as $role_id)
1774  {
1775  $users = array_merge($users,$rbacreview->assignedUsers($role_id));
1776  }
1777 
1778  return array_unique($users);
1779  }
static _getAllReferences($a_id)
get all reference ids of object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _importFromFile()

ilObjGroup::_importFromFile (   $file,
  $parent_id 
)
static

Static used for importing an group from xml zip file.

Parameters
xmlfile array structure like $_FILE from upload public

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

References ilObject\$lng, and _importFromXMLString().

Referenced by ilObjGroupGUI\importFileObject2().

1681  {
1682  global $lng;
1683 
1684  include_once './Modules/Group/classes/class.ilFileDataGroup.php';
1685 
1686  $file_obj = new ilFileDataGroup(null);
1687  $file_obj->addImportDirectory();
1688  $file_obj->createImportFile($_FILES["xmldoc"]["tmp_name"],$_FILES['xmldoc']['name']);
1689  $file_obj->unpackImportFile();
1690 
1691  if(!$file_obj->validateImportFile())
1692  {
1693  return false;
1694  }
1695  return ilObjGroup::_importFromXMLString(file_get_contents($file_obj->getImportFile()),$parent_id);
1696  }
_importFromXMLString($xml, $parent_id)
Static used for importing a group from xml string.
$file_obj
Group file object for handling of export files.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _importFromXMLString()

ilObjGroup::_importFromXMLString (   $xml,
  $parent_id 
)
static

Static used for importing a group from xml string.

Parameters
xmlstring public

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

Referenced by _importFromFile().

1665  {
1666  include_once 'Modules/Group/classes/class.ilGroupXMLParser.php';
1667 
1668  $import_parser = new ilGroupXMLParser($xml,$parent_id);
1669 
1670  return $import_parser->startParsing();
1671  }
Group Import Parser.
+ Here is the caller graph for this function:

◆ _isMember()

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

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

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

Referenced by ilObjCourseGrouping\_checkGroupingDependencies().

1714  {
1715  global $rbacreview,$ilObjDataCache,$ilDB;
1716 
1717  $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,false);
1718  $user_roles = $rbacreview->assignedRoles($a_user_id);
1719 
1720  // Used for membership limitations -> check membership by given field
1721  if($a_field)
1722  {
1723  include_once './Services/User/classes/class.ilObjUser.php';
1724 
1725  $tmp_user =& ilObjectFactory::getInstanceByObjId($a_user_id);
1726  switch($a_field)
1727  {
1728  case 'login':
1729  $and = "AND login = '".$tmp_user->getLogin()."' ";
1730  break;
1731  case 'email':
1732  $and = "AND email = '".$tmp_user->getEmail()."' ";
1733  break;
1734  case 'matriculation':
1735  $and = "AND matriculation = '".$tmp_user->getMatriculation()."' ";
1736  break;
1737 
1738  default:
1739  $and = "AND usr_id = '".$a_user_id."'";
1740  break;
1741  }
1742  if(!$members = ilObjGroup::_getMembers($ilObjDataCache->lookupObjId($a_ref_id)))
1743  {
1744  return false;
1745  }
1746  $query = "SELECT * FROM usr_data as ud ".
1747  "WHERE usr_id IN (".implode(",",ilUtil::quoteArray($members)).") ".
1748  $and;
1749  $res = $ilDB->query($query);
1750 
1751  return $res->numRows() ? true : false;
1752  }
1753 
1754  if (!array_intersect($local_roles,$user_roles))
1755  {
1756  return false;
1757  }
1758 
1759  return true;
1760  }
_getMembers($a_obj_id)
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()

ilObjGroup::_lookupIdByTitle (   $a_title)

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

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

Referenced by ilMail\getEmailsOfRecipients(), and ilMail\getUserIds().

1699  {
1700  global $ilDB;
1701 
1702  $query = "SELECT * FROM object_data WHERE title = ".
1703  $ilDB->quote($a_title ,'text')." AND type = 'grp'";
1704  $res = $ilDB->query($query);
1705  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1706  {
1707  return $row->obj_id;
1708  }
1709  return 0;
1710  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
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 1885 of file class.ilObjGroup.php.

References ilObjectActivation\addAdditionalSubItemInformation().

1886  {
1887  include_once './Services/Object/classes/class.ilObjectActivation.php';
1889  }
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 975 of file class.ilObjGroup.php.

References join().

976  {
977  global $rbacadmin;
978 
979  if (isset($a_user_id) && isset($a_mem_role) )
980  {
981  $this->join($a_user_id,$a_mem_role);
982  return true;
983  }
984  else
985  {
986  $this->ilias->raiseError(get_class($this)."::addMember(): Missing parameters !",$this->ilias->error_obj->WARNING);
987  return false;
988  }
989  }
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 1914 of file class.ilObjGroup.php.

References getMessage().

1915  {
1916  if($this->getMessage())
1917  {
1918  $this->message .= "<br /> ";
1919  }
1920  $this->message .= $a_message;
1921  }
+ Here is the call graph for this function:

◆ cloneAutoGeneratedRoles()

ilObjGroup::cloneAutoGeneratedRoles (   $new_obj)

Clone group admin and member role permissions.

public

Parameters
objectnew group object

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

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

Referenced by cloneObject().

900  {
901  global $rbacadmin,$rbacreview;
902 
903  $admin = $this->getDefaultAdminRole();
904  $new_admin = $new_obj->getDefaultAdminRole();
905  if(!$admin || !$new_admin || !$this->getRefId() || !$new_obj->getRefId())
906  {
907  ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_admin');
908  }
909  $rbacadmin->copyRolePermissions($admin,$this->getRefId(),$new_obj->getRefId(),$new_admin,true);
910  ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_admin.');
911 
912  $member = $this->getDefaultMemberRole();
913  $new_member = $new_obj->getDefaultMemberRole();
914  if(!$member || !$new_member)
915  {
916  ilLoggerFactory::getLogger('grp')->warning('Error cloning auto generated rol: il_grp_member');
917  }
918  $rbacadmin->copyRolePermissions($member,$this->getRefId(),$new_obj->getRefId(),$new_member,true);
919  ilLoggerFactory::getLogger('grp')->info('Finished copying of role il_grp_member.');
920  }
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 880 of file class.ilObjGroup.php.

References ilObjectActivation\cloneDependencies(), and ilObject\getRefId().

881  {
882  global $tree;
883 
884  parent::cloneDependencies($a_target_id,$a_copy_id);
885 
886  include_once('Services/Object/classes/class.ilObjectActivation.php');
887  ilObjectActivation::cloneDependencies($this->getRefId(), $a_target_id, $a_copy_id);
888 
889  return true;
890  }
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 
)

Clone group (no member data)

public

Parameters
inttarget ref_id
intcopy id

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

References $ilDB, $ilSetting, $ilUser, ilCourseDefinedFieldDefinition\_clone(), ilGroupParticipants\_getInstanceByObjId(), cloneAutoGeneratedRoles(), ilMembershipRegistrationCodeUtils\generateCode(), ilContainer\getBigIconPath(), getCancellationEnd(), getEnableGroupMap(), getGroupType(), ilObject\getId(), getInformation(), getLatitude(), getLocationZoom(), ilLoggerFactory\getLogger(), getLongitude(), getMailToMembersType(), getMaxMembers(), getMinMembers(), getPassword(), getRegistrationEnd(), getRegistrationStart(), getRegistrationType(), ilContainer\getSmallIconPath(), ilContainer\getTinyIconPath(), ilContainer\getViewMode(), hasWaitingListAutoFill(), IL_GRP_ADMIN, isMembershipLimited(), isRegistrationAccessCodeEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), and readGroupStatus().

809  {
810  global $ilDB,$ilUser, $ilSetting;
811 
812  $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
813  $new_obj->setGroupType($this->getGroupType());
814  $new_obj->initGroupStatus($this->getGroupType() ? $this->getGroupType() : $this->readGroupStatus());
815 
816  $this->cloneAutoGeneratedRoles($new_obj);
817 
818  $new_obj->setRegistrationType($this->getRegistrationType());
819  $new_obj->setInformation($this->getInformation());
820  $new_obj->setRegistrationStart($this->getRegistrationStart());
821  $new_obj->setRegistrationEnd($this->getRegistrationEnd());
822  $new_obj->enableUnlimitedRegistration($this->isRegistrationUnlimited());
823  $new_obj->setPassword($this->getPassword());
824  $new_obj->enableMembershipLimitation($this->isMembershipLimited());
825  $new_obj->setMaxMembers($this->getMaxMembers());
826  $new_obj->enableWaitingList($this->isWaitingListEnabled());
827 
828  // map
829  $new_obj->setLatitude($this->getLatitude());
830  $new_obj->setLongitude($this->getLongitude());
831  $new_obj->setLocationZoom($this->getLocationZoom());
832  $new_obj->setEnableGroupMap($this->getEnableGroupMap());
833  $new_obj->enableRegistrationAccessCode($this->isRegistrationAccessCodeEnabled());
834  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
835  $new_obj->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
836 
837  $new_obj->setViewMode($this->getViewMode());
838  $new_obj->setMailToMembersType($this->getMailToMembersType());
839 
840  $new_obj->setCancellationEnd($this->getCancellationEnd());
841  $new_obj->setMinMembers($this->getMinMembers());
842  $new_obj->setWaitingListAutoFill($this->hasWaitingListAutoFill());
843 
844  $new_obj->update();
845 
846  // #13008 - Group Defined Fields
847  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
848  ilCourseDefinedFieldDefinition::_clone($this->getId(),$new_obj->getId());
849 
850  ilLoggerFactory::getLogger('grp')->debug('Starting add user');
851 
852  // Assign user as admin
853  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
854  $part = ilGroupParticipants::_getInstanceByObjId($new_obj->getId());
855  $part->add($ilUser->getId(),IL_GRP_ADMIN);
856  $part->updateNotification($ilUser->getId(),$ilSetting->get('mail_grp_admin_notification', true));
857 
858  // Copy learning progress settings
859  include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
860  $obj_settings = new ilLPObjSettings($this->getId());
861  $obj_settings->cloneSettings($new_obj->getId());
862  unset($obj_settings);
863 
864  // clone icons
865  $new_obj->saveIcons($this->getBigIconPath(),
866  $this->getSmallIconPath(),
867  $this->getTinyIconPath());
868 
869  return $new_obj;
870  }
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
getBigIconPath()
Get path for big icon.
getLatitude()
Get Latitude.
getTinyIconPath()
Get path for tiny icon.
getViewMode()
Get container view mode.
getRegistrationStart()
get registration start
static _clone($a_source_id, $a_target_id)
Clone fields.
getGroupType()
get group type
getId()
get object id public
getLocationZoom()
Get LocationZoom.
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getSmallIconPath()
Get path for small icon.
getPassword()
get password
static generateCode()
Generate new registration key.
isRegistrationAccessCodeEnabled()
Check if access code is enabled.
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
global $ilDB
static getLogger($a_component_id)
Get component logger.
readGroupStatus()
get group status, redundant method because 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 624 of file class.ilObjGroup.php.

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

625  {
626  global $ilDB,$ilAppEventHandler;
627 
628  if(!parent::create())
629  {
630  return false;
631  }
632 
633  $query = "INSERT INTO grp_settings (obj_id,information,grp_type,registration_type,registration_enabled,".
634  "registration_unlimited,registration_start,registration_end,registration_password,registration_mem_limit,".
635  "registration_max_members,waiting_list,latitude,longitude,location_zoom,enablemap,reg_ac_enabled,reg_ac,view_mode,mail_members_type,".
636  "leave_end,registration_min_members,auto_wait) ".
637  "VALUES(".
638  $ilDB->quote($this->getId() ,'integer').", ".
639  $ilDB->quote($this->getInformation() ,'text').", ".
640  $ilDB->quote((int) $this->getGroupType() ,'integer').", ".
641  $ilDB->quote($this->getRegistrationType() ,'integer').", ".
642  $ilDB->quote(($this->isRegistrationEnabled() ? 1 : 0) ,'integer').", ".
643  $ilDB->quote(($this->isRegistrationUnlimited() ? 1 : 0) ,'integer').", ".
644  $ilDB->quote($this->getRegistrationStart()->get(IL_CAL_DATETIME,'') ,'timestamp').", ".
645  $ilDB->quote($this->getRegistrationEnd()->get(IL_CAL_DATETIME,'') ,'timestamp').", ".
646  $ilDB->quote($this->getPassword() ,'text').", ".
647  $ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
648  $ilDB->quote($this->getMaxMembers() ,'integer').", ".
649  $ilDB->quote($this->isWaitingListEnabled() ? 1 : 0 ,'integer').", ".
650  $ilDB->quote($this->getLatitude() ,'text').", ".
651  $ilDB->quote($this->getLongitude() ,'text').", ".
652  $ilDB->quote($this->getLocationZoom() ,'integer').", ".
653  $ilDB->quote((int) $this->getEnableGroupMap() ,'integer').", ".
654  $ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
655  $ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
656  $ilDB->quote($this->getViewMode(false),'integer').', '.
657  $ilDB->quote($this->getMailToMembersType(),'integer').', '.
658  $ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer').', '.
659  $ilDB->quote($this->getMinMembers(),'integer').', '.
660  $ilDB->quote($this->hasWaitingListAutoFill(),'integer').' '.
661  ")";
662  $res = $ilDB->manipulate($query);
663 
664  $ilAppEventHandler->raise('Modules/Group',
665  'create',
666  array('object' => $this,
667  'obj_id' => $this->getId(),
668  'appointments' => $this->prepareAppointments('create')));
669 
670  return $this->getId();
671  }
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
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
getLocationZoom()
Get LocationZoom.
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
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 728 of file class.ilObjGroup.php.

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

729  {
730  global $ilDB,$ilAppEventHandler;
731 
732  // always call parent delete function first!!
733  if (!parent::delete())
734  {
735  return false;
736  }
737 
738  $query = "DELETE FROM grp_settings ".
739  "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer');
740  $res = $ilDB->manipulate($query);
741 
742  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
744 
745  $ilAppEventHandler->raise('Modules/Group',
746  'delete',
747  array('object' => $this,
748  'obj_id' => $this->getId(),
749  'appointments' => $this->prepareAppointments('delete')));
750 
751 
752  return true;
753  }
static _deleteAllEntries($a_obj_id)
Delete all entries Normally called for course deletion.
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
global $ilDB
+ Here is the call graph for this function:

◆ deleteExportFiles()

ilObjGroup::deleteExportFiles (   $a_files)

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

References $file, and __initFileObject().

1634  {
1635  $this->__initFileObject();
1636 
1637  foreach($a_files as $file)
1638  {
1639  $this->file_obj->deleteFile($file);
1640  }
1641  return true;
1642  }
print $file
+ Here is the call graph for this function:

◆ downloadExportFile()

ilObjGroup::downloadExportFile (   $file)

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

References $file, __initFileObject(), and ilUtil\deliverFile().

1645  {
1646  $this->__initFileObject();
1647 
1648  if($abs_name = $this->file_obj->getExportFile($file))
1649  {
1650  ilUtil::deliverFile($abs_name,$file);
1651  // Not reached
1652  }
1653  return false;
1654  }
print $file
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ enableMembershipLimitation()

ilObjGroup::enableMembershipLimitation (   $a_status)

enable max member limitation

public

Parameters
boolstatus
Returns

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

Referenced by read().

333  {
334  $this->reg_membership_limitation = $a_status;
335  }
+ 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 539 of file class.ilObjGroup.php.

Referenced by read().

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

◆ enableUnlimitedRegistration()

ilObjGroup::enableUnlimitedRegistration (   $a_status)

enable unlimited registration

public

Parameters
bool
Returns

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

Referenced by read().

241  {
242  $this->reg_unlimited = $a_status;
243  }
+ Here is the caller graph for this function:

◆ enableWaitingList()

ilObjGroup::enableWaitingList (   $a_status)

enable waiting list

public

Parameters
bool
Returns

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

Referenced by read().

400  {
401  $this->waiting_list = $a_status;
402  }
+ Here is the caller graph for this function:

◆ exportXML()

ilObjGroup::exportXML ( )

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

References __initFileObject(), and ilObject\getId().

1612  {
1613  include_once 'Modules/Group/classes/class.ilGroupXMLWriter.php';
1614 
1615  $xml_writer = new ilGroupXMLWriter($this);
1616  $xml_writer->start();
1617 
1618  $xml = $xml_writer->getXML();
1619 
1620  $name = time().'__'.$this->ilias->getSetting('inst_id').'__grp_'.$this->getId();
1621 
1622  $this->__initFileObject();
1623 
1624  $this->file_obj->addGroupDirectory();
1625  $this->file_obj->addDirectory($name);
1626  $this->file_obj->writeToFile($xml,$name.'/'.$name.'.xml');
1627  $this->file_obj->zipFile($name,$name.'.zip');
1628  $this->file_obj->deleteDirectory($name);
1629 
1630  return true;
1631  }
getId()
get object id public
redirection script todo: (a better solution should control the processing via a xml file) ...
XML writer class.
+ Here is the call graph for this function:

◆ findGroupsWithNotEnoughMembers()

static ilObjGroup::findGroupsWithNotEnoughMembers ( )
static

Minimum members check $ilDB $ilDB.

Returns
array

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

References $GLOBALS, $ilDB, $res, $row, and ilObject\_getAllReferences().

Referenced by ilMembershipCronMinMembers\getGroups().

2165  {
2166  global $ilDB;
2167 
2168  $res = array();
2169 
2170  $now = date("Y-m-d H:i:s");
2171 
2172  include_once "Modules/Group/classes/class.ilGroupParticipants.php";
2173 
2174  $set = $ilDB->query("SELECT obj_id, registration_min_members".
2175  " FROM grp_settings".
2176  " WHERE registration_min_members > ".$ilDB->quote(0, "integer").
2177  " AND registration_mem_limit = ".$ilDB->quote(1, "integer"). // #17206
2178  " AND ((leave_end IS NOT NULL".
2179  " AND leave_end < ".$ilDB->quote($now, "text").")".
2180  " OR (leave_end IS NULL".
2181  " AND registration_end IS NOT NULL".
2182  " AND registration_end < ".$ilDB->quote($now, "text")."))"
2183  // :TODO: there is no group start ?!
2184  /* " AND (grp_start IS NULL OR grp_start > ".$ilDB->quote($now, "integer").")" */);
2185  while($row = $ilDB->fetchAssoc($set))
2186  {
2187  $refs = ilObject::_getAllReferences($row['obj_id']);
2188  $ref = end($refs);
2189 
2190  if($GLOBALS['tree']->isDeleted($ref))
2191  {
2192  continue;
2193  }
2194 
2195  $part = new ilGroupParticipants($row["obj_id"]);
2196  $reci = $part->getNotificationRecipients();
2197  if(sizeof($reci))
2198  {
2199  $missing = (int)$row["registration_min_members"]-$part->getCountMembers();
2200  if($missing > 0)
2201  {
2202  $res[$row["obj_id"]] = array($missing, $reci);
2203  }
2204  }
2205  }
2206 
2207  return $res;
2208  }
static _getAllReferences($a_id)
get all reference ids of object
global $ilDB
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCancellationEnd()

ilObjGroup::getCancellationEnd ( )

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

References $leave_end.

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

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

◆ getCountMembers()

ilObjGroup::getCountMembers ( )

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

References getGroupMemberIds().

1115  {
1116  return count($this->getGroupMemberIds());
1117  }
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 962 of file class.ilObjGroup.php.

References getLocalGroupRoles().

Referenced by cloneAutoGeneratedRoles().

963  {
964  $local_group_Roles = $this->getLocalGroupRoles();
965 
966  return $local_group_Roles["il_grp_admin_".$this->getRefId()];
967  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
+ 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 1154 of file class.ilObjGroup.php.

References ilObject\getRefId().

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

1155  {
1156  global $rbacadmin, $rbacreview;
1157 
1158  if (strlen($a_grp_id) > 0)
1159  {
1160  $grp_id = $a_grp_id;
1161  }
1162  else
1163  {
1164  $grp_id = $this->getRefId();
1165  }
1166 
1167  $role_arr = $rbacreview->getRolesOfRoleFolder($grp_id);
1168 
1169  foreach ($role_arr as $role_id)
1170  {
1171  $role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
1172 
1173  $grp_Member ="il_grp_member_".$grp_id;
1174  $grp_Admin ="il_grp_admin_".$grp_id;
1175 
1176  if (strcmp($role_Obj->getTitle(), $grp_Member) == 0 )
1177  {
1178  $arr_grpDefaultRoles["grp_member_role"] = $role_Obj->getId();
1179  }
1180 
1181  if (strcmp($role_Obj->getTitle(), $grp_Admin) == 0)
1182  {
1183  $arr_grpDefaultRoles["grp_admin_role"] = $role_Obj->getId();
1184  }
1185  }
1186 
1187  return $arr_grpDefaultRoles;
1188  }
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 951 of file class.ilObjGroup.php.

References getLocalGroupRoles().

Referenced by cloneAutoGeneratedRoles().

952  {
953  $local_group_Roles = $this->getLocalGroupRoles();
954 
955  return $local_group_Roles["il_grp_member_".$this->getRefId()];
956  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
+ 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 501 of file class.ilObjGroup.php.

References $enablemap.

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

502  {
503  return (bool) $this->enablemap;
504  }
+ 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 1125 of file class.ilObjGroup.php.

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

Referenced by leaveGroup().

1126  {
1127  global $rbacreview;
1128 
1129  if (!empty($a_grpId))
1130  {
1131  $grp_id = $a_grpId;
1132  }
1133  else
1134  {
1135  $grp_id = $this->getRefId();
1136  }
1137 
1138  $usr_arr = array();
1139  $roles = $this->getDefaultGroupRoles($this->getRefId());
1140 
1141  foreach ($rbacreview->assignedUsers($this->getDefaultAdminRole()) as $member_id)
1142  {
1143  array_push($usr_arr,$member_id);
1144  }
1145 
1146  return $usr_arr;
1147  }
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
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 1084 of file class.ilObjGroup.php.

References $ilBench, $ilDB, $r, $row, DB_FETCHMODE_OBJECT, and ilUtil\quoteArray().

1085  {
1086  global $rbacadmin, $rbacreview, $ilBench, $ilDB;
1087 
1088  $usr_arr= array();
1089 
1090  $q = "SELECT login,firstname,lastname,title,usr_id,last_login ".
1091  "FROM usr_data ".
1092  "WHERE usr_id IN (".implode(',',ilUtil::quoteArray($a_mem_ids)).") ";
1093 
1094  if (is_numeric($active) && $active > -1)
1095  $q .= "AND active = '$active'";
1096 
1097  $q .= 'ORDER BY lastname,firstname';
1098 
1099  $r = $ilDB->query($q);
1100 
1101  while($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
1102  {
1103  $mem_arr[] = array("id" => $row->usr_id,
1104  "login" => $row->login,
1105  "firstname" => $row->firstname,
1106  "lastname" => $row->lastname,
1107  "last_login" => $row->last_login
1108  );
1109  }
1110 
1111  return $mem_arr ? $mem_arr : array();
1112  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
$r
Definition: example_031.php:79
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 1056 of file class.ilObjGroup.php.

References getLocalGroupRoles().

Referenced by getCountMembers(), and leaveGroup().

1057  {
1058  global $rbacadmin, $rbacreview;
1059 
1060  $usr_arr= array();
1061 
1062  $rol = $this->getLocalGroupRoles();
1063 
1064  foreach ($rol as $value)
1065  {
1066  foreach ($rbacreview->assignedUsers($value) as $member_id)
1067  {
1068  array_push($usr_arr,$member_id);
1069  }
1070  }
1071 
1072  $mem_arr = array_unique($usr_arr);
1073 
1074  return $mem_arr ? $mem_arr : array();
1075  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
+ 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 1482 of file class.ilObjGroup.php.

1483  {
1484  return $this->group_status;
1485  }

◆ getGroupType()

ilObjGroup::getGroupType ( )

get group type

public

Returns
int group type

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

References $group_type.

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

175  {
176  return $this->group_type;
177  }
+ 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 1233 of file class.ilObjGroup.php.

References $res, $row, and DB_FETCHMODE_ASSOC.

Referenced by initGroupStatus(), and updateGroupType().

1234  {
1235  $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_closed'";
1236  $res = $this->ilias->db->query($q);
1237  $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1238 
1239  return $row["obj_id"];
1240  }
redirection script todo: (a better solution should control the processing via a xml file) ...
const DB_FETCHMODE_ASSOC
Definition: class.ilDB.php:10
+ 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 1247 of file class.ilObjGroup.php.

References $res, $row, and DB_FETCHMODE_ASSOC.

Referenced by initGroupStatus(), and updateGroupType().

1248  {
1249  $q = "SELECT obj_id FROM object_data WHERE type='rolt' AND title='il_grp_status_open'";
1250  $res = $this->ilias->db->query($q);
1251  $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1252 
1253  return $row["obj_id"];
1254  }
redirection script todo: (a better solution should control the processing via a xml file) ...
const DB_FETCHMODE_ASSOC
Definition: class.ilDB.php:10
+ Here is the caller graph for this function:

◆ getInformation()

ilObjGroup::getInformation ( )

get Information

public

Parameters

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

References $information.

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

153  {
154  return $this->information;
155  }
+ Here is the caller graph for this function:

◆ getLatitude()

ilObjGroup::getLatitude ( )

Get Latitude.

Returns
string Latitude

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

References $latitude.

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

442  {
443  return $this->latitude;
444  }
+ 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 1196 of file class.ilObjGroup.php.

References ilObjRole\_getTranslation(), and ilObject\getRefId().

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

1197  {
1198  global $rbacadmin,$rbacreview;
1199 
1200  if (empty($this->local_roles))
1201  {
1202  $this->local_roles = array();
1203  $role_arr = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1204 
1205  foreach ($role_arr as $role_id)
1206  {
1207  if ($rbacreview->isAssignable($role_id,$this->getRefId()) == true)
1208  {
1209  $role_Obj =& $this->ilias->obj_factory->getInstanceByObjId($role_id);
1210 
1211  if ($a_translate)
1212  {
1213  $role_name = ilObjRole::_getTranslation($role_Obj->getTitle());
1214  }
1215  else
1216  {
1217  $role_name = $role_Obj->getTitle();
1218  }
1219 
1220  $this->local_roles[$role_name] = $role_Obj->getId();
1221  }
1222  }
1223  }
1224 
1225  return $this->local_roles;
1226  }
_getTranslation($a_role_title)
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:

◆ getLocationZoom()

ilObjGroup::getLocationZoom ( )

Get LocationZoom.

Returns
int LocationZoom

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

References $locationzoom.

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

482  {
483  return $this->locationzoom;
484  }
+ Here is the caller graph for this function:

◆ getLongitude()

ilObjGroup::getLongitude ( )

Get Longitude.

Returns
string Longitude

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

References $longitude.

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

462  {
463  return $this->longitude;
464  }
+ Here is the caller graph for this function:

◆ getMailToMembersType()

ilObjGroup::getMailToMembersType ( )

Get mail to members type.

Returns
int

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

References $mail_members.

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

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

◆ getMaxMembers()

ilObjGroup::getMaxMembers ( )

get max members

public

Returns

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

References $reg_max_members.

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

388  {
389  return $this->reg_max_members;
390  }
+ 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 1519 of file class.ilObjGroup.php.

References $ilBench, and getLocalGroupRoles().

Referenced by leave().

1520  {
1521  global $rbacadmin, $rbacreview,$ilBench;
1522 
1523  $ilBench->start("Group", "getMemberRoles");
1524 
1525  $arr_assignedRoles = array();
1526 
1527  $arr_assignedRoles = array_intersect($rbacreview->assignedRoles($a_user_id),$this->getLocalGroupRoles());
1528 
1529  $ilBench->stop("Group", "getMemberRoles");
1530 
1531  return $arr_assignedRoles;
1532  }
getLocalGroupRoles($a_translate=false)
get ALL local roles of group, also those created and defined afterwards only fetch data once from dat...
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 1984 of file class.ilObjGroup.php.

References $members_obj, and initParticipants().

Referenced by handleAutoFill().

1985  {
1986  // #17886
1987  if(!$this->members_obj instanceof ilGroupParticipants)
1988  {
1989  $this->initParticipants();
1990  }
1991  return $this->members_obj;
1992  }
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 1906 of file class.ilObjGroup.php.

Referenced by appendMessage().

1907  {
1908  return $this->message;
1909  }
+ Here is the caller graph for this function:

◆ getMinMembers()

ilObjGroup::getMinMembers ( )

get min members

public

Returns

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

References $reg_min_members.

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

366  {
367  return $this->reg_min_members;
368  }
+ Here is the caller graph for this function:

◆ getPassword()

ilObjGroup::getPassword ( )

get password

public

Returns
string password

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

References $reg_password.

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

321  {
322  return $this->reg_password;
323  }
+ Here is the caller graph for this function:

◆ getRegistrationAccessCode()

ilObjGroup::getRegistrationAccessCode ( )

get access code

Returns

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

References $reg_access_code.

Referenced by create(), and update().

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

◆ getRegistrationEnd()

ilObjGroup::getRegistrationEnd ( )

get registration end

public

Returns
int registration end

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

References IL_CAL_DATETIME.

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

299  {
300  return $this->reg_end ? $this->reg_end : $this->reg_end = new ilDateTime(date('Y-m-d').' 16:00:00',IL_CAL_DATETIME);
301  }
const IL_CAL_DATETIME
Date and time handling
+ Here is the caller graph for this function:

◆ getRegistrationStart()

ilObjGroup::getRegistrationStart ( )

get registration start

public

Returns
int registration start

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

References IL_CAL_DATETIME.

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

275  {
276  return $this->reg_start ? $this->reg_start : $this->reg_start = new ilDateTime(date('Y-m-d').' 08:00:00',IL_CAL_DATETIME);
277  }
const IL_CAL_DATETIME
Date and time handling
+ Here is the caller graph for this function:

◆ getRegistrationType()

ilObjGroup::getRegistrationType ( )

get registration type

public

Returns
int registration type

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

References $reg_type.

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

218  {
219  return $this->reg_type;
220  }
+ Here is the caller graph for this function:

◆ getViewMode()

ilObjGroup::getViewMode (   $a_translate_inherit = true)

get view mode

public

Parameters
bool$a_translate_inherit
Returns
int view mode

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

References ilContainer\VIEW_DEFAULT.

1789  {
1790  $view = (int) $this->view_mode;
1791 
1792  if(!$view)
1793  {
1794  $view = ilContainer::VIEW_DEFAULT;
1795  }
1796 
1797  if($a_translate_inherit)
1798  {
1799  $view = self::translateViewMode($this->id, $view, $this->ref_id);
1800  }
1801 
1802  return $view;
1803  }

◆ handleAutoFill()

ilObjGroup::handleAutoFill ( )

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

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

2097  {
2098  if($this->isWaitingListEnabled() &&
2099  $this->hasWaitingListAutoFill())
2100  {
2101  $max = $this->getMaxMembers();
2103  if($max > $now)
2104  {
2105  // see assignFromWaitingListObject()
2106  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2107  $waiting_list = new ilGroupWaitingList($this->getId());
2108 
2109  foreach($waiting_list->getUserIds() as $user_id)
2110  {
2111  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
2112  {
2113  continue;
2114  }
2115  if($this->getMembersObject()->isAssigned($user_id))
2116  {
2117  continue;
2118  }
2119  $this->getMembersObject()->add($user_id,IL_GRP_MEMBER); // #18213
2120  $this->getMembersObject()->sendNotification($this->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id);
2121  $waiting_list->removeFromList($user_id);
2122 
2123  $now++;
2124  if($now >= $max)
2125  {
2126  break;
2127  }
2128  }
2129  }
2130  }
2131  }
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.
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 421 of file class.ilObjGroup.php.

References $auto_fill_from_waiting.

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

422  {
423  return (bool)$this->auto_fill_from_waiting;
424  }
+ 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 1563 of file class.ilObjGroup.php.

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

1564  {
1565  include_once './Services/AccessControl/classes/class.ilObjRole.php';
1567  'il_grp_admin_'.$this->getRefId(),
1568  "Groupadmin group obj_no.".$this->getId(),
1569  'il_grp_admin',
1570  $this->getRefId()
1571  );
1572  $this->m_roleAdminId = $role->getId();
1573 
1575  'il_grp_member_'.$this->getRefId(),
1576  "Groupmember of group obj_no.".$this->getId(),
1577  'il_grp_member',
1578  $this->getRefId()
1579  );
1580  $this->m_roleMemberId = $role->getId();
1581 
1582  return array();
1583  }
static createDefaultRole($a_title, $a_description, $a_tpl_name, $a_ref_id)
getId()
get object id public
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

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

References $template_id, getGrpStatusClosedTemplateId(), getGrpStatusOpenTemplateId(), ilObject\getRefId(), GRP_TYPE_CLOSED, and GRP_TYPE_PUBLIC.

1388  {
1389  global $rbacadmin, $rbacreview, $rbacsystem;
1390 
1391  //define all relevant roles that rights are needed to be changed
1392  $arr_parentRoles = $rbacreview->getParentRoleIds($this->getRefId());
1393 
1394  $real_local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId(),false);
1395  $arr_relevantParentRoleIds = array_diff(array_keys($arr_parentRoles),$real_local_roles);
1396 
1397  //group status open (aka public) or group status closed
1398  if ($a_grpStatus == GRP_TYPE_PUBLIC || $a_grpStatus == GRP_TYPE_CLOSED)
1399  {
1400  if ($a_grpStatus == GRP_TYPE_PUBLIC)
1401  {
1403  }
1404  else
1405  {
1407  }
1408  //get defined operations from template
1409  $template_ops = $rbacreview->getOperationsOfRole($template_id, 'grp', ROLE_FOLDER_ID);
1410 
1411  foreach ($arr_relevantParentRoleIds as $parentRole)
1412  {
1413  if ($rbacreview->isProtected($arr_parentRoles[$parentRole]['parent'],$parentRole))
1414  {
1415  continue;
1416  }
1417 
1418  $granted_permissions = array();
1419 
1420  // Delete the linked role for the parent role
1421  // (just in case if it already exists).
1422 
1423  // Added additional check, since this operation is very dangerous.
1424  // If there is no role folder ALL parent roles are deleted.
1425 
1426  // @todo refactor rolf
1427  $rbacadmin->deleteLocalRole($parentRole,$this->getRefId());
1428 
1429  // Grant permissions on the group object for
1430  // the parent role. In the foreach loop we
1431  // compute the intersection of the role
1432  // template il_grp_status_open/_closed and the
1433  // permission template of the parent role.
1434  $current_ops = $rbacreview->getRoleOperationsOnObject($parentRole, $this->getRefId());
1435  $rbacadmin->revokePermission($this->getRefId(), $parentRole);
1436  foreach ($template_ops as $template_op)
1437  {
1438  if (in_array($template_op,$current_ops))
1439  {
1440  array_push($granted_permissions,$template_op);
1441  }
1442  }
1443  if (!empty($granted_permissions))
1444  {
1445  $rbacadmin->grantPermission($parentRole, $granted_permissions, $this->getRefId());
1446  }
1447 
1448  // Create a linked role for the parent role and
1449  // initialize it with the intersection of
1450  // il_grp_status_open/_closed and the permission
1451  // template of the parent role
1452 
1453  $rbacadmin->copyRolePermissionIntersection(
1454  $template_id, ROLE_FOLDER_ID,
1455  $parentRole, $arr_parentRoles[$parentRole]['parent'],
1456  $this->getRefId(), $parentRole
1457  );
1458  $rbacadmin->assignRoleToFolder($parentRole,$this->getRefId(),"false");
1459  }//END foreach
1460  }
1461  }
$template_id
Definition: example_062.php:89
const GRP_TYPE_PUBLIC
getGrpStatusOpenTemplateId()
get group status open template public
getGrpStatusClosedTemplateId()
get group status closed template public
const GRP_TYPE_CLOSED
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ initParticipants()

ilObjGroup::initParticipants ( )
protected

init participants object

protected

Returns

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

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

Referenced by getMembersObject(), and read().

1974  {
1975  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
1976  $this->members_obj = ilGroupParticipants::_getInstanceByObjId($this->getId());
1977  }
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 1540 of file class.ilObjGroup.php.

References getDefaultGroupRoles().

Referenced by leaveGroup().

1541  {
1542  global $rbacreview;
1543 
1544  $grp_Roles = $this->getDefaultGroupRoles();
1545 
1546  if (in_array($a_userId,$rbacreview->assignedUsers($grp_Roles["grp_admin_role"])))
1547  {
1548  return true;
1549  }
1550  else
1551  {
1552  return false;
1553  }
1554  }
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:

◆ isGroupTypeModified()

ilObjGroup::isGroupTypeModified (   $a_old_type)

check if group type is modified

public

Parameters

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

References $group_type, getGroupType(), GRP_TYPE_UNKNOWN, and readGroupStatus().

187  {
188  if($a_old_type == GRP_TYPE_UNKNOWN)
189  {
190  $group_type = $this->readGroupStatus();
191  }
192  else
193  {
194  $group_type = $a_old_type;
195  }
196  return $group_type != $this->getGroupType();
197  }
const GRP_TYPE_UNKNOWN
getGroupType()
get group type
readGroupStatus()
get group status, redundant method because public
+ Here is the call graph for this function:

◆ isMembershipLimited()

ilObjGroup::isMembershipLimited ( )

is max member limited

public

Returns

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

References $reg_membership_limitation.

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

344  {
345  return (bool) $this->reg_membership_limitation;
346  }
+ Here is the caller graph for this function:

◆ isRegistrationAccessCodeEnabled()

ilObjGroup::isRegistrationAccessCodeEnabled ( )

Check if access code is enabled.

Returns

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

References $reg_access_code_enabled.

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

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

◆ isRegistrationEnabled()

ilObjGroup::isRegistrationEnabled ( )

is registration enabled

public

Returns
bool

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

References getRegistrationType(), and GRP_REGISTRATION_DEACTIVATED.

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

229  {
231  }
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 251 of file class.ilObjGroup.php.

References $reg_unlimited.

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

252  {
253  return $this->reg_unlimited;
254  }
+ Here is the caller graph for this function:

◆ isWaitingListEnabled()

ilObjGroup::isWaitingListEnabled ( )

is waiting list enabled

public

Parameters

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

References $waiting_list.

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

412  {
413  return $this->waiting_list;
414  }
+ 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 928 of file class.ilObjGroup.php.

Referenced by addMember().

929  {
930  global $rbacadmin;
931 
932  if (is_array($a_mem_role))
933  {
934  foreach ($a_mem_role as $role)
935  {
936  $rbacadmin->assignUser($role,$a_user_id, false);
937  }
938  }
939  else
940  {
941  $rbacadmin->assignUser($a_mem_role,$a_user_id, false);
942  }
943 
944  return true;
945  }
+ Here is the caller graph for this function:

◆ leave()

ilObjGroup::leave (   $a_user_id)

deassign member from group role private

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

References getMemberRoles().

Referenced by leaveGroup().

1030  {
1031  global $rbacadmin;
1032 
1033  $arr_groupRoles = $this->getMemberRoles($a_user_id);
1034 
1035  if (is_array($arr_groupRoles))
1036  {
1037  foreach ($arr_groupRoles as $groupRole)
1038  {
1039  $rbacadmin->deassignUser($groupRole, $a_user_id);
1040  }
1041  }
1042  else
1043  {
1044  $rbacadmin->deassignUser($arr_groupRoles, $a_user_id);
1045  }
1046 
1047  return true;
1048  }
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 998 of file class.ilObjGroup.php.

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

999  {
1000  global $rbacadmin, $rbacreview;
1001 
1002  $member_ids = $this->getGroupMemberIds();
1003 
1004  if (count($member_ids) <= 1 || !in_array($this->ilias->account->getId(), $member_ids))
1005  {
1006  return 2;
1007  }
1008  else
1009  {
1010  if (!$this->isAdmin($this->ilias->account->getId()))
1011  {
1012  $this->leave($this->ilias->account->getId());
1013  $member = new ilObjUser($this->ilias->account->getId());
1014  $member->dropDesktopItem($this->getRefId(), "grp");
1015 
1016  return 0;
1017  }
1018  else if (count($this->getGroupAdminIds()) == 1)
1019  {
1020  return 1;
1021  }
1022  }
1023  }
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 1262 of file class.ilObjGroup.php.

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

Referenced by ilRbacAdmin\adjustMovedObjectPermissions().

1263  {
1264  global $ilDB;
1265 
1266  $type = self::lookupGroupTye($a_obj_id);
1267  if($type == GRP_TYPE_CLOSED)
1268  {
1269  $query = 'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote('rolt','text').' AND title = '.$ilDB->quote('il_grp_status_closed','text');
1270  }
1271  else
1272  {
1273  $query = 'SELECT obj_id FROM object_data WHERE type = '.$ilDB->quote('rolt','text').' AND title = '.$ilDB->quote('il_grp_status_open','text');
1274  }
1275  $res = $ilDB->query($query);
1276  $row = $res->fetchRow(DB_FETCHMODE_ASSOC);
1277 
1278  return isset($row['obj_id']) ? $row['obj_id'] : 0;
1279  }
const GRP_TYPE_CLOSED
const DB_FETCHMODE_ASSOC
Definition: class.ilDB.php:10
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 118 of file class.ilObjGroup.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and GRP_TYPE_UNKNOWN.

Referenced by ilObjRole\createPermissionIntersection().

119  {
120  global $ilDB;
121 
122  $query = "SELECT grp_type FROM grp_settings ".
123  "WHERE obj_id = ".$ilDB->quote($a_id,'integer');
124  $res = $ilDB->query($query);
125  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
126  {
127  return $row->grp_type;
128  }
129  return GRP_TYPE_UNKNOWN;
130  }
const GRP_TYPE_UNKNOWN
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
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 1998 of file class.ilObjGroup.php.

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

Referenced by ilMembershipRegistrationCodeUtils\lookupObjectsByCode().

1999  {
2000  global $ilDB;
2001 
2002  $query = "SELECT obj_id FROM grp_settings ".
2003  "WHERE reg_ac_enabled = ".$ilDB->quote(1,'integer')." ".
2004  "AND reg_ac = ".$ilDB->quote($a_code,'text');
2005  $res = $ilDB->query($query);
2006 
2007  $obj_ids = array();
2008  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
2009  {
2010  $obj_ids[] = $row->obj_id;
2011  }
2012  return $obj_ids;
2013  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
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 1818 of file class.ilObjGroup.php.

References $ilDB, $query, $res, $row, $view_mode, and DB_FETCHMODE_OBJECT.

1819  {
1820  global $ilDB;
1821 
1822  $query = 'SELECT view_mode FROM grp_settings '.
1823  'WHERE obj_id = '.$ilDB->quote($a_obj_id,'integer');
1824  $res = $ilDB->query($query);
1825 
1826  $view_mode = NULL;
1827  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
1828  {
1829  $view_mode = $row->view_mode;
1830  }
1831  return self::translateViewMode($a_obj_id,$view_mode);
1832  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

◆ mayLeave()

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

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

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

Referenced by ilObjGroupAccess\_checkAccess().

2134  {
2135  global $ilUser, $ilDB;
2136 
2137  if(!$a_user_id)
2138  {
2139  $a_user_id = $ilUser->getId();
2140  }
2141 
2142  $set = $ilDB->query("SELECT leave_end".
2143  " FROM grp_settings".
2144  " WHERE obj_id = ".$ilDB->quote($a_group_id, "integer"));
2145  $row = $ilDB->fetchAssoc($set);
2146  if($row && $row["leave_end"])
2147  {
2148  // timestamp to date
2149  $limit = date("Ymd", $row["leave_end"]);
2150  if($limit < date("Ymd"))
2151  {
2152  $a_date = new ilDate(date("Y-m-d", $row["leave_end"]), IL_CAL_DATE);
2153  return false;
2154  }
2155  }
2156  return true;
2157  }
Class for single dates.
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
global $ilDB
+ Here is the caller graph for this function:

◆ notify()

ilObjGroup::notify (   $a_event,
  $a_ref_id,
  $a_parent_non_rbac_id,
  $a_node_id,
  $a_params = 0 
)

notifys an object about an event occured Based on the event happend, each object may decide how it reacts.

public

Parameters
stringevent
integerreference id of object where the event occured
arraypasses optional parameters if required
Returns
boolean

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

1596  {
1597  global $tree;
1598 
1599  $parent_id = (int) $tree->getParentId($a_node_id);
1600 
1601  if ($parent_id != 0)
1602  {
1603  $obj_data =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
1604  $obj_data->notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$parent_id,$a_params);
1605  }
1606 
1607  return true;
1608  }
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ prepareAppointments()

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

Prepare calendar appointments.

protected

Parameters
stringmode UPDATE|CREATE|DELETE
Returns

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

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

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

1931  {
1932  include_once('./Services/Calendar/classes/class.ilCalendarAppointmentTemplate.php');
1933 
1934  switch($a_mode)
1935  {
1936  case 'create':
1937  case 'update':
1938  if($this->isRegistrationUnlimited())
1939  {
1940  return array();
1941  }
1942  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_START);
1943  $app->setTitle($this->getTitle());
1944  $app->setSubtitle('grp_cal_reg_start');
1945  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1946  $app->setDescription($this->getLongDescription());
1947  $app->setStart($this->getRegistrationStart());
1948  $apps[] = $app;
1949 
1950  $app = new ilCalendarAppointmentTemplate(self::CAL_REG_END);
1951  $app->setTitle($this->getTitle());
1952  $app->setSubtitle('grp_cal_reg_end');
1953  $app->setTranslationType(IL_CAL_TRANSLATION_SYSTEM);
1954  $app->setDescription($this->getLongDescription());
1955  $app->setStart($this->getRegistrationEnd());
1956  $apps[] = $app;
1957 
1958  return $apps;
1959 
1960  case 'delete':
1961  // Nothing to do: The category and all assigned appointments will be deleted.
1962  return array();
1963  }
1964  }
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
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 759 of file class.ilObjGroup.php.

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

760  {
761  global $ilDB;
762 
763  parent::read();
764 
765  $query = "SELECT * FROM grp_settings ".
766  "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer');
767 
768  $res = $ilDB->query($query);
769  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
770  {
771  $this->setInformation($row->information);
772  $this->setGroupType($row->grp_type);
773  $this->setRegistrationType($row->registration_type);
774  $this->enableUnlimitedRegistration($row->registration_unlimited);
775  $this->setRegistrationStart(new ilDateTime($row->registration_start,IL_CAL_DATETIME));
776  $this->setRegistrationEnd(new ilDateTime($row->registration_end,IL_CAL_DATETIME));
777  $this->setPassword($row->registration_password);
778  $this->enableMembershipLimitation((bool) $row->registration_mem_limit);
779  $this->setMaxMembers($row->registration_max_members);
780  $this->enableWaitingList($row->waiting_list);
781  $this->setLatitude($row->latitude);
782  $this->setLongitude($row->longitude);
783  $this->setLocationZoom($row->location_zoom);
784  $this->setEnableGroupMap($row->enablemap);
785  $this->enableRegistrationAccessCode($row->reg_ac_enabled);
786  $this->setRegistrationAccessCode($row->reg_ac);
787  $this->setViewMode($row->view_mode);
788  $this->setMailToMembersType($row->mail_members_type);
789  $this->setCancellationEnd($row->leave_end ? new ilDate($row->leave_end, IL_CAL_UNIX) : null);
790  $this->setMinMembers($row->registration_min_members);
791  $this->setWaitingListAutoFill($row->auto_wait);
792  }
793  $this->initParticipants();
794 
795  // Inherit order type from parent course (if exists)
796  include_once('./Services/Container/classes/class.ilContainerSortingSettings.php');
798  }
setCancellationEnd(ilDate $a_value=null)
const IL_CAL_DATETIME
setWaitingListAutoFill($a_value)
setLongitude($a_longitude)
Set Longitude.
const IL_CAL_UNIX
enableUnlimitedRegistration($a_status)
enable unlimited registration
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
enableWaitingList($a_status)
enable waiting list
setLatitude($a_latitude)
Set Latitude.
Class for single dates.
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
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 1492 of file class.ilObjGroup.php.

References getDefaultGroupRoles(), ilObject\getRefId(), GRP_TYPE_CLOSED, and GRP_TYPE_PUBLIC.

Referenced by cloneObject(), and isGroupTypeModified().

1493  {
1494  global $rbacsystem,$rbacreview;
1495 
1496  $local_roles = $rbacreview->getRolesOfRoleFolder($this->getRefId());
1497 
1498  //get all relevant roles
1499  $arr_globalRoles = array_diff($local_roles, $this->getDefaultGroupRoles());
1500 
1501  //if one global role has no permission to join the group is officially closed !
1502  foreach ($arr_globalRoles as $globalRole)
1503  {
1504  if ($rbacsystem->checkPermission($this->getRefId(), $globalRole ,"join"))
1505  {
1506  return $this->group_status = GRP_TYPE_PUBLIC;
1507  }
1508  }
1509 
1510  return $this->group_status = GRP_TYPE_CLOSED;
1511  }
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:
+ Here is the caller 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 2021 of file class.ilObjGroup.php.

References $info, $waiting_list, ilDateTime\_after(), ilDateTime\_before(), ilGroupParticipants\_getInstanceByObjId(), ilObjGroupAccess\_usingRegistrationCode(), ilObject\getId(), getMaxMembers(), getRegistrationEnd(), getRegistrationStart(), ilObject\getTitle(), IL_CAL_UNIX, isMembershipLimited(), isRegistrationEnabled(), isRegistrationUnlimited(), isWaitingListEnabled(), and ilGroupMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

2022  {
2023  include_once './Services/Membership/exceptions/class.ilMembershipRegistrationException.php';
2024  include_once "./Modules/Group/classes/class.ilGroupParticipants.php";
2026 
2027  if($part->isAssigned($a_user_id))
2028  {
2029  return true;
2030  }
2031 
2032  if(!$a_force_registration)
2033  {
2034  // Availability
2035  if(!$this->isRegistrationEnabled())
2036  {
2037  include_once './Modules/Group/classes/class.ilObjGroupAccess.php';
2038 
2040  {
2041  throw new ilMembershipRegistrationException('Cant registrate to group '.$this->getId().
2042  ', group subscription is deactivated.', '456');
2043  }
2044  }
2045 
2046  // Time Limitation
2047  if(!$this->isRegistrationUnlimited())
2048  {
2049  $start = $this->getRegistrationStart();
2050  $end = $this->getRegistrationEnd();
2051  $time = new ilDateTime(time(),IL_CAL_UNIX);
2052 
2053  if( !(ilDateTime::_after($time, $start) and ilDateTime::_before($time,$end)) )
2054  {
2055  throw new ilMembershipRegistrationException('Cant registrate to group '.$this->getId().
2056  ', group is out of registration time.', '789');
2057  }
2058  }
2059 
2060  // Max members
2061  if($this->isMembershipLimited())
2062  {
2063  $free = max(0,$this->getMaxMembers() - $part->getCountMembers());
2064  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
2065  $waiting_list = new ilGroupWaitingList($this->getId());
2066  if($this->isWaitingListEnabled() and (!$free or $waiting_list->getCountUsers()))
2067  {
2068  $this->lng->loadLanguageModule("grp");
2069  $waiting_list->addToList($a_user_id);
2070 
2071  $info = sprintf($this->lng->txt('grp_added_to_list'),
2072  $this->getTitle(),
2073  $waiting_list->getPosition($a_user_id));
2074 
2075  include_once('./Modules/Group/classes/class.ilGroupParticipants.php');
2076  include_once('./Modules/Group/classes/class.ilGroupMembershipMailNotification.php');
2077  $participants = ilGroupParticipants::_getInstanceByObjId($this->getId());
2078  $participants->sendNotification(ilGroupMembershipMailNotification::TYPE_WAITING_LIST_MEMBER,$a_user_id);
2079 
2080  throw new ilMembershipRegistrationException($info, '124');
2081  }
2082 
2083  if(!$free or $waiting_list->getCountUsers())
2084  {
2085  throw new ilMembershipRegistrationException('Cant registrate to group '.$this->getId().
2086  ', membership is limited.', '123');
2087  }
2088  }
2089  }
2090 
2091  $part->add($a_user_id,$a_role);
2092  $part->sendNotification($part->TYPE_NOTIFICATION_REGISTRATION, $a_user_id);
2093  return true;
2094  }
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
$info
Definition: example_052.php:80
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.
isWaitingListEnabled()
is waiting list enabled
+ Here is the call graph for this function:

◆ setCancellationEnd()

ilObjGroup::setCancellationEnd ( ilDate  $a_value = null)

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

Referenced by read().

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

Referenced by read().

492  {
493  $this->enablemap = $a_enablemap;
494  }
+ 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 1470 of file class.ilObjGroup.php.

1471  {
1472  $this->group_status = $a_status;
1473  }

◆ setGroupType()

ilObjGroup::setGroupType (   $a_type)

set group type

public

Parameters
inttype

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

Referenced by read().

164  {
165  $this->group_type = $a_type;
166  }
+ Here is the caller graph for this function:

◆ setInformation()

ilObjGroup::setInformation (   $a_information)

set information

public

Parameters
stringinformation
Returns

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

Referenced by read().

141  {
142  $this->information = $a_information;
143  }
+ Here is the caller graph for this function:

◆ setLatitude()

ilObjGroup::setLatitude (   $a_latitude)

Set Latitude.

Parameters
string$a_latitudeLatitude

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

Referenced by read().

432  {
433  $this->latitude = $a_latitude;
434  }
+ Here is the caller graph for this function:

◆ setLocationZoom()

ilObjGroup::setLocationZoom (   $a_locationzoom)

Set LocationZoom.

Parameters
int$a_locationzoomLocationZoom

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

Referenced by read().

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

◆ setLongitude()

ilObjGroup::setLongitude (   $a_longitude)

Set Longitude.

Parameters
string$a_longitudeLongitude

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

Referenced by read().

452  {
453  $this->longitude = $a_longitude;
454  }
+ 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 549 of file class.ilObjGroup.php.

Referenced by read().

550  {
551  $this->mail_members = $a_type;
552  }
+ Here is the caller graph for this function:

◆ setMaxMembers()

ilObjGroup::setMaxMembers (   $a_max)

set max members

public

Parameters
intmax members

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

Referenced by read().

377  {
378  $this->reg_max_members = $a_max;
379  }
+ Here is the caller graph for this function:

◆ setMessage()

ilObjGroup::setMessage (   $a_message)

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

1911  {
1912  $this->message = $a_message;
1913  }

◆ setMinMembers()

ilObjGroup::setMinMembers (   $a_max)

set min members

public

Parameters
intmin members

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

Referenced by read().

355  {
356  $this->reg_min_members = $a_max;
357  }
+ Here is the caller graph for this function:

◆ setPassword()

ilObjGroup::setPassword (   $a_pass)

set password

public

Parameters
stringpassword

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

Referenced by read().

310  {
311  $this->reg_password = $a_pass;
312  }
+ 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 520 of file class.ilObjGroup.php.

Referenced by read().

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

◆ setRegistrationEnd()

ilObjGroup::setRegistrationEnd (   $a_end)

set registration end

public

Parameters
intunix time
Returns

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

Referenced by read().

288  {
289  $this->reg_end = $a_end;
290  }
+ Here is the caller graph for this function:

◆ setRegistrationStart()

ilObjGroup::setRegistrationStart (   $a_start)

set registration start

public

Parameters
objectilDateTime
Returns

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

Referenced by read().

264  {
265  $this->reg_start = $a_start;
266  }
+ Here is the caller graph for this function:

◆ setRegistrationType()

ilObjGroup::setRegistrationType (   $a_type)

set registration type

public

Parameters
intregistration type
Returns

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

Referenced by read().

207  {
208  $this->reg_type = $a_type;
209  }
+ 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 1809 of file class.ilObjGroup.php.

Referenced by read().

1810  {
1811  $this->view_mode = $a_view_mode;
1812  }
+ Here is the caller graph for this function:

◆ setWaitingListAutoFill()

ilObjGroup::setWaitingListAutoFill (   $a_value)

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

Referenced by read().

417  {
418  $this->auto_fill_from_waiting = (bool)$a_value;
419  }
+ Here is the caller graph for this function:

◆ translateViewMode()

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

translate view mode

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

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

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

1842  {
1843  global $tree;
1844 
1845  if(!$a_view_mode)
1846  {
1847  $a_view_mode = ilContainer::VIEW_DEFAULT;
1848  }
1849 
1850  // view mode is inherit => check for parent course
1851  if($a_view_mode == ilContainer::VIEW_INHERIT)
1852  {
1853  if(!$a_ref_id)
1854  {
1855  $ref = ilObject::_getAllReferences($a_obj_id);
1856  $a_ref_id = end($ref);
1857  }
1858 
1859  $crs_ref = $tree->checkForParentType($a_ref_id, 'crs');
1860  if(!$crs_ref)
1861  {
1863  }
1864 
1865  include_once './Modules/Course/classes/class.ilObjCourse.php';
1867 
1868  // validate course view mode
1869  if(!in_array($view_mode, array(ilContainer::VIEW_SESSIONS,
1871  {
1873  }
1874 
1875  return $view_mode;
1876  }
1877 
1878  return $a_view_mode;
1879  }
static _getAllReferences($a_id)
get all reference ids of object
static _lookupObjId($a_id)
+ Here is the call graph for this function:

◆ update()

ilObjGroup::update ( )

Update group.

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

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

677  {
678  global $ilDB,$ilAppEventHandler;
679 
680  if (!parent::update())
681  {
682  return false;
683  }
684 
685  $query = "UPDATE grp_settings ".
686  "SET information = ".$ilDB->quote($this->getInformation() ,'text').", ".
687  "grp_type = ".$ilDB->quote((int) $this->getGroupType() ,'integer').", ".
688  "registration_type = ".$ilDB->quote($this->getRegistrationType() ,'integer').", ".
689  "registration_enabled = ".$ilDB->quote($this->isRegistrationEnabled() ? 1 : 0 ,'integer').", ".
690  "registration_unlimited = ".$ilDB->quote($this->isRegistrationUnlimited() ? 1 : 0 ,'integer').", ".
691  "registration_start = ".$ilDB->quote($this->getRegistrationStart()->get(IL_CAL_DATETIME,'') ,'timestamp').", ".
692  "registration_end = ".$ilDB->quote($this->getRegistrationEnd()->get(IL_CAL_DATETIME,'') ,'timestamp').", ".
693  "registration_password = ".$ilDB->quote($this->getPassword() ,'text').", ".
694 // "registration_membership_limited = ".$ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
695  "registration_mem_limit = ".$ilDB->quote((int) $this->isMembershipLimited() ,'integer').", ".
696  "registration_max_members = ".$ilDB->quote($this->getMaxMembers() ,'integer').", ".
697  "waiting_list = ".$ilDB->quote($this->isWaitingListEnabled() ? 1 : 0 ,'integer').", ".
698  "latitude = ".$ilDB->quote($this->getLatitude() ,'text').", ".
699  "longitude = ".$ilDB->quote($this->getLongitude() ,'text').", ".
700  "location_zoom = ".$ilDB->quote($this->getLocationZoom() ,'integer').", ".
701  "enablemap = ".$ilDB->quote((int) $this->getEnableGroupMap() ,'integer').", ".
702  'reg_ac_enabled = '.$ilDB->quote($this->isRegistrationAccessCodeEnabled(),'integer').', '.
703  'reg_ac = '.$ilDB->quote($this->getRegistrationAccessCode(),'text').', '.
704  'view_mode = '.$ilDB->quote($this->getViewMode(false),'integer').', '.
705  'mail_members_type = '.$ilDB->quote($this->getMailToMembersType(),'integer').', '.
706  'leave_end = '.$ilDB->quote(($this->getCancellationEnd() && !$this->getCancellationEnd()->isNull()) ? $this->getCancellationEnd()->get(IL_CAL_UNIX) : null, 'integer').', '.
707  "registration_min_members = ".$ilDB->quote($this->getMinMembers() ,'integer').", ".
708  "auto_wait = ".$ilDB->quote($this->hasWaitingListAutoFill() ,'integer')." ".
709  "WHERE obj_id = ".$ilDB->quote($this->getId() ,'integer');
710  $res = $ilDB->manipulate($query);
711 
712  $ilAppEventHandler->raise('Modules/Group',
713  'update',
714  array('object' => $this,
715  'obj_id' => $this->getId(),
716  'appointments' => $this->prepareAppointments('update')));
717 
718 
719  return true;
720  }
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
getId()
get object id public
prepareAppointments($a_mode='create')
Prepare calendar appointments.
getLocationZoom()
Get LocationZoom.
getEnableGroupMap()
Get Enable Group Map.
getInformation()
get Information
getMailToMembersType()
Get mail to members type.
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 ( )

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

References $template_id, getDefaultGroupRoles(), getGroupType(), getGrpStatusClosedTemplateId(), getGrpStatusOpenTemplateId(), ilObject\getRefId(), GRP_TYPE_CLOSED, and GRP_TYPE_PUBLIC.

1293  {
1294  global $tree,$rbacreview,$rbacadmin;
1295 
1296  $parent_roles = $rbacreview->getParentRoleIds($this->getRefId());
1297  $real_parent_roles = array_diff(array_keys($parent_roles),$this->getDefaultGroupRoles());
1298 
1299  // Delete parent roles with stopped inheritance
1300  foreach($real_parent_roles as $role_id)
1301  {
1302  // Delete local role
1303  $rbacadmin->deleteLocalRole($role_id,$this->getRefId());
1304  }
1305  $parent_roles = $rbacreview->getParentRoleIds($this->getRefId());
1306  $real_parent_roles = array_diff(array_keys($parent_roles),$this->getDefaultGroupRoles());
1307 
1308  switch($this->getGroupType())
1309  {
1310  case GRP_TYPE_PUBLIC:
1312  break;
1313 
1314  case GRP_TYPE_CLOSED:
1316  break;
1317  }
1318 
1319  $first = true;
1320  foreach($tree->getFilteredSubTree($this->getRefId(),array('grp')) as $subnode)
1321  {
1322  // Read template operations
1323  $template_ops = $rbacreview->getOperationsOfRole($template_id,$subnode['type'], ROLE_FOLDER_ID);
1324 
1325  // for all parent roles
1326  foreach($real_parent_roles as $role_id)
1327  {
1328  if($rbacreview->isProtected($parent_roles[$role_id]['parent'],$role_id))
1329  {
1330  continue;
1331  }
1332 
1333  $rbacadmin->deleteLocalRole($role_id,$subnode['child']);
1334 
1335  // Store current operations
1336  $current_ops = $rbacreview->getOperationsOfRole($role_id,$subnode['type'],$parent_roles[$role_id]['parent']);
1337 
1338  // Revoke permissions
1339  $rbacadmin->revokePermission($subnode['child'],$role_id);
1340 
1341  // Grant permissions
1342  $granted = array();
1343  foreach($template_ops as $operation)
1344  {
1345  if(in_array($operation,$current_ops))
1346  {
1347  $granted[] = $operation;
1348  }
1349  }
1350  if($granted)
1351  {
1352  $rbacadmin->grantPermission($role_id, $granted,$subnode['child']);
1353  }
1354 
1355  if($first)
1356  {
1357  // This is the group itself
1358  $rbacadmin->copyRolePermissionIntersection(
1359  $template_id, ROLE_FOLDER_ID,
1360  $role_id, $parent_roles[$role_id]['parent'],
1361  $subnode["child"],$role_id);
1362  $rbacadmin->assignRoleToFolder($role_id,$subnode['child'],"n");
1363 
1364  }
1365  }
1366  $first = false;
1367  }
1368  }
$template_id
Definition: example_062.php:89
getDefaultGroupRoles($a_grp_id="")
get default group roles, returns the defaultlike create roles il_grp_member, il_grp_admin public ...
const GRP_TYPE_PUBLIC
getGrpStatusOpenTemplateId()
get group status open template public
getGrpStatusClosedTemplateId()
get group status closed template public
getGroupType()
get group type
const GRP_TYPE_CLOSED
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ validate()

ilObjGroup::validate ( )

validate group settings

public

Returns
bool

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

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

580  {
581  global $ilErr;
582 
583  if(!$this->getTitle())
584  {
585  $this->title = '';
586  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_TITLE));
587  }
588  if(!$this->getGroupType())
589  {
590  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_GROUP_TYPE));
591  }
592  if($this->getRegistrationType() == GRP_REGISTRATION_PASSWORD and !strlen($this->getPassword()))
593  {
594  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_PASSWORD));
595  }
597  {
598  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_REG_TIME_LIMIT));
599  }
600  if($this->isMembershipLimited())
601  {
602  if($this->getMinMembers() <= 0 && $this->getMaxMembers() <= 0)
603  {
604  $ilErr->appendMessage($this->lng->txt(self::ERR_MISSING_MIN_MAX_MEMBERS));
605  }
606  if($this->getMaxMembers() <= 0 && $this->isWaitingListEnabled())
607  {
608  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MAX_MEMBERS));
609  }
610  if($this->getMaxMembers() > 0 && $this->getMinMembers() > $this->getMaxMembers())
611  {
612  $ilErr->appendMessage($this->lng->txt(self::ERR_WRONG_MIN_MAX_MEMBERS));
613  }
614  }
615  return strlen($ilErr->getMessage()) == 0;
616  }
getMaxMembers()
get max members
isMembershipLimited()
is max member limited
getRegistrationType()
get registration type
getRegistrationEnd()
get registration end
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 GRP_REGISTRATION_PASSWORD
getRegistrationStart()
get registration start
getGroupType()
get group type
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 64 of file class.ilObjGroup.php.

Referenced by hasWaitingListAutoFill().

◆ $enablemap

ilObjGroup::$enablemap = 0
private

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

Referenced by getEnableGroupMap().

◆ $file_obj

ilObjGroup::$file_obj = null

Group file object for handling of export files.

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

Referenced by __initFileObject().

◆ $group_type

ilObjGroup::$group_type = null
protected

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

Referenced by getGroupType(), and isGroupTypeModified().

◆ $information

ilObjGroup::$information
protected

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

Referenced by getInformation().

◆ $latitude

ilObjGroup::$latitude = ''
private

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

Referenced by getLatitude().

◆ $leave_end

ilObjGroup::$leave_end
protected

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

Referenced by getCancellationEnd().

◆ $locationzoom

ilObjGroup::$locationzoom = 0
private

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

Referenced by getLocationZoom().

◆ $longitude

ilObjGroup::$longitude = ''
private

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

Referenced by getLongitude().

◆ $m_grpStatus

ilObjGroup::$m_grpStatus

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

◆ $m_roleAdminId

ilObjGroup::$m_roleAdminId

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

◆ $m_roleMemberId

ilObjGroup::$m_roleMemberId

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

◆ $mail_members

ilObjGroup::$mail_members = self::MAIL_ALLOWED_ALL
private

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

Referenced by getMailToMembersType().

◆ $members_obj

ilObjGroup::$members_obj

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

Referenced by getMembersObject().

◆ $reg_access_code

ilObjGroup::$reg_access_code = ''
private

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

Referenced by getRegistrationAccessCode().

◆ $reg_access_code_enabled

ilObjGroup::$reg_access_code_enabled = false
private

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

Referenced by isRegistrationAccessCodeEnabled().

◆ $reg_enabled

ilObjGroup::$reg_enabled = true
protected

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

◆ $reg_end

ilObjGroup::$reg_end = null
protected

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

◆ $reg_max_members

ilObjGroup::$reg_max_members = 0
protected

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

Referenced by getMaxMembers().

◆ $reg_membership_limitation

ilObjGroup::$reg_membership_limitation = false
protected

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

Referenced by isMembershipLimited().

◆ $reg_min_members

ilObjGroup::$reg_min_members = 0
protected

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

Referenced by getMinMembers().

◆ $reg_password

ilObjGroup::$reg_password = ''
protected

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

Referenced by getPassword().

◆ $reg_start

ilObjGroup::$reg_start = null
protected

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

◆ $reg_type

ilObjGroup::$reg_type = GRP_REGISTRATION_DIRECT
protected

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

Referenced by getRegistrationType().

◆ $reg_unlimited

ilObjGroup::$reg_unlimited = true
protected

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

Referenced by isRegistrationUnlimited().

◆ $view_mode

ilObjGroup::$view_mode = NULL
private

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

Referenced by lookupViewMode(), and translateViewMode().

◆ $waiting_list

ilObjGroup::$waiting_list = false
protected

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

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

◆ 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.

◆ ERR_MISSING_GROUP_TYPE

const ilObjGroup::ERR_MISSING_GROUP_TYPE = 'grp_missing_grp_type'

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

◆ ERR_MISSING_PASSWORD

const ilObjGroup::ERR_MISSING_PASSWORD = 'grp_missing_password'

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

◆ ERR_MISSING_TITLE

const ilObjGroup::ERR_MISSING_TITLE = 'msg_no_title'

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

◆ ERR_WRONG_MAX_MEMBERS

const ilObjGroup::ERR_WRONG_MAX_MEMBERS = 'grp_wrong_max_members'

Definition at line 44 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 47 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 45 of file class.ilObjGroup.php.

◆ GRP_ADMIN

const ilObjGroup::GRP_ADMIN = 2

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

◆ GRP_MEMBER

const ilObjGroup::GRP_MEMBER = 1

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

◆ MAIL_ALLOWED_ALL

const ilObjGroup::MAIL_ALLOWED_ALL = 1

◆ MAIL_ALLOWED_TUTORS

const ilObjGroup::MAIL_ALLOWED_TUTORS = 2

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

Referenced by ilObjGroupGUI\initForm().


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