ILIAS  release_4-4 Revision
ilGroupParticipants Class Reference
+ Inheritance diagram for ilGroupParticipants:
+ Collaboration diagram for ilGroupParticipants:

Public Member Functions

 __construct ($a_obj_id)
 Constructor. More...
 
 sendNotification ($a_type, $a_usr_id)
 Send notification mail. More...
 
- Public Member Functions inherited from ilParticipants
 __construct ($a_obj_id)
 Singleton Constructor. 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...
 
 updateNotification ($a_usr_id, $a_notification)
 Update notification status. More...
 
 add ($a_usr_id, $a_role)
 Add user to course. 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...
 
 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...
 

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 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 _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 Protected Attributes

static $instances = array()
 

Additional Inherited Members

- Protected Member Functions inherited from ilParticipants
 readSubscribers ()
 read subscribers More...
 
 readSubscriberData ($a_usr_id)
 read subscribers More...
 
- Protected Attributes inherited from ilParticipants
 $obj_id = 0
 
 $type = ''
 
 $ref_id = 0
 
 $roles = array()
 
 $role_data = array()
 
 $participants = array()
 
 $participants_status = array()
 
 $members = array()
 
 $tutors = array()
 
 $admins = array()
 
 $subscribers = array()
 
 $ilDB
 
 $lng
 

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 46 of file class.ilGroupParticipants.php.

47  {
48  $this->type = 'grp';
49  parent::__construct($a_obj_id);
50  }

Member Function Documentation

◆ _getInstanceByObjId()

static ilGroupParticipants::_getInstanceByObjId (   $a_obj_id)
static

Get singleton instance.

public

Parameters
intobj_id
Returns
object ilGroupParticipants

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

Referenced by ilGroupEditParticipantsTableGUI\__construct(), ilObjCourseGrouping\_checkGroupingDependencies(), ilCourseParticipantsGroupsGUI\add(), ilSoapGroupAdministration\assignGroupMember(), ilPortfolioAccessHandler\checkAccessOfUser(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilForumNotification\checkParentNodeTree(), ilObjGroup\cloneObject(), ilObjGroupGUI\confirmDeleteMembersObject(), ilGroupMembershipMailNotification\createGroupStatus(), ilObjGroupGUI\editMembersObject(), ilObjGroupGUI\executeCommand(), ilParticipants\getInstanceByObjId(), ilGroupLP\getMembers(), ilLPStatusCollection\getMembers(), ilMilestoneResponsiblesTableGUI\getParticipantsAndResponsibles(), ilTrQuery\getParticipantsForObject(), ilGroupXMLWriter\ilGroupXMLWriter(), ilObjGroupGUI\initAttendanceList(), ilObjSessionGUI\initContainer(), ilCourseParticipantsGroupsTableGUI\initGroups(), ilMemberExport\initMembers(), ilGroupRegistrationGUI\initParticipants(), ilObjGroup\initParticipants(), ilSoapGroupAdministration\isAssignedToGroup(), ilObjForumGUI\isParentObjectCrsOrGrp(), ilObjGroupGUI\leaveObject(), ilObjGroupAccess\lookupRegistrationInfo(), ilObjGroupGUI\membersObject(), ilGroupParticipantsTableGUI\parse(), ilObjGroupGUI\printMembersOutputObject(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjGroup\register(), ilCourseParticipantsGroupsGUI\remove(), ilObjGroupGUI\saveObject(), ilMailSearchGroupsGUI\showMyGroups(), and ilObjGroupGUI\updateMembersObject().

62  {
63  if(isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id])
64  {
65  return self::$instances[$a_obj_id];
66  }
67  return self::$instances[$a_obj_id] = new ilGroupParticipants($a_obj_id);
68  }
+ 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 107 of file class.ilGroupParticipants.php.

References ilParticipants\$ilDB, and $ilLog.

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

108  {
109  global $rbacreview,$ilObjDataCache,$ilDB,$ilLog;
110 
111  $rolf = $rbacreview->getRoleFolderOfObject($a_ref_id);
112  if(!isset($rolf['ref_id']) or !$rolf['ref_id'])
113  {
114  $title = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($a_ref_id));
115  $ilLog->write(__METHOD__.': Found object without role folder. Ref_id: '.$a_ref_id.', title: '.$title);
116  $ilLog->logStack();
117 
118  return false;
119  }
120  $local_roles = $rbacreview->getRolesOfRoleFolder($rolf["ref_id"],false);
121  return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
122  }
+ Here is the caller 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 74 of file class.ilGroupParticipants.php.

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

Referenced by ilObjGroupGUI\membersObject().

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

◆ sendNotification()

ilGroupParticipants::sendNotification (   $a_type,
  $a_usr_id 
)

Send notification mail.

Parameters
int$a_type
int$a_usr_id
Returns

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

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

131  {
132  include_once './Modules/Group/classes/class.ilGroupMembershipMailNotification.php';
133  switch($a_type)
134  {
136 
137  $mail = new ilGroupMembershipMailNotification();
139  $mail->setRefId($this->ref_id);
140  $mail->setRecipients(array($a_usr_id));
141  $mail->send();
142  break;
143 
145 
146  $mail = new ilGroupMembershipMailNotification();
148  $mail->setRefId($this->ref_id);
149  $mail->setRecipients(array($a_usr_id));
150  $mail->send();
151  break;
152 
154 
155  $mail = new ilGroupMembershipMailNotification();
157  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
158  $mail->setRefId($this->ref_id);
159  $mail->setRecipients($this->getNotificationRecipients());
160  $mail->send();
161  break;
162 
164 
165  $mail = new ilGroupMembershipMailNotification();
167  $mail->setRefId($this->ref_id);
168  $mail->setRecipients(array($a_usr_id));
169  $mail->send();
170  break;
171 
173 
174  $mail = new ilGroupMembershipMailNotification();
176  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
177  $mail->setRefId($this->ref_id);
178  $mail->setRecipients($this->getNotificationRecipients());
179  $mail->send();
180  break;
181 
183 
184  $mail = new ilGroupMembershipMailNotification();
186  $mail->setRefId($this->ref_id);
187  $mail->setRecipients(array($a_usr_id));
188  $mail->send();
189  break;
190 
192 
193  $mail = new ilGroupMembershipMailNotification();
195  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
196  $mail->setRefId($this->ref_id);
197  $mail->setRecipients($this->getNotificationRecipients());
198  $mail->send();
199  break;
200 
202 
203  $mail = new ilGroupMembershipMailNotification();
205  $mail->setRefId($this->ref_id);
206  $mail->setRecipients(array($a_usr_id));
207  $mail->send();
208  break;
209 
211 
212  $mail = new ilGroupMembershipMailNotification();
214  $mail->setRefId($this->ref_id);
215  $mail->setRecipients(array($a_usr_id));
216  $mail->send();
217  break;
218 
220 
221  include_once('./Modules/Group/classes/class.ilGroupWaitingList.php');
222  $wl = new ilGroupWaitingList($this->obj_id);
223  $pos = $wl->getPosition($a_usr_id);
224 
225  $mail = new ilGroupMembershipMailNotification();
227  $mail->setRefId($this->ref_id);
228  $mail->setRecipients(array($a_usr_id));
229  $mail->setAdditionalInformation(array('position' => $pos));
230  $mail->send();
231  break;
232 
234 
235  $mail = new ilGroupMembershipMailNotification();
237  $mail->setRefId($this->ref_id);
238  $mail->setRecipients(array($a_usr_id));
239  $mail->send();
240  break;
241 
242 
243  }
244  return true;
245  }
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 38 of file class.ilGroupParticipants.php.


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