ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCourseParticipants Class Reference
+ Inheritance diagram for ilCourseParticipants:
+ Collaboration diagram for ilCourseParticipants:

Public Member Functions

 __construct ($a_obj_id)
 Singleton constructor. More...
 
 updatePassed ($a_usr_id, $a_passed, $a_manual=false, $a_no_origin=false)
 Update passed status. More...
 
 getPassedInfo ($a_usr_id)
 Get info about passed status. More...
 
 sendNotification ($a_type, $a_usr_id)
 
 sendUnsubscribeNotificationToAdmins ($a_usr_id)
 
 sendSubscriptionRequestToAdmins ($a_usr_id)
 
 sendNotificationToAdmins ($a_usr_id)
 
 __buildStatusBody (&$user_obj)
 
- 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. More...
 
static _updatePassed ($a_obj_id, $a_usr_id, $a_passed, $a_manual=false, $a_no_origin=false)
 Update passed status (static) More...
 
static getDateTimeOfPassed ($a_obj_id, $a_usr_id)
 
static getPassedUsersForObjects (array $a_obj_ids, array $a_usr_ids)
 
- 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 meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 35 of file class.ilCourseParticipants.php.

Constructor & Destructor Documentation

◆ __construct()

ilCourseParticipants::__construct (   $a_obj_id)

Singleton constructor.

protected

Parameters
intobj_id of container

Definition at line 45 of file class.ilCourseParticipants.php.

46  {
47  $this->type = 'crs';
48 
49  $this->NOTIFY_DISMISS_SUBSCRIBER = 1;
50  $this->NOTIFY_ACCEPT_SUBSCRIBER = 2;
51  $this->NOTIFY_DISMISS_MEMBER = 3;
52  $this->NOTIFY_BLOCK_MEMBER = 4;
53  $this->NOTIFY_UNBLOCK_MEMBER = 5;
54  $this->NOTIFY_ACCEPT_USER = 6;
55  $this->NOTIFY_ADMINS = 7;
56  $this->NOTIFY_STATUS_CHANGED = 8;
57  $this->NOTIFY_SUBSCRIPTION_REQUEST = 9;
58 
59  $this->NOTIFY_REGISTERED = 10;
60  $this->NOTIFY_UNSUBSCRIBE = 11;
61  $this->NOTIFY_WAITING_LIST = 12;
62 
63  parent::__construct($a_obj_id);
64  }

Member Function Documentation

◆ __buildStatusBody()

ilCourseParticipants::__buildStatusBody ( $user_obj)

Definition at line 369 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, ilParticipants\hasPassed(), ilParticipants\isAdmin(), ilParticipants\isBlocked(), ilParticipants\isMember(), ilParticipants\isNotificationEnabled(), and ilParticipants\isTutor().

370  {
371  global $ilDB;
372 
373  $body = $this->lng->txt('crs_status_changed_body')."\n";
374  $body .= $this->lng->txt('login').': '.$user_obj->getLogin()."\n";
375  $body .= $this->lng->txt('role').': ';
376 
377  if($this->isAdmin($user_obj->getId()))
378  {
379  $body .= $this->lng->txt('crs_admin')."\n";
380  }
381  if($this->isTutor($user_obj->getId()))
382  {
383  $body .= $this->lng->txt('crs_tutor')."\n";
384  }
385  if($this->isMember($user_obj->getId()))
386  {
387  $body .= $this->lng->txt('crs_member')."\n";
388  }
389  $body .= $this->lng->txt('status').': ';
390 
391  if($this->isNotificationEnabled($user_obj->getId()))
392  {
393  $body .= $this->lng->txt("crs_notify")."\n";
394  }
395  else
396  {
397  $body .= $this->lng->txt("crs_no_notify")."\n";
398  }
399  if($this->isBlocked($user_obj->getId()))
400  {
401  $body .= $this->lng->txt("crs_blocked")."\n";
402  }
403  else
404  {
405  $body .= $this->lng->txt("crs_unblocked")."\n";
406  }
407  $passed = $this->hasPassed($user_obj->getId()) ? $this->lng->txt('yes') : $this->lng->txt('no');
408  $body .= $this->lng->txt('crs_passed').': '.$passed."\n";
409 
410  return $body;
411  }
isAdmin($a_usr_id)
is user admin
isNotificationEnabled($a_usr_id)
check if notification is enabled
isMember($a_usr_id)
is user member
isBlocked($a_usr_id)
Check if user is blocked.
hasPassed($a_usr_id)
Check if user has passed course.
isTutor($a_usr_id)
is user tutor
+ Here is the call graph for this function:

◆ _getInstanceByObjId()

static ilCourseParticipants::_getInstanceByObjId (   $a_obj_id)
static

Get singleton instance.

public

Parameters
intobj_id

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

Referenced by ilCourseEditParticipantsTableGUI\__construct(), ilObjCourseGUI\__showWaitingList(), ilCourseObjectiveResult\__updatePassed(), ilShopUtils\_assignPurchasedCourseMemberRole(), ilObjCourseAccess\_checkAccess(), ilObjCourseGrouping\_checkGroupingDependencies(), ilShopUtils\_deassignPurchasedCourseMemberRole(), ilObjCourseGUI\afterImport(), ilSoapCourseAdministration\assignCourseMember(), ilDataLoader\assignUsersAsCourseMembers(), ilMailSearchCoursesGUI\cancel(), ilPortfolioAccessHandler\checkAccessOfUser(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilForumNotification\checkParentNodeTree(), ilCourseMembershipMailNotification\createCourseStatus(), ilObjCourseGUI\deleteMembersObject(), ilObjCourseGUI\editMembersObject(), ilSoapCourseAdministration\excludeCourseMember(), ilObjCourseGUI\executeCommand(), ilUserImportParser\getCourseMembersObjectForRole(), ilCalendarBlockGUI\getHTML(), ilParticipants\getInstanceByObjId(), ilCourseParticipantsGroupsTableGUI\getItems(), ilCourseLP\getMembers(), ilLPStatusEvent\getMembers(), ilLPStatusManualByTutor\getMembers(), ilLPStatusObjectives\getMembers(), ilLPStatusCollection\getMembers(), ilTrQuery\getParticipantsForObject(), ilCourseXMLParser\ilCourseXMLParser(), ilObjCourseGUI\initAttendanceList(), ilObjSessionGUI\initContainer(), ilObjCourse\initCourseMembersObject(), ilMemberExport\initMembers(), ilCourseRegistrationGUI\initParticipants(), ilSoapCourseAdministration\isAssignedToCourse(), ilObjForumGUI\isParentObjectCrsOrGrp(), ilObjCourseGUI\membersMapObject(), ilObjCourseGUI\membersObject(), ilPurchase\purchase(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjCourse\register(), ilObjCourseGUI\removeMembersObject(), ilMembershipTest\testSubscription(), and ilObjCourseGUI\updateMembersObject().

75  {
76  if(isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id])
77  {
78  return self::$instances[$a_obj_id];
79  }
80  return self::$instances[$a_obj_id] = new ilCourseParticipants($a_obj_id);
81  }
+ Here is the caller graph for this function:

◆ _updatePassed()

static ilCourseParticipants::_updatePassed (   $a_obj_id,
  $a_usr_id,
  $a_passed,
  $a_manual = false,
  $a_no_origin = false 
)
static

Update passed status (static)

public

Parameters
int$obj_id
int$usr_id
bool$passed
bool$a_manual
bool$a_no_origin

Definition at line 138 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, $ilUser, $query, and $res.

Referenced by ilCourseAppEventListener\handleEvent().

139  {
140  global $ilDB, $ilUser;
141 
142  // #11600
143  $origin = -1;
144  if($a_manual)
145  {
146  $origin = $ilUser->getId();
147  }
148 
149  $query = "SELECT passed FROM obj_members ".
150  "WHERE obj_id = ".$ilDB->quote($a_obj_id,'integer')." ".
151  "AND usr_id = ".$ilDB->quote($a_usr_id,'integer');
152  $res = $ilDB->query($query);
153  if($res->numRows())
154  {
155  // #9284 - only needs updating when status has changed
156  $old = $ilDB->fetchAssoc($res);
157  if((int)$old["passed"] != (int)$a_passed)
158  {
159  $query = "UPDATE obj_members SET ".
160  "passed = ".$ilDB->quote((int) $a_passed,'integer').", ".
161  "origin = ".$ilDB->quote($origin,'integer').", ".
162  "origin_ts = ".$ilDB->quote(time(),'integer')." ".
163  "WHERE obj_id = ".$ilDB->quote($a_obj_id,'integer')." ".
164  "AND usr_id = ".$ilDB->quote($a_usr_id,'integer');
165  }
166  }
167  else
168  {
169  // when member is added we should not set any date
170  // see ilObjCourse::checkLPStatusSync()
171  if($a_no_origin && !$a_passed)
172  {
173  $origin = 0;
174  $origin_ts = 0;
175  }
176  else
177  {
178  $origin_ts = time();
179  }
180 
181  $query = "INSERT INTO obj_members (passed,obj_id,usr_id,notification,blocked,origin,origin_ts) ".
182  "VALUES ( ".
183  $ilDB->quote((int) $a_passed,'integer').", ".
184  $ilDB->quote($a_obj_id,'integer').", ".
185  $ilDB->quote($a_usr_id,'integer').", ".
186  $ilDB->quote(0,'integer').", ".
187  $ilDB->quote(0,'integer').", ".
188  $ilDB->quote($origin,'integer').", ".
189  $ilDB->quote($origin_ts,'integer').")";
190  }
191  $res = $ilDB->manipulate($query);
192  return true;
193  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ getDateTimeOfPassed()

static ilCourseParticipants::getDateTimeOfPassed (   $a_obj_id,
  $a_usr_id 
)
static

Definition at line 413 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, and $res.

Referenced by ilCourseCertificateAdapter\_hasUserCertificate(), ilObjCourseGUI\deliverCertificateObject(), ilCourseCertificateAdapter\getCertificateVariablesForPresentation(), and ilObjCourseGUI\initHeaderAction().

414  {
415  global $ilDB;
416 
417  $sql = "SELECT origin_ts FROM obj_members".
418  " WHERE usr_id = ".$ilDB->quote($a_usr_id, "integer").
419  " AND obj_id = ".$ilDB->quote($a_obj_id, "integer").
420  " AND passed = ".$ilDB->quote(1, "integer");
421  $res = $ilDB->query($sql);
422  $res = $ilDB->fetchAssoc($res);
423  if($res["origin_ts"])
424  {
425  return date("Y-m-d H:i:s", $res["origin_ts"]);
426  }
427  }
+ Here is the caller graph for this function:

◆ getMemberRoles()

static ilCourseParticipants::getMemberRoles (   $a_ref_id)
static

Get member roles.

Parameters
int$a_ref_id

Definition at line 87 of file class.ilCourseParticipants.php.

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

Referenced by ilObjCourseGUI\membersObject(), ilObjCourseGUI\setShowHidePrefs(), and ilObjCourseGUI\updateRoleStatusObject().

88  {
89  global $rbacreview;
90 
91  $rolf = $rbacreview->getRoleFolderOfObject($a_ref_id);
92  $lrol = $rbacreview->getRolesOfRoleFolder($rolf['ref_id'],false);
93 
94  $roles = array();
95  foreach($lrol as $role)
96  {
97  $title = ilObject::_lookupTitle($role);
98  switch(substr($title,0,8))
99  {
100  case 'il_crs_a':
101  case 'il_crs_t':
102  case 'il_crs_m':
103  continue;
104 
105  default:
106  $roles[$role] = $role;
107  }
108  }
109  return $roles;
110  }
static _lookupTitle($a_id)
lookup object title
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPassedInfo()

ilCourseParticipants::getPassedInfo (   $a_usr_id)

Get info about passed status.

Parameters
int$a_usr_id
Returns
array (user_id, timestamp)

Definition at line 201 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, $row, and IL_CAL_UNIX.

202  {
203  global $ilDB;
204 
205  $sql = "SELECT origin, origin_ts".
206  " FROM obj_members".
207  " WHERE obj_id = ".$ilDB->quote($this->obj_id, "integer").
208  " AND usr_id = ".$ilDB->quote($a_usr_id, "integer");
209  $set = $ilDB->query($sql);
210  $row = $ilDB->fetchAssoc($set);
211  if($row["origin"])
212  {
213  return array("user_id" => $row["origin"],
214  "timestamp" => new ilDateTime($row["origin_ts"], IL_CAL_UNIX));
215  }
216  }
const IL_CAL_UNIX
Date and time handling

◆ getPassedUsersForObjects()

static ilCourseParticipants::getPassedUsersForObjects ( array  $a_obj_ids,
array  $a_usr_ids 
)
static

Definition at line 429 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, $res, and $row.

Referenced by ilCourseCertificateAdapter\_preloadListData().

430  {
431  global $ilDB;
432 
433  $res = array();
434 
435  $sql = "SELECT usr_id,obj_id FROM obj_members".
436  " WHERE ".$ilDB->in("usr_id", $a_usr_ids, "", "integer").
437  " AND ".$ilDB->in("obj_id", $a_obj_ids, "", "integer").
438  " AND passed = ".$ilDB->quote(1, "integer");
439  $set = $ilDB->query($sql);
440  while($row = $ilDB->fetchAssoc($set))
441  {
442  $res[] = $row;
443  }
444 
445  return $res;
446  }
+ Here is the caller graph for this function:

◆ sendNotification()

ilCourseParticipants::sendNotification (   $a_type,
  $a_usr_id 
)

Definition at line 219 of file class.ilCourseParticipants.php.

References $ilUser, sendNotificationToAdmins(), sendSubscriptionRequestToAdmins(), ilCourseMembershipMailNotification\TYPE_ACCEPTED_SUBSCRIPTION_MEMBER, ilCourseMembershipMailNotification\TYPE_ADMISSION_MEMBER, ilCourseMembershipMailNotification\TYPE_BLOCKED_MEMBER, ilCourseMembershipMailNotification\TYPE_DISMISS_MEMBER, ilCourseMembershipMailNotification\TYPE_REFUSED_SUBSCRIPTION_MEMBER, ilCourseMembershipMailNotification\TYPE_STATUS_CHANGED, ilCourseMembershipMailNotification\TYPE_SUBSCRIBE_MEMBER, ilCourseMembershipMailNotification\TYPE_UNBLOCKED_MEMBER, ilCourseMembershipMailNotification\TYPE_UNSUBSCRIBE_MEMBER, and ilCourseMembershipMailNotification\TYPE_WAITING_LIST_MEMBER.

220  {
221  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
222 
223  global $ilObjDataCache,$ilUser;
224 
225  switch($a_type)
226  {
227  case $this->NOTIFY_DISMISS_SUBSCRIBER:
230  $mail->setRefId($this->ref_id);
231  $mail->setRecipients(array($a_usr_id));
232  $mail->send();
233  break;
234 
235  case $this->NOTIFY_ACCEPT_SUBSCRIBER:
238  $mail->setRefId($this->ref_id);
239  $mail->setRecipients(array($a_usr_id));
240  $mail->send();
241  break;
242 
243  case $this->NOTIFY_DISMISS_MEMBER:
246  $mail->setRefId($this->ref_id);
247  $mail->setRecipients(array($a_usr_id));
248  $mail->send();
249  break;
250 
251  case $this->NOTIFY_BLOCK_MEMBER:
254  $mail->setRefId($this->ref_id);
255  $mail->setRecipients(array($a_usr_id));
256  $mail->send();
257  break;
258 
259  case $this->NOTIFY_UNBLOCK_MEMBER:
262  $mail->setRefId($this->ref_id);
263  $mail->setRecipients(array($a_usr_id));
264  $mail->send();
265  break;
266 
267  case $this->NOTIFY_ACCEPT_USER:
270  $mail->setRefId($this->ref_id);
271  $mail->setRecipients(array($a_usr_id));
272  $mail->send();
273  break;
274 
275  case $this->NOTIFY_STATUS_CHANGED:
278  $mail->setRefId($this->ref_id);
279  $mail->setRecipients(array($a_usr_id));
280  $mail->send();
281  break;
282 
283  case $this->NOTIFY_UNSUBSCRIBE:
286  $mail->setRefId($this->ref_id);
287  $mail->setRecipients(array($a_usr_id));
288  $mail->send();
289  break;
290 
291  case $this->NOTIFY_REGISTERED:
294  $mail->setRefId($this->ref_id);
295  $mail->setRecipients(array($a_usr_id));
296  $mail->send();
297  break;
298 
299  case $this->NOTIFY_WAITING_LIST:
300  include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
301  $wl = new ilCourseWaitingList($this->obj_id);
302  $pos = $wl->getPosition($a_usr_id);
303 
306  $mail->setRefId($this->ref_id);
307  $mail->setRecipients(array($a_usr_id));
308  $mail->setAdditionalInformation(array('position' => $pos));
309  $mail->send();
310  break;
311 
312  case $this->NOTIFY_SUBSCRIPTION_REQUEST:
313  $this->sendSubscriptionRequestToAdmins($a_usr_id);
314  break;
315 
316  case $this->NOTIFY_ADMINS:
317  $this->sendNotificationToAdmins($a_usr_id);
318  return true;
319  break;
320  }
321  return true;
322  }
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ sendNotificationToAdmins()

ilCourseParticipants::sendNotificationToAdmins (   $a_usr_id)

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

References ilParticipants\$ilDB, ilParticipants\getNotificationRecipients(), and ilCourseMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION.

Referenced by sendNotification().

355  {
356  global $ilDB,$ilObjDataCache;
357 
358  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
361  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
362  $mail->setRefId($this->ref_id);
363  $mail->setRecipients($this->getNotificationRecipients());
364  $mail->send();
365  return true;
366  }
getNotificationRecipients()
Get admin, tutor which have notification enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendSubscriptionRequestToAdmins()

ilCourseParticipants::sendSubscriptionRequestToAdmins (   $a_usr_id)

Definition at line 339 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, ilParticipants\getNotificationRecipients(), and ilCourseMembershipMailNotification\TYPE_NOTIFICATION_REGISTRATION_REQUEST.

Referenced by sendNotification().

340  {
341  global $ilDB,$ilObjDataCache;
342 
343  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
346  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
347  $mail->setRefId($this->ref_id);
348  $mail->setRecipients($this->getNotificationRecipients());
349  $mail->send();
350  return true;
351  }
getNotificationRecipients()
Get admin, tutor which have notification enabled.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sendUnsubscribeNotificationToAdmins()

ilCourseParticipants::sendUnsubscribeNotificationToAdmins (   $a_usr_id)

Definition at line 324 of file class.ilCourseParticipants.php.

References ilParticipants\$ilDB, ilParticipants\getNotificationRecipients(), and ilCourseMembershipMailNotification\TYPE_NOTIFICATION_UNSUBSCRIBE.

325  {
326  global $ilDB,$ilObjDataCache;
327 
328  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
331  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
332  $mail->setRefId($this->ref_id);
333  $mail->setRecipients($this->getNotificationRecipients());
334  $mail->send();
335  return true;
336  }
getNotificationRecipients()
Get admin, tutor which have notification enabled.
+ Here is the call graph for this function:

◆ updatePassed()

ilCourseParticipants::updatePassed (   $a_usr_id,
  $a_passed,
  $a_manual = false,
  $a_no_origin = false 
)

Update passed status.

public

Parameters
int$usr_id
bool$passed
bool$a_manual
bool$a_no_origin

Definition at line 121 of file class.ilCourseParticipants.php.

122  {
123  $this->participants_status[$a_usr_id]['passed'] = (int) $a_passed;
124 
125  return self::_updatePassed($this->obj_id, $a_usr_id, $a_passed, $a_manual, $a_no_origin);
126  }

Field Documentation

◆ $instances

ilCourseParticipants::$instances = array()
staticprotected

Definition at line 37 of file class.ilCourseParticipants.php.


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