19declare(strict_types=1);
45 $clone->receiver = $member;
46 $clone->ref_id = $member->
assessment()->getRefId();
56 $clone->occasion = self::OCCASION_FAILED;
66 $clone->occasion = self::OCCASION_COMPLETED;
73 public function send(): void
77 !in_array($this->occasion, array(self::OCCASION_COMPLETED, self::OCCASION_FAILED))
81 $this->initLanguage($this->receiver->id());
83 $subject = $this->occasion === self::OCCASION_COMPLETED
84 ? $this->getLanguageText(
'iass_subj_notification_completed')
85 : $this->getLanguageText(
'iass_subj_notification_failed');
86 $message = $this->occasion === self::OCCASION_COMPLETED
87 ? $this->getLanguageText(
'iass_mess_notification_completed')
88 : $this->getLanguageText(
'iass_mess_notification_failed');
89 $assessment_title = $this->receiver->assessment()->getTitle();
91 sprintf($subject, $assessment_title)
94 $this->appendBody(
"\n\n");
95 $this->appendBody(sprintf(
$message, $assessment_title));
96 $this->appendBody(
"\n\n");
97 $this->appendBody($this->receiver->record());
98 $this->appendBody(
"\n\n");
99 $this->appendBody($this->createPermanentLink());
100 $this->getMail()->appendInstallationSignature(
true);
101 $this->sendMail(array($this->receiver->id()));
Edit the record of a user, set LP.
Notifies user, using internal mail system.
withOccasionFailed()
Set message mode to failed.
withReceiver(ilIndividualAssessmentMember $member)
Define the member, that should receive the message.
withOccasionCompleted()
Set message mode to complete.
ilIndividualAssessmentMember $receiver
setLangModules(array $a_modules)
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
Basic method collection should be implemented by a notificator used by Individual assessment.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc