ILIAS  release_7 Revision v7.30-3-g800a261c036
ilCourseParticipants Class Reference
+ Inheritance diagram for ilCourseParticipants:
+ Collaboration diagram for ilCourseParticipants:

Public Member Functions

 __construct ($a_obj_id)
 Singleton constructor. More...
 
 add ($a_usr_id, $a_role)
 Add user to role. More...
 
 addSubscriber ($a_usr_id)
 Add subscriber. 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, $a_force_sending_mail=false)
 
 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_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 @global 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...
 
 addRecommendation ($a_usr_id)
 Add 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. 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 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 canSendMailToMembers ( $ref_id_or_instance, ?int $usr_id=null, ?int $mail_obj_ref_id=null)
 This method was introduced as a band-aid fix for #22764. 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 @global ilRbacReview $rbacreview @global <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/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()
 
 $roles_sorted = []
 
 $role_assignments = []
 
 $participants = array()
 
 $participants_status = array()
 
 $members = array()
 
 $tutors = array()
 
 $admins = array()
 
 $subscribers = array()
 
 $ilDB
 
 $lng
 
 $logger = null
 
 $recommended_content_manager
 

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.

@access protected

Parameters
intobj_id of container

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

49 {
50 $this->NOTIFY_DISMISS_SUBSCRIBER = 1;
51 $this->NOTIFY_ACCEPT_SUBSCRIBER = 2;
52 $this->NOTIFY_DISMISS_MEMBER = 3;
53 $this->NOTIFY_BLOCK_MEMBER = 4;
54 $this->NOTIFY_UNBLOCK_MEMBER = 5;
55 $this->NOTIFY_ACCEPT_USER = 6;
56 $this->NOTIFY_ADMINS = 7;
57 $this->NOTIFY_STATUS_CHANGED = 8;
58 $this->NOTIFY_SUBSCRIPTION_REQUEST = 9;
59
60 $this->NOTIFY_REGISTERED = 10;
61 $this->NOTIFY_UNSUBSCRIBE = 11;
62 $this->NOTIFY_WAITING_LIST = 12;
63
64 // ref based constructor
65 $refs = ilObject::_getAllReferences($a_obj_id);
66 parent::__construct(self::COMPONENT_NAME, array_pop($refs));
67 }
static _getAllReferences($a_id)
get all reference ids of object
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct(), and ilObject\_getAllReferences().

+ Here is the call graph for this function:

Member Function Documentation

◆ __buildStatusBody()

ilCourseParticipants::__buildStatusBody ( $user_obj)

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

421 {
422 global $DIC;
423
424 $ilDB = $DIC['ilDB'];
425
426 $body = $this->lng->txt('crs_status_changed_body') . "\n";
427 $body .= $this->lng->txt('login') . ': ' . $user_obj->getLogin() . "\n";
428 $body .= $this->lng->txt('role') . ': ';
429
430 if ($this->isAdmin($user_obj->getId())) {
431 $body .= $this->lng->txt('crs_admin') . "\n";
432 }
433 if ($this->isTutor($user_obj->getId())) {
434 $body .= $this->lng->txt('crs_tutor') . "\n";
435 }
436 if ($this->isMember($user_obj->getId())) {
437 $body .= $this->lng->txt('crs_member') . "\n";
438 }
439 $body .= $this->lng->txt('status') . ': ';
440
441 if ($this->isNotificationEnabled($user_obj->getId())) {
442 $body .= $this->lng->txt("crs_notify") . "\n";
443 } else {
444 $body .= $this->lng->txt("crs_no_notify") . "\n";
445 }
446 if ($this->isBlocked($user_obj->getId())) {
447 $body .= $this->lng->txt("crs_blocked") . "\n";
448 } else {
449 $body .= $this->lng->txt("crs_unblocked") . "\n";
450 }
451 $passed = $this->hasPassed($user_obj->getId()) ? $this->lng->txt('yes') : $this->lng->txt('no');
452 $body .= $this->lng->txt('crs_passed') . ': ' . $passed . "\n";
453
454 return $body;
455 }
isTutor($a_usr_id)
is user tutor
isMember($a_usr_id)
is user member
isAdmin($a_usr_id)
is user admin
isNotificationEnabled($a_usr_id)
check if notification is enabled
hasPassed($a_usr_id)
Check if user has passed course.
isBlocked($a_usr_id)
Check if user is blocked.
global $DIC
Definition: goto.php:24

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

+ Here is the call graph for this function:

◆ _getInstanceByObjId()

static ilCourseParticipants::_getInstanceByObjId (   $a_obj_id)
static

Get singleton instance.

@access public

Parameters
intobj_id

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

78 {
79 if (isset(self::$instances[$a_obj_id]) and self::$instances[$a_obj_id]) {
80 return self::$instances[$a_obj_id];
81 }
82 return self::$instances[$a_obj_id] = new ilCourseParticipants($a_obj_id);
83 }

Referenced by ilCourseXMLParser\__construct(), ilCourseEditParticipantsTableGUI\__construct(), ilCourseObjectiveResult\__updatePassed(), ilObjCourseAccess\_checkAccess(), ilObjCourseGrouping\_checkGroupingDependencies(), ilObjCourseGUI\afterImport(), ilSoapCourseAdministration\assignCourseMember(), ilPortfolioAccessHandler\checkAccessOfUser(), ilWorkspaceAccessHandler\checkAccessOfUser(), ilForumNotification\checkParentNodeTree(), ilCourseMembershipMailNotification\createCourseStatus(), ilSoapCourseAdministration\excludeCourseMember(), ilObjCourseGUI\executeCommand(), ilObjGroupGUI\executeCommand(), ilUserImportParser\getCourseMembersObjectForRole(), ilCalendarBlockGUI\getHTML(), ilParticipants\getInstanceByObjId(), ilCourseParticipantsGroupsTableGUI\getItems(), ilLPStatusCollection\getMembers(), ilLPStatusObjectives\getMembers(), ilCourseLP\getMembers(), ilNotification\getNotificationsForObject(), ilMembershipNotifications\getParticipants(), ilBadgeHandler\getUserIds(), ilObjSessionGUI\initContainer(), ilObjCourse\initCourseMembersObject(), ilMemberExport\initMembers(), ilCourseRegistrationGUI\initParticipants(), ilSoapCourseAdministration\isAssignedToCourse(), ilCalendarCategories\readAllConsultationHoursCalendarOfContainer(), ilECSCmsCourseMemberCommandQueueHandler\refreshAssignmentStatus(), ilObjCourse\register(), and ilMembershipTest\testSubscription().

+ Here is the caller graph for this function:

◆ add()

ilCourseParticipants::add (   $a_usr_id,
  $a_role 
)

Add user to role.

Parameters
int$a_usr_id
int$a_role

Reimplemented from ilParticipants.

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

91 {
92 if (parent::add($a_usr_id, $a_role)) {
93 $this->addRecommendation($a_usr_id);
94 return true;
95 }
96 return false;
97 }
add()
Definition: add.php:2
addRecommendation($a_usr_id)
Add desktop item.

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

+ Here is the call graph for this function:

◆ addSubscriber()

ilCourseParticipants::addSubscriber (   $a_usr_id)

Add subscriber.

@access public

Reimplemented from ilParticipants.

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

128 {
129 global $DIC;
130
131 $ilAppEventHandler = $DIC['ilAppEventHandler'];
132 $ilLog = $DIC['ilLog'];
133
134 parent::addSubscriber($a_usr_id);
135
136 $ilLog->write(__METHOD__ . ': Raise new event: Modules/Course addSubscriber');
137 $ilAppEventHandler->raise(
138 "Modules/Course",
139 'addSubscriber',
140 array(
141 'obj_id' => $this->getObjId(),
142 'usr_id' => $a_usr_id
143 )
144 );
145 }
getObjId()
get current obj_id

References $DIC, and ilParticipants\getObjId().

+ Here is the call graph for this function:

◆ getDateTimeOfPassed()

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

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

458 {
459 global $DIC;
460
461 $ilDB = $DIC['ilDB'];
462
463 $sql = "SELECT origin_ts FROM obj_members" .
464 " WHERE usr_id = " . $ilDB->quote($a_usr_id, "integer") .
465 " AND obj_id = " . $ilDB->quote($a_obj_id, "integer") .
466 " AND passed = " . $ilDB->quote(1, "integer");
467 $res = $ilDB->query($sql);
468 $res = $ilDB->fetchAssoc($res);
469 if ($res["origin_ts"]) {
470 return date("Y-m-d H:i:s", $res["origin_ts"]);
471 }
472 }
foreach($_POST as $key=> $value) $res

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

Referenced by ilCertificateParticipantsHelper\getDateTimeOfPassed().

+ 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 103 of file class.ilCourseParticipants.php.

104 {
105 global $DIC;
106
107 $rbacreview = $DIC['rbacreview'];
108
109 $lrol = $rbacreview->getRolesOfRoleFolder($a_ref_id, false);
110
111 $roles = array();
112 foreach ($lrol as $role) {
113 $title = ilObject::_lookupTitle($role);
114 switch (substr($title, 0, 8)) {
115 case 'il_crs_a':
116 case 'il_crs_t':
117 case 'il_crs_m':
118 continue 2;
119
120 default:
121 $roles[$role] = $role;
122 }
123 }
124 return $roles;
125 }
static _lookupTitle($a_id)
lookup object title

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

Referenced by ilObjCourseGUI\setShowHidePrefs().

+ 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 248 of file class.ilCourseParticipants.php.

249 {
250 global $DIC;
251
252 $ilDB = $DIC['ilDB'];
253
254 $sql = "SELECT origin, origin_ts" .
255 " FROM obj_members" .
256 " WHERE obj_id = " . $ilDB->quote($this->obj_id, "integer") .
257 " AND usr_id = " . $ilDB->quote($a_usr_id, "integer");
258 $set = $ilDB->query($sql);
259 $row = $ilDB->fetchAssoc($set);
260 if ($row["origin"]) {
261 return array("user_id" => $row["origin"],
262 "timestamp" => new ilDateTime($row["origin_ts"], IL_CAL_UNIX));
263 }
264 }
const IL_CAL_UNIX
@classDescription Date and time handling

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

◆ getPassedUsersForObjects()

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

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

475 {
476 global $DIC;
477
478 $ilDB = $DIC['ilDB'];
479
480 $res = array();
481
482 $sql = "SELECT usr_id,obj_id FROM obj_members" .
483 " WHERE " . $ilDB->in("usr_id", $a_usr_ids, "", "integer") .
484 " AND " . $ilDB->in("obj_id", $a_obj_ids, "", "integer") .
485 " AND passed = " . $ilDB->quote(1, "integer");
486 $set = $ilDB->query($sql);
487 while ($row = $ilDB->fetchAssoc($set)) {
488 $res[] = $row;
489 }
490
491 return $res;
492 }

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

◆ sendNotification()

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

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

268 {
269 global $DIC;
270
271 $ilObjDataCache = $DIC['ilObjDataCache'];
272 $ilUser = $DIC['ilUser'];
273
274 include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
276 $mail->forceSendingMail($a_force_sending_mail);
277
278 switch ($a_type) {
279 case $this->NOTIFY_DISMISS_SUBSCRIBER:
281 $mail->setRefId($this->ref_id);
282 $mail->setRecipients(array($a_usr_id));
283 $mail->send();
284 break;
285
286 case $this->NOTIFY_ACCEPT_SUBSCRIBER:
288 $mail->setRefId($this->ref_id);
289 $mail->setRecipients(array($a_usr_id));
290 $mail->send();
291 break;
292
293 case $this->NOTIFY_DISMISS_MEMBER:
295 $mail->setRefId($this->ref_id);
296 $mail->setRecipients(array($a_usr_id));
297 $mail->send();
298 break;
299
300 case $this->NOTIFY_BLOCK_MEMBER:
302 $mail->setRefId($this->ref_id);
303 $mail->setRecipients(array($a_usr_id));
304 $mail->send();
305 break;
306
307 case $this->NOTIFY_UNBLOCK_MEMBER:
309 $mail->setRefId($this->ref_id);
310 $mail->setRecipients(array($a_usr_id));
311 $mail->send();
312 break;
313
314 case $this->NOTIFY_ACCEPT_USER:
316 $mail->setRefId($this->ref_id);
317 $mail->setRecipients(array($a_usr_id));
318 $mail->send();
319 break;
320
321 case $this->NOTIFY_STATUS_CHANGED:
323 $mail->setRefId($this->ref_id);
324 $mail->setRecipients(array($a_usr_id));
325 $mail->send();
326 break;
327
328 case $this->NOTIFY_UNSUBSCRIBE:
330 $mail->setRefId($this->ref_id);
331 $mail->setRecipients(array($a_usr_id));
332 $mail->send();
333 break;
334
335 case $this->NOTIFY_REGISTERED:
337 $mail->setRefId($this->ref_id);
338 $mail->setRecipients(array($a_usr_id));
339 $mail->send();
340 break;
341
342 case $this->NOTIFY_WAITING_LIST:
343 include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
344 $wl = new ilCourseWaitingList($this->obj_id);
345 $pos = $wl->getPosition($a_usr_id);
346
348 $mail->setRefId($this->ref_id);
349 $mail->setRecipients(array($a_usr_id));
350 $mail->setAdditionalInformation(array('position' => $pos));
351 $mail->send();
352 break;
353
354 case $this->NOTIFY_SUBSCRIPTION_REQUEST:
355 $this->sendSubscriptionRequestToAdmins($a_usr_id);
356 break;
357
358 case $this->NOTIFY_ADMINS:
359 $this->sendNotificationToAdmins($a_usr_id);
360 return true;
361 break;
362 }
363 return true;
364 }
$ilUser
Definition: imgupload.php:18

References $DIC, $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.

+ Here is the call graph for this function:

◆ sendNotificationToAdmins()

ilCourseParticipants::sendNotificationToAdmins (   $a_usr_id)

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

403 {
404 global $DIC;
405
406 $ilDB = $DIC['ilDB'];
407 $ilObjDataCache = $DIC['ilObjDataCache'];
408
409 include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
412 $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
413 $mail->setRefId($this->ref_id);
414 $mail->setRecipients($this->getNotificationRecipients());
415 $mail->send();
416 return true;
417 }
getNotificationRecipients()
Get admin, tutor which have notification enabled.

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

Referenced by sendNotification().

+ 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 384 of file class.ilCourseParticipants.php.

385 {
386 global $DIC;
387
388 $ilDB = $DIC['ilDB'];
389 $ilObjDataCache = $DIC['ilObjDataCache'];
390
391 include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
394 $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
395 $mail->setRefId($this->ref_id);
396 $mail->setRecipients($this->getNotificationRecipients());
397 $mail->send();
398 return true;
399 }

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

Referenced by sendNotification().

+ 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 366 of file class.ilCourseParticipants.php.

367 {
368 global $DIC;
369
370 $ilDB = $DIC['ilDB'];
371 $ilObjDataCache = $DIC['ilObjDataCache'];
372
373 include_once './Modules/Course/classes/class.ilCourseMembershipMailNotification.php';
376 $mail->setAdditionalInformation(array('usr_id' => $a_usr_id));
377 $mail->setRefId($this->ref_id);
378 $mail->setRecipients($this->getNotificationRecipients());
379 $mail->send();
380 return true;
381 }

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

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

@access public

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

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

157 {
158 $this->participants_status[$a_usr_id]['passed'] = (int) $a_passed;
159
160 return self::_updatePassed($this->obj_id, $a_usr_id, $a_passed, $a_manual, $a_no_origin);
161 }

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: