19 declare(strict_types=0);
57 self::TYPE_NOTIFICATION_REGISTRATION,
58 self::TYPE_NOTIFICATION_REGISTRATION_REQUEST,
59 self::TYPE_NOTIFICATION_UNSUBSCRIBE
70 $this->setting = $DIC->settings();
80 $this->mail = $this->mail->withContextParameters([
96 $this->force_sending_mail = $a_status;
99 public function send(): bool
103 in_array($this->
getType(), array(self::TYPE_ADMISSION_MEMBER))) {
106 if ($obj->getAutoNotification() ==
false) {
107 if (!$this->force_sending_mail) {
119 case self::TYPE_ADMISSION_MEMBER:
136 $this->
getMail()->appendInstallationSignature(
true);
142 case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER:
159 $this->
getMail()->appendInstallationSignature(
true);
165 case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER:
179 $this->
getMail()->appendInstallationSignature(
true);
185 case self::TYPE_STATUS_CHANGED:
206 $this->
getMail()->appendInstallationSignature(
true);
212 case self::TYPE_DISMISS_MEMBER:
225 $this->
getMail()->appendInstallationSignature(
true);
230 case self::TYPE_BLOCKED_MEMBER:
243 $this->
getMail()->appendInstallationSignature(
true);
248 case self::TYPE_UNBLOCKED_MEMBER:
266 $this->
getMail()->appendInstallationSignature(
true);
272 case self::TYPE_NOTIFICATION_REGISTRATION:
299 $this->
getMail()->appendInstallationSignature(
true);
304 case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST:
331 $this->
getMail()->appendInstallationSignature(
true);
336 case self::TYPE_NOTIFICATION_UNSUBSCRIBE:
363 $this->
getMail()->appendInstallationSignature(
true);
368 case self::TYPE_UNSUBSCRIBE_MEMBER:
382 $this->
getMail()->appendInstallationSignature(
true);
387 case self::TYPE_SUBSCRIBE_MEMBER:
405 $this->
getMail()->appendInstallationSignature(
true);
411 case self::TYPE_WAITING_LIST_MEMBER:
430 $this->
getMail()->appendInstallationSignature(
true);
440 parent::initLanguage($a_usr_id);
451 if ($part->isAdmin($a_usr_id)) {
453 } elseif ($part->isTutor($a_usr_id)) {
459 if ($part->isAdmin($a_usr_id) || $part->isTutor($a_usr_id)) {
462 if ($part->isNotificationEnabled($a_usr_id)) {
470 if ($part->isBlocked($a_usr_id)) {
479 if ($part->hasPassed($a_usr_id)) {
494 $this->force_sending_mail ||
495 $this->setting->get(
'mail_crs_member_notification',
'1') ||
496 in_array($a_type, $this->permanent_enabled_notifications);
const TYPE_NOTIFICATION_UNSUBSCRIBE
const TYPE_ADMISSION_MEMBER
appendBody(string $a_body)
initLanguage(int $a_usr_id)
const TYPE_STATUS_CHANGED
const TYPE_BLOCKED_MEMBER
const TYPE_ACCEPTED_SUBSCRIPTION_MEMBER
isNotificationTypeEnabled(int $a_type)
get setting "mail_crs_member_notification" and excludes types which are not affected by this setting ...
const TYPE_WAITING_LIST_MEMBER
sendMail(array $a_rcp, bool $a_parse_recipients=true)
createCourseStatus(int $a_usr_id)
const TYPE_DISMISS_MEMBER
const PROP_CONTEXT_SUBJECT_PREFIX
const TYPE_REFUSED_SUBSCRIPTION_MEMBER
const TYPE_NOTIFICATION_REGISTRATION_REQUEST
const TYPE_UNBLOCKED_MEMBER
const TYPE_NOTIFICATION_ADMINS
static _lookupObjId(int $ref_id)
userToString(int $a_usr_id)
getAdditionalInformation()
const EXTERNAL_MAIL_PREFIX
static _getInstanceByObjId(int $a_obj_id)
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
forceSendingMail(bool $a_status)
Force sending mail independent from global setting.
const TYPE_NOTIFICATION_ADMINS_REGISTRATION_REQUEST
getLanguageText(string $a_keyword)
const TYPE_NOTIFICATION_REGISTRATION
getObjectTitle(bool $a_shorten=false)
createPermanentLink(array $a_params=[], string $a_append='')
__construct(Container $dic, ilPlugin $plugin)
setSubject(string $a_subject)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
array $permanent_enabled_notifications
Notifications which are not affected by "mail_crs_member_notification" setting because they addresses...
const TYPE_UNSUBSCRIBE_MEMBER
const TYPE_SUBSCRIBE_MEMBER