3 declare(strict_types=1);
53 $logger = $DIC[
"ilLoggerFactory"]->getRootLogger();
54 $app_event_handler = $DIC[
'ilAppEventHandler'];
55 $settings = $DIC[
"ilSetting"];
57 if (isset(self::$instances[$obj_id]) && self::$instances[$obj_id]) {
58 return self::$instances[
$obj_id];
73 $rbacreview = $DIC->rbac()->review();
74 $lrol = $rbacreview->getRolesOfRoleFolder($ref_id,
false);
77 foreach ($lrol as $role) {
80 switch (substr($title, 0, 8)) {
97 $rbacreview = $DIC->rbac()->review();
98 $local_roles = $rbacreview->getRolesOfRoleFolder($a_ref_id,
false);
100 return $rbacreview->isAssignedToAtLeastOneGivenRole($a_usr_id, $local_roles);
103 public function add(
int $a_usr_id,
int $a_role): bool
110 parent::addSubscriber($a_usr_id);
112 $this->
logger->info(
'Raise new event: Modules/LearningSequence addSubscriber.');
113 $this->app_event_handler->raise(
114 "Modules/LearningSequence",
118 'usr_id' => $a_usr_id
129 $mail->forceSendingMail($force_sending_mail);
134 $mail->setRefId($this->ref_id);
135 $mail->setRecipients(array($usr_id));
140 $mail->setRefId($this->ref_id);
141 $mail->setRecipients(array($usr_id));
146 $mail->setAdditionalInformation(array(
'usr_id' => $usr_id));
147 $mail->setRefId($this->ref_id);
153 $mail->setRefId($this->ref_id);
154 $mail->setRecipients(array($usr_id));
159 $mail->setAdditionalInformation(array(
'usr_id' => $usr_id));
160 $mail->setRefId($this->ref_id);
166 $mail->setRefId($this->ref_id);
167 $mail->setRecipients(array($usr_id));
172 $mail->setAdditionalInformation(array(
'usr_id' => $usr_id));
173 $mail->setRefId($this->ref_id);
179 $mail->setRefId($this->ref_id);
180 $mail->setRecipients(array($usr_id));
185 $mail->setRefId($this->ref_id);
186 $mail->setRecipients(array($usr_id));
191 $mail->setRefId($this->ref_id);
192 $mail->setRecipients(array($usr_id));
const TYPE_STATUS_CHANGED
static _getInstanceByObjId(int $obj_id)
const TYPE_NOTIFICATION_UNSUBSCRIBE
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
const TYPE_DISMISS_MEMBER
static _getAllReferences(int $id)
get all reference ids for object ID
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
add(int $a_usr_id, int $a_role)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _isParticipant(int $a_ref_id, int $a_usr_id)
const TYPE_ADMISSION_MEMBER
static _lookupTitle(int $obj_id)
const TYPE_SUBSCRIBE_MEMBER
sendNotification(int $type, int $usr_id, bool $force_sending_mail=false)
Send notification mail.
__construct(int $obj_id, ilLogger $logger, ilAppEventHandler $app_event_handler, ilSetting $settings)
Base class for course and group participants.
static getMemberRoles(int $ref_id)
__construct(Container $dic, ilPlugin $plugin)
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
ilAppEventHandler $app_event_handler
getNotificationRecipients()
Get admin, tutor which have notification enabled.
const TYPE_UNSUBSCRIBE_MEMBER
addSubscriber(int $a_usr_id)
const TYPE_NOTIFICATION_REGISTRATION