ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilGroupParticipants Class Reference
+ Inheritance diagram for ilGroupParticipants:
+ Collaboration diagram for ilGroupParticipants:

Public Member Functions

 __construct ($a_obj_id)
 Constructor. More...
 
 add ($a_usr_id, $a_role)
 Add user to role. More...
 
 addSubscriber ($a_usr_id)
 
 sendNotification ($a_type, $a_usr_id, $a_force_sending_mail=false)
 Send notification mail. More...
 
- Public Member Functions inherited from ilParticipants
 __construct ($a_component_name, $a_ref_id)
 Singleton Constructor. More...
 
 getObjId ()
 get current obj_id More...
 
 getType ()
 Get object type. More...
 
 getNotificationRecipients ()
 Get admin, tutor which have notification enabled. More...
 
 getCountMembers ()
 Get number of members (not participants) More...
 
 getCountParticipants ()
 Get number of participants. More...
 
 getParticipants ()
 Get all participants ids. More...
 
 getMembers ()
 Get all members ids (admins and tutors are not members) Use get participants to fetch all. More...
 
 getAdmins ()
 Get all admins ids. More...
 
 getCountAdmins ()
 Get number of admins. More...
 
 getTutors ()
 Get all tutors ids. More...
 
 isAdmin ($a_usr_id)
 is user admin More...
 
 isTutor ($a_usr_id)
 is user tutor More...
 
 isMember ($a_usr_id)
 is user member More...
 
 isAssigned ($a_usr_id)
 check if user is assigned More...
 
 isLastAdmin ($a_usr_id)
 Check if user is last admin. More...
 
 getRoles ()
 Get course roles. More...
 
 getAssignedRoles ($a_usr_id)
 Get assigned roles. More...
 
 updateRoleAssignments ($a_usr_id, $a_roles)
 Update role assignments. More...
 
 checkLastAdmin ($a_usr_ids)
 Check if user for deletion are last admins. More...
 
 isBlocked ($a_usr_id)
 Check if user is blocked. More...
 
 hasPassed ($a_usr_id)
 Check if user has passed course. More...
 
 delete ($a_usr_id)
 Drop user from all roles. More...
 
 updateBlocked ($a_usr_id, $a_blocked)
 Update blocked status. More...
 
 updateContact ($a_usr_id, $a_contact)
 Update contact setting type $ilDB. More...
 
 getContacts ()
 get user ids which are confirgured as contact More...
 
 updateNotification ($a_usr_id, $a_notification)
 Update notification status. More...
 
 add ($a_usr_id, $a_role)
 Add user to object. More...
 
 deleteParticipants ($a_user_ids)
 Delete users. More...
 
 addDesktopItem ($a_usr_id)
 Add desktop item. More...
 
 dropDesktopItem ($a_usr_id)
 Drop desktop item. More...
 
 isNotificationEnabled ($a_usr_id)
 check if notification is enabled More...
 
 isContact ($a_usr_id)
 Check if user is contact. More...
 
 getAutoGeneratedRoleId ($a_role_type)
 Get role id of auto generated role type. More...
 
 isGroupingMember ($a_usr_id, $a_field='')
 Check grouping membership. More...
 
 getSubscribers ()
 get all subscribers More...
 
 getCountSubscribers ()
 get number of subscribers More...
 
 getSubscriberData ($a_usr_id)
 get subscriber data More...
 
 assignSubscribers ($a_usr_ids)
 Assign subscribers. More...
 
 assignSubscriber ($a_usr_id)
 Assign subscriber. More...
 
 autoFillSubscribers ()
 Assign subscriber. More...
 
 addSubscriber ($a_usr_id)
 Add subscriber. More...
 
 updateSubscriptionTime ($a_usr_id, $a_subtime)
 Update subscription time. More...
 
 updateSubject ($a_usr_id, $a_subject)
 update subject More...
 
 deleteSubscriber ($a_usr_id)
 Delete subsciber. More...
 
 deleteSubscribers ($a_usr_ids)
 Delete subscibers. More...
 
 isSubscriber ($a_usr_id)
 check if is subscriber More...
 
 setRoleOrderPosition ($a_user_id)
 Set role order position. More...
 

Static Public Member Functions

static _getInstanceByObjId ($a_obj_id)
 Get singleton instance. More...
 
static getMemberRoles ($a_ref_id)
 Get member roles (not auto generated) More...
 
static _isParticipant ($a_ref_id, $a_usr_id)
 Static function to check if a user is a participant of the container object. More...
 
- Static Public Member Functions inherited from ilParticipants
static getInstance ($a_ref_id)
 Get instance by ref_id. More...
 
static getInstanceByObjId ($a_obj_id)
 Get instance by obj type. More...
 
static hasParticipantListAccess ($a_obj_id, $a_usr_id=null)
 Check if (current) user has access to the participant list. More...
 
static getUserMembershipAssignmentsByType ($a_user_ids, $a_type, $a_only_member_roles)
 Get user membership assignments by type. More...
 
static _getMembershipByType ($a_usr_id, $a_type, $a_only_member_role=false)
 get membership by type Get course or group membership More...
 
static _isParticipant ($a_ref_id, $a_usr_id)
 Static function to check if a user is a participant of the container object. More...
 
static lookupNumberOfParticipants ($a_ref_id)
 Lookup the number of participants (crs admins, tutors, members, grp admins, members) More...
 
static lookupNumberOfMembers ($a_ref_id)
 Lookup number of members ilRbacReview $rbacreview <type> $ilObjDataCache. More...
 
static _isBlocked ($a_obj_id, $a_usr_id)
 Check if user is blocked. More...
 
static _hasPassed ($a_obj_id, $a_usr_id)
 Check if user has passed course. More...
 
static _deleteAllEntries ($a_obj_id)
 Delete all entries Normally called for course deletion. More...
 
static _deleteUser ($a_usr_id)
 Delete user data. More...
 
static getDefaultMemberRole ($a_ref_id)
 
static lookupSubscribers ($a_obj_id)
 
static _isSubscriber ($a_obj_id, $a_usr_id)
 check if user is subscriber More...
 
static lookupSubscribersData ($a_obj_id)
 
static _getAllSupportContactsOfUser ($a_usr_id, $a_type)
 Get all support contacts for a user. More...
 

Data Fields

const COMPONENT_NAME = 'Modules/Group'
 

Static Protected Attributes

static $instances = array()
 

Additional Inherited Members

- Protected Member Functions inherited from ilParticipants
 getComponent ()
 Get component name Used for raising events. More...
 
 readParticipants ()
 Read participants. More...
 
 readParticipantsStatus ()
 Read status of participants (blocked, notification, passed) More...
 
 readSubscribers ()
 read subscribers More...
 
 readSubscriberData ($a_usr_id)
 read subscribers More...
 
- Protected Attributes inherited from ilParticipants
 $component = ''
 
 $obj_id = 0
 
 $type = ''
 
 $ref_id = 0
 
 $roles = array()
 
 $role_data = array()
 
 $roles_sorted = []
 
 $role_assignments = []
 
 $participants = array()
 
 $participants_status = array()
 
 $members = array()
 
 $tutors = array()
 
 $admins = array()
 
 $subscribers = array()
 
 $ilDB
 
 $lng
 
 $logger = null
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilGroupParticipants::__construct (   $a_obj_id)

Constructor.

protected

Parameters
intobj_id of container

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

References ilObject\_getAllReferences().

49  {
50  // ref based constructor
51  $refs = ilObject::_getAllReferences($a_obj_id);
52  parent::__construct(self::COMPONENT_NAME, array_pop($refs));
53  }
static _getAllReferences($a_id)
get all reference ids of object
+ Here is the call graph for this function:

Member Function Documentation

◆ _getInstanceByObjId()

static ilGroupParticipants::_getInstanceByObjId (   $a_obj_id)
static

Get singleton instance.

public

Parameters
intobj_id
Returns
ilGroupParticipants

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

Referenced by ilGroupEditParticipantsTableGUI\__construct(), ilGroupXMLWriter\__construct(), ilObjCourseGrouping\_checkGroupingDependencies(), ilCourseParticipantsGroupsGUI\add(), ilObjGroupGUI\afterSave(), ilModulesGroupTasks\assignAdminsToGroup(), ilSoapGroupAdministration\assignGroupMember(), ilModulesGroupTasks\assignMembersToGroup(), ilMailSearchGroupsGUI\cancel(), ilPortfolioAccessHandler\checkAccessOfUser(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilForumNotification\checkParentNodeTree(), ilObjGroup\cloneObject(), ilGroupMembershipMailNotification\createGroupStatus(), ilForumSettingsGUI\disableHideUserToggleNoti(), ilParticipants\getInstanceByObjId(), ilGroupLP\getMembers(), ilLPStatusCollection\getMembers(), ilNotification\getNotificationsForObject(), ilMembershipNotifications\getParticipants(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilBadgeHandler\getUserIds(), ilObjSessionGUI\initContainer(), ilCourseParticipantsGroupsTableGUI\initGroups(), ilMemberExport\initGroups(), ilMemberExport\initMembers(), ilGroupRegistrationGUI\initParticipants(), ilObjGroup\initParticipants(), ilSoapGroupAdministration\isAssignedToGroup(), ilObjGroupGUI\leaveObject(), ilObjGroupAccess\lookupRegistrationInfo(), ilGroupParticipantsTableGUI\parse(), ilModulesGroupTasks\readAdminsFromGroup(), ilModulesGroupTasks\readMembersFromGroup(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjGroup\register(), and ilCourseParticipantsGroupsGUI\remove().

65  {
66  if (isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id]) {
67  return self::$instances[$a_obj_id];
68  }
69  return self::$instances[$a_obj_id] = new ilGroupParticipants($a_obj_id);
70  }
+ Here is the caller graph for this function:

◆ _isParticipant()

static ilGroupParticipants::_isParticipant (   $a_ref_id,
  $a_usr_id 
)
static

Static function to check if a user is a participant of the container object.

public

Parameters
intref_id
intuser id

Definition at line 144 of file class.ilGroupParticipants.php.

References $DIC, ilParticipants\$ilDB, and $ilLog.

Referenced by ilObjGroupAccess\_checkAccess(), ilStartUpGUI\_checkGoto(), ilObjGroupGUI\getTabs(), ilNotification\hasNotification(), and ilObjGroupGUI\initHeaderAction().

145  {
146  global $DIC;
147 
148  $rbacreview = $DIC['rbacreview'];
149  $ilObjDataCache = $DIC['ilObjDataCache'];
150  $ilDB = $DIC['ilDB'];
151  $ilLog = $DIC['ilLog'];
152 
153  $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
154  return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
155  }
global $DIC
Definition: saml.php:7
+ Here is the caller graph for this function:

◆ add()

ilGroupParticipants::add (   $a_usr_id,
  $a_role 
)

Add user to role.

Parameters
int$a_usr_id
int$a_role
Returns
boolean

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

References add(), and ilParticipants\addDesktopItem().

Referenced by ilGroupXMLParser\__assignMembers().

106  {
107  if (parent::add($a_usr_id, $a_role)) {
108  $this->addDesktopItem($a_usr_id);
109  return true;
110  }
111  return false;
112  }
addDesktopItem($a_usr_id)
Add desktop item.
add()
Definition: add.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubscriber()

ilGroupParticipants::addSubscriber (   $a_usr_id)

Definition at line 114 of file class.ilGroupParticipants.php.

References $DIC, $GLOBALS, $ilLog, and ilParticipants\getObjId().

115  {
116  global $DIC;
117 
118  $ilAppEventHandler = $DIC['ilAppEventHandler'];
119  $ilLog = $DIC['ilLog'];
120 
121  parent::addSubscriber($a_usr_id);
122 
123  $GLOBALS['DIC']->logger()->grp()->info('Raise new event: Modules/Group addSubscriber.');
124  $ilAppEventHandler->raise(
125  "Modules/Group",
126  'addSubscriber',
127  array(
128  'obj_id' => $this->getObjId(),
129  'usr_id' => $a_usr_id
130  )
131  );
132  }
getObjId()
get current obj_id
global $DIC
Definition: saml.php:7
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ getMemberRoles()

static ilGroupParticipants::getMemberRoles (   $a_ref_id)
static

Get member roles (not auto generated)

Parameters
int$a_ref_id

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

References $DIC, ilParticipants\$roles, $title, and ilObject\_lookupTitle().

77  {
78  global $DIC;
79 
80  $rbacreview = $DIC['rbacreview'];
81 
82  $lrol = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
83 
84  $roles = array();
85  foreach ($lrol as $role) {
87  switch (substr($title, 0, 8)) {
88  case 'il_grp_a':
89  case 'il_grp_m':
90  continue 2;
91 
92  default:
93  $roles[$role] = $role;
94  }
95  }
96  return $roles;
97  }
global $DIC
Definition: saml.php:7
static _lookupTitle($a_id)
lookup object title
+ Here is the call graph for this function:

◆ sendNotification()

ilGroupParticipants::sendNotification (   $a_type,
  $a_usr_id,
  $a_force_sending_mail = false 
)

Send notification mail.

Parameters
int$a_type
int$a_usr_id
Returns

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

References $a_type, ilParticipants\getNotificationRecipients(), ilGroupMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER, ilGroupMembershipMailNotification\TYPE_ADMISSION_MEMBER, ilGroupMembershipMailNotification\TYPE_DISMISS_MEMBER, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION_REQUEST, ilGroupMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE, ilGroupMembershipMailNotification\TYPE_REFUSED_SUBSCRIPTION_MEMBER, ilGroupMembershipMailNotification\TYPE_STATUS_CHANGED, ilGroupMembershipMailNotification\TYPE_SUBSCRIBE_MEMBER, ilGroupMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ilGroupMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

164  {
165  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
166  $mail = new ilGroupMembershipMailNotification();
167  $mail->forceSendingMail($a_force_sending_mail);
168 
169  switch ($a_type) {
171 
173  $mail->setRefId($this->ref_id);
174  $mail->setRecipients(array($a_usr_id));
175  $mail->send();
176  break;
177 
179 
181  $mail->setRefId($this->ref_id);
182  $mail->setRecipients(array($a_usr_id));
183  $mail->send();
184  break;
185 
187 
189  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
190  $mail->setRefId($this->ref_id);
191  $mail->setRecipients($this->getNotificationRecipients());
192  $mail->send();
193  break;
194 
196 
198  $mail->setRefId($this->ref_id);
199  $mail->setRecipients(array($a_usr_id));
200  $mail->send();
201  break;
202 
204 
206  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
207  $mail->setRefId($this->ref_id);
208  $mail->setRecipients($this->getNotificationRecipients());
209  $mail->send();
210  break;
211 
213 
215  $mail->setRefId($this->ref_id);
216  $mail->setRecipients(array($a_usr_id));
217  $mail->send();
218  break;
219 
221 
223  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
224  $mail->setRefId($this->ref_id);
225  $mail->setRecipients($this->getNotificationRecipients());
226  $mail->send();
227  break;
228 
230 
232  $mail->setRefId($this->ref_id);
233  $mail->setRecipients(array($a_usr_id));
234  $mail->send();
235  break;
236 
238 
240  $mail->setRefId($this->ref_id);
241  $mail->setRecipients(array($a_usr_id));
242  $mail->send();
243  break;
244 
246 
247  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
248  $wl = new ilGroupWaitingList($this->obj_id);
249  $pos = $wl->getPosition($a_usr_id);
250 
252  $mail->setRefId($this->ref_id);
253  $mail->setRecipients(array($a_usr_id));
254  $mail->setAdditionalInformation(array('position' => $pos));
255  $mail->send();
256  break;
257 
259 
261  $mail->setRefId($this->ref_id);
262  $mail->setRecipients(array($a_usr_id));
263  $mail->send();
264  break;
265 
266 
267  }
268  return true;
269  }
$a_type
Definition: workflow.php:92
Waiting list for groups.
getNotificationRecipients()
Get admin, tutor which have notification enabled.
+ Here is the call graph for this function:

Field Documentation

◆ $instances

ilGroupParticipants::$instances = array()
staticprotected

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

◆ COMPONENT_NAME

const ilGroupParticipants::COMPONENT_NAME = 'Modules/Group'

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


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