ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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...
 
 addSubscriber ($a_usr_id)
 
 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_component_name, $a_obj_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...
 
 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)
 

Data Fields

const COMPONENT_NAME = 'Modules/Course'
 

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()
 
 $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 48 of file class.ilCourseParticipants.php.

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

Member Function Documentation

◆ __buildStatusBody()

ilCourseParticipants::__buildStatusBody ( $user_obj)

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

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

389  {
390  global $ilDB;
391 
392  $body = $this->lng->txt('crs_status_changed_body')."\n";
393  $body .= $this->lng->txt('login').': '.$user_obj->getLogin()."\n";
394  $body .= $this->lng->txt('role').': ';
395 
396  if($this->isAdmin($user_obj->getId()))
397  {
398  $body .= $this->lng->txt('crs_admin')."\n";
399  }
400  if($this->isTutor($user_obj->getId()))
401  {
402  $body .= $this->lng->txt('crs_tutor')."\n";
403  }
404  if($this->isMember($user_obj->getId()))
405  {
406  $body .= $this->lng->txt('crs_member')."\n";
407  }
408  $body .= $this->lng->txt('status').': ';
409 
410  if($this->isNotificationEnabled($user_obj->getId()))
411  {
412  $body .= $this->lng->txt("crs_notify")."\n";
413  }
414  else
415  {
416  $body .= $this->lng->txt("crs_no_notify")."\n";
417  }
418  if($this->isBlocked($user_obj->getId()))
419  {
420  $body .= $this->lng->txt("crs_blocked")."\n";
421  }
422  else
423  {
424  $body .= $this->lng->txt("crs_unblocked")."\n";
425  }
426  $passed = $this->hasPassed($user_obj->getId()) ? $this->lng->txt('yes') : $this->lng->txt('no');
427  $body .= $this->lng->txt('crs_passed').': '.$passed."\n";
428 
429  return $body;
430  }
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 77 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(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjCourse\register(), ilObjCourseGUI\removeMembersObject(), ilMembershipTest\testSubscription(), and ilObjCourseGUI\updateMembersObject().

78  {
79  if(isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id])
80  {
81  return self::$instances[$a_obj_id];
82  }
83  return self::$instances[$a_obj_id] = new ilCourseParticipants($a_obj_id);
84  }
+ 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 157 of file class.ilCourseParticipants.php.

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

Referenced by ilCourseAppEventListener\handleEvent().

158  {
159  global $ilDB, $ilUser;
160 
161  // #11600
162  $origin = -1;
163  if($a_manual)
164  {
165  $origin = $ilUser->getId();
166  }
167 
168  $query = "SELECT passed FROM obj_members ".
169  "WHERE obj_id = ".$ilDB->quote($a_obj_id,'integer')." ".
170  "AND usr_id = ".$ilDB->quote($a_usr_id,'integer');
171  $res = $ilDB->query($query);
172  if($res->numRows())
173  {
174  // #9284 - only needs updating when status has changed
175  $old = $ilDB->fetchAssoc($res);
176  if((int)$old["passed"] != (int)$a_passed)
177  {
178  $query = "UPDATE obj_members SET ".
179  "passed = ".$ilDB->quote((int) $a_passed,'integer').", ".
180  "origin = ".$ilDB->quote($origin,'integer').", ".
181  "origin_ts = ".$ilDB->quote(time(),'integer')." ".
182  "WHERE obj_id = ".$ilDB->quote($a_obj_id,'integer')." ".
183  "AND usr_id = ".$ilDB->quote($a_usr_id,'integer');
184  }
185  }
186  else
187  {
188  // when member is added we should not set any date
189  // see ilObjCourse::checkLPStatusSync()
190  if($a_no_origin && !$a_passed)
191  {
192  $origin = 0;
193  $origin_ts = 0;
194  }
195  else
196  {
197  $origin_ts = time();
198  }
199 
200  $query = "INSERT INTO obj_members (passed,obj_id,usr_id,notification,blocked,origin,origin_ts) ".
201  "VALUES ( ".
202  $ilDB->quote((int) $a_passed,'integer').", ".
203  $ilDB->quote($a_obj_id,'integer').", ".
204  $ilDB->quote($a_usr_id,'integer').", ".
205  $ilDB->quote(0,'integer').", ".
206  $ilDB->quote(0,'integer').", ".
207  $ilDB->quote($origin,'integer').", ".
208  $ilDB->quote($origin_ts,'integer').")";
209  }
210  $res = $ilDB->manipulate($query);
211  return true;
212  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ addSubscriber()

ilCourseParticipants::addSubscriber (   $a_usr_id)

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

References $ilLog, and ilParticipants\getObjId().

115  {
116  global $ilAppEventHandler, $ilLog;
117 
118  parent::addSubscriber($a_usr_id);
119 
120  $ilLog->write(__METHOD__.': Raise new event: Modules/Course addSubscriber');
121  $ilAppEventHandler->raise(
122  "Modules/Course",
123  'addSubscriber',
124  array(
125  'obj_id' => $this->getObjId(),
126  'usr_id' => $a_usr_id
127  )
128  );
129  }
getObjId()
get current obj_id
+ Here is the call graph for this function:

◆ getDateTimeOfPassed()

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

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

References ilParticipants\$ilDB, and $res.

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

433  {
434  global $ilDB;
435 
436  $sql = "SELECT origin_ts FROM obj_members".
437  " WHERE usr_id = ".$ilDB->quote($a_usr_id, "integer").
438  " AND obj_id = ".$ilDB->quote($a_obj_id, "integer").
439  " AND passed = ".$ilDB->quote(1, "integer");
440  $res = $ilDB->query($sql);
441  $res = $ilDB->fetchAssoc($res);
442  if($res["origin_ts"])
443  {
444  return date("Y-m-d H:i:s", $res["origin_ts"]);
445  }
446  }
+ 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 90 of file class.ilCourseParticipants.php.

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

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

91  {
92  global $rbacreview;
93 
94  $lrol = $rbacreview->getRolesOfRoleFolder($a_ref_id,false);
95 
96  $roles = array();
97  foreach($lrol as $role)
98  {
99  $title = ilObject::_lookupTitle($role);
100  switch(substr($title,0,8))
101  {
102  case 'il_crs_a':
103  case 'il_crs_t':
104  case 'il_crs_m':
105  continue;
106 
107  default:
108  $roles[$role] = $role;
109  }
110  }
111  return $roles;
112  }
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 220 of file class.ilCourseParticipants.php.

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

221  {
222  global $ilDB;
223 
224  $sql = "SELECT origin, origin_ts".
225  " FROM obj_members".
226  " WHERE obj_id = ".$ilDB->quote($this->obj_id, "integer").
227  " AND usr_id = ".$ilDB->quote($a_usr_id, "integer");
228  $set = $ilDB->query($sql);
229  $row = $ilDB->fetchAssoc($set);
230  if($row["origin"])
231  {
232  return array("user_id" => $row["origin"],
233  "timestamp" => new ilDateTime($row["origin_ts"], IL_CAL_UNIX));
234  }
235  }
const IL_CAL_UNIX
Date and time handling

◆ getPassedUsersForObjects()

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

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

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

Referenced by ilCourseCertificateAdapter\_preloadListData().

449  {
450  global $ilDB;
451 
452  $res = array();
453 
454  $sql = "SELECT usr_id,obj_id FROM obj_members".
455  " WHERE ".$ilDB->in("usr_id", $a_usr_ids, "", "integer").
456  " AND ".$ilDB->in("obj_id", $a_obj_ids, "", "integer").
457  " AND passed = ".$ilDB->quote(1, "integer");
458  $set = $ilDB->query($sql);
459  while($row = $ilDB->fetchAssoc($set))
460  {
461  $res[] = $row;
462  }
463 
464  return $res;
465  }
+ Here is the caller graph for this function:

◆ sendNotification()

ilCourseParticipants::sendNotification (   $a_type,
  $a_usr_id 
)

Definition at line 238 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.

239  {
240  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
241 
242  global $ilObjDataCache,$ilUser;
243 
244  switch($a_type)
245  {
246  case $this->NOTIFY_DISMISS_SUBSCRIBER:
249  $mail->setRefId($this->ref_id);
250  $mail->setRecipients(array($a_usr_id));
251  $mail->send();
252  break;
253 
254  case $this->NOTIFY_ACCEPT_SUBSCRIBER:
257  $mail->setRefId($this->ref_id);
258  $mail->setRecipients(array($a_usr_id));
259  $mail->send();
260  break;
261 
262  case $this->NOTIFY_DISMISS_MEMBER:
265  $mail->setRefId($this->ref_id);
266  $mail->setRecipients(array($a_usr_id));
267  $mail->send();
268  break;
269 
270  case $this->NOTIFY_BLOCK_MEMBER:
273  $mail->setRefId($this->ref_id);
274  $mail->setRecipients(array($a_usr_id));
275  $mail->send();
276  break;
277 
278  case $this->NOTIFY_UNBLOCK_MEMBER:
281  $mail->setRefId($this->ref_id);
282  $mail->setRecipients(array($a_usr_id));
283  $mail->send();
284  break;
285 
286  case $this->NOTIFY_ACCEPT_USER:
289  $mail->setRefId($this->ref_id);
290  $mail->setRecipients(array($a_usr_id));
291  $mail->send();
292  break;
293 
294  case $this->NOTIFY_STATUS_CHANGED:
297  $mail->setRefId($this->ref_id);
298  $mail->setRecipients(array($a_usr_id));
299  $mail->send();
300  break;
301 
302  case $this->NOTIFY_UNSUBSCRIBE:
305  $mail->setRefId($this->ref_id);
306  $mail->setRecipients(array($a_usr_id));
307  $mail->send();
308  break;
309 
310  case $this->NOTIFY_REGISTERED:
313  $mail->setRefId($this->ref_id);
314  $mail->setRecipients(array($a_usr_id));
315  $mail->send();
316  break;
317 
318  case $this->NOTIFY_WAITING_LIST:
319  include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
320  $wl = new ilCourseWaitingList($this->obj_id);
321  $pos = $wl->getPosition($a_usr_id);
322 
325  $mail->setRefId($this->ref_id);
326  $mail->setRecipients(array($a_usr_id));
327  $mail->setAdditionalInformation(array('position' => $pos));
328  $mail->send();
329  break;
330 
331  case $this->NOTIFY_SUBSCRIPTION_REQUEST:
332  $this->sendSubscriptionRequestToAdmins($a_usr_id);
333  break;
334 
335  case $this->NOTIFY_ADMINS:
336  $this->sendNotificationToAdmins($a_usr_id);
337  return true;
338  break;
339  }
340  return true;
341  }
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ sendNotificationToAdmins()

ilCourseParticipants::sendNotificationToAdmins (   $a_usr_id)

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

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

Referenced by sendNotification().

374  {
375  global $ilDB,$ilObjDataCache;
376 
377  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
380  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
381  $mail->setRefId($this->ref_id);
382  $mail->setRecipients($this->getNotificationRecipients());
383  $mail->send();
384  return true;
385  }
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 358 of file class.ilCourseParticipants.php.

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

Referenced by sendNotification().

359  {
360  global $ilDB,$ilObjDataCache;
361 
362  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
365  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
366  $mail->setRefId($this->ref_id);
367  $mail->setRecipients($this->getNotificationRecipients());
368  $mail->send();
369  return true;
370  }
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 343 of file class.ilCourseParticipants.php.

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

344  {
345  global $ilDB,$ilObjDataCache;
346 
347  include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
350  $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
351  $mail->setRefId($this->ref_id);
352  $mail->setRecipients($this->getNotificationRecipients());
353  $mail->send();
354  return true;
355  }
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 140 of file class.ilCourseParticipants.php.

141  {
142  $this->participants_status[$a_usr_id]['passed'] = (int) $a_passed;
143 
144  return self::_updatePassed($this->obj_id, $a_usr_id, $a_passed, $a_manual, $a_no_origin);
145  }

Field Documentation

◆ $instances

ilCourseParticipants::$instances = array()
staticprotected

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

◆ COMPONENT_NAME

const ilCourseParticipants::COMPONENT_NAME = 'Modules/Course'

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


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