/** * * Send notifications * * @access public * */ public function send() { global $ilDB; parent::send(); if (count($this->getRecipients())) { $res = $ilDB->queryf("SELECT u.usr_id,u.gender,u.firstname,u.lastname,u.login,u.email,u.last_login,u.active," . "u.time_limit_unlimited, " . $ilDB->fromUnixtime("u.time_limit_from") . ", " . $ilDB->fromUnixtime("u.time_limit_until") . "," . "CASE WHEN u.active = 0 THEN '0001-01-01' ELSE CASE WHEN u.time_limit_unlimited=1 THEN '9999-12-31' ELSE " . $ilDB->fromUnixtime("u.time_limit_until") . " END END access_until," . " CASE WHEN " . $ilDB->unixTimestamp() . " BETWEEN u.time_limit_from AND u.time_limit_until THEN 0 ELSE 1 END expired," . "rq.role_disk_quota, system_role.rol_id role_id, " . "p1.value+0 user_disk_quota," . "p2.value+0 disk_usage, " . "p3.value last_update, " . "p5.value language, " . "CASE WHEN rq.role_disk_quota>p1.value+0 OR p1.value IS NULL THEN rq.role_disk_quota ELSE p1.value+0 END disk_quota\t" . "FROM usr_data u " . "JOIN (SELECT u.usr_id usr_id,MAX(rd.disk_quota) role_disk_quota " . "FROM usr_data u " . "JOIN rbac_ua ua ON ua.usr_id=u.usr_id " . "JOIN rbac_fa fa ON fa.rol_id=ua.rol_id AND fa.parent=%s " . "JOIN role_data rd ON rd.role_id=ua.rol_id WHERE u.usr_id=ua.usr_id GROUP BY u.usr_id) rq ON rq.usr_id=u.usr_id " . "LEFT JOIN rbac_ua system_role ON system_role.usr_id=u.usr_id AND system_role.rol_id = %s " . "LEFT JOIN usr_pref p1 ON p1.usr_id=u.usr_id AND p1.keyword = 'disk_quota' " . "LEFT JOIN usr_pref p2 ON p2.usr_id=u.usr_id AND p2.keyword = 'disk_usage' " . "LEFT JOIN usr_pref p3 ON p3.usr_id=u.usr_id AND p3.keyword = 'disk_usage.last_update' " . "LEFT JOIN usr_pref p5 ON p5.usr_id=u.usr_id AND p5.keyword = 'language' " . 'WHERE (((p1.value+0 > rq.role_disk_quota OR rq.role_disk_quota IS NULL) AND p2.value+0 > p1.value+0) OR ((rq.role_disk_quota > p1.value+0 OR p1.value IS NULL) AND p2.value+0 > rq.role_disk_quota)) ' . 'AND (u.active=1 AND (u.time_limit_unlimited = 1 OR ' . $ilDB->unixTimestamp() . ' BETWEEN u.time_limit_from AND u.time_limit_until)) ', array('integer', 'integer'), array(ROLE_FOLDER_ID, SYSTEM_ROLE_ID)); $users = array(); $counter = 0; while ($row = $ilDB->fetchAssoc($res)) { $details = ilDiskQuotaChecker::_lookupDiskUsage($row['usr_id']); $users[$counter]['disk_quota'] = $row['disk_quota']; $users[$counter]['disk_usage'] = $details['disk_usage']; $users[$counter]['email'] = $row['email']; $users[$counter]['firstname'] = $row['firstname']; $users[$counter]['lastname'] = $row['lastname']; ++$counter; } if (count($users)) { foreach ($this->getRecipients() as $rcp) { $usrId = ilObjUser::_lookupId($rcp); $this->initLanguage($usrId); $this->initMail(); $this->setSubject($this->getLanguage()->txt('disk_quota_summary_subject')); $this->setBody(ilMail::getSalutation($usrId, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguage()->txt('disk_quota_exceeded_headline')); $this->appendBody("\n\n"); $first = true; $counter = 0; $numUsers = count($users); foreach ($users as $user) { if (!$first) { $this->appendBody("\n---------------------------------------------------\n\n"); } $this->appendBody($this->getLanguage()->txt('fullname') . ': ' . $user['lastname'] . ', ' . $user['firstname'] . "\n"); $this->appendBody($this->getLanguage()->txt('email') . ': ' . $user['email'] . "\n"); $this->appendBody($this->getLanguage()->txt('disk_quota') . ': ' . ilFormat::formatSize($user['disk_quota'], 'short', $this->getLanguage()) . "\n"); $this->appendBody($this->getLanguage()->txt('currently_used_disk_space') . ': ' . ilFormat::formatSize($user['disk_usage'], 'short', $this->getLanguage()) . "\n"); $this->appendBody($this->getLanguage()->txt('usrf_profile_link') . ': ' . ilUtil::_getHttpPath() . '/goto.php?target=usrf&client_id=' . CLIENT_ID); if ($counter < $numUsers - 1) { $this->appendBody("\n"); } ++$counter; $first = false; } $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system'), false); } } } }
/** * Send notifications * @return */ public function send() { global $ilUser; parent::send(); include_once "./Modules/Exercise/classes/class.ilExAssignment.php"; switch ($this->getType()) { case self::TYPE_FEEDBACK_FILE_ADDED: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('exc_msg_new_feedback_file_uploaded'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('exc_msg_new_feedback_file_uploaded2')); $this->appendBody("\n"); $this->appendBody($this->getLanguageText('obj_exc') . ": " . $this->getObjectTitle(true)); $this->appendBody("\n"); $this->appendBody($this->getLanguageText('exc_assignment') . ": " . ilExAssignment::lookupTitle($this->getAssignmentId())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('exc_mail_permanent_link')); $this->appendBody("\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_SUBMISSION_UPLOAD: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('exc_submission_notification_subject'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('exc_submission_notification_body'), $this->getObjectTitle(true))); $this->appendBody("\n"); $this->appendBody($this->getLanguageText('exc_assignment') . ": " . ilExAssignment::lookupTitle($this->getAssignmentId())); $this->appendBody("\n"); $this->appendBody($this->getLanguageText('user') . ": " . $ilUser->getFullName()); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('exc_submission_notification_link'), $this->createPermanentLink())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; } return true; }
/** * Send notifications * @return */ public function send() { global $ilSetting; if ((int) $this->getRefId() && in_array($this->getType(), array(self::TYPE_ADMISSION_MEMBER))) { $obj = ilObjectFactory::getInstanceByRefId((int) $this->getRefId()); if ($obj->getAutoNotification() == false) { return false; } } parent::send(); switch ($this->getType()) { case self::TYPE_ADMISSION_MEMBER: // automatic mails about status change disabled if (!$ilSetting->get('mail_crs_member_notification', true)) { return; } foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_added_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_added_member_body'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_accept_subscriber'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_accept_subscriber_body'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_reject_subscriber'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_reject_subscriber_body'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_STATUS_CHANGED: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_status_changed'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_status_changed_body'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->createCourseStatus($rcp)); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_DISMISS_MEMBER: // automatic mails about status change disabled if (!$ilSetting->get('mail_crs_member_notification', true)) { return; } foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_dismiss_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_dismiss_member_body'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_BLOCKED_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_blocked_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_blocked_member_body'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_UNBLOCKED_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_unblocked_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_unblocked_member_body'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_REGISTRATION: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_new_subscription'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('crs_new_subscription_body'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_new_subscription_request'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('crs_new_subscription_request_body'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_new_subscription_request_body2')); $this->appendBody("\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_UNSUBSCRIBE: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_cancel_subscription'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('crs_cancel_subscription_body'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_cancel_subscription_body2')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_UNSUBSCRIBE_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_unsubscribe_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_unsubscribe_member_body'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_SUBSCRIBE_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_subscribe_member'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_subscribe_member_body'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('crs_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_WAITING_LIST_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('crs_subscribe_wl'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $info = $this->getAdditionalInformation(); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('crs_subscribe_wl_body'), $this->getObjectTitle(), $info['position'])); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; } return true; }
/** * Send notifications * @return */ public function send() { global $ilSetting; parent::send(); switch ($this->getType()) { case self::TYPE_ADMISSION_MEMBER: // automatic mails about status change disabled if (!$ilSetting->get('mail_grp_member_notification', false)) { return; } foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_admission_new_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_admission_new_bod'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_DISMISS_MEMBER: // automatic mails about status change disabled if (!$ilSetting->get('mail_grp_member_notification', false)) { return; } foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_dismiss_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_dismiss_bod'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_REGISTRATION: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_notification_reg_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('grp_mail_notification_reg_bod'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_UNSUBSCRIBE_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_unsubscribe_member_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_unsubscribe_member_bod'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_UNSUBSCRIBE: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_notification_unsub_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('grp_mail_notification_unsub_bod'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_notification_unsub_bod2')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_SUBSCRIBE_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_subscribe_member_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_subscribe_member_bod'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_NOTIFICATION_REGISTRATION_REQUEST: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_notification_reg_req_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $info = $this->getAdditionalInformation(); $this->appendBody(sprintf($this->getLanguageText('grp_mail_notification_reg_req_bod'), $this->userToString($info['usr_id']), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_notification_reg_req_bod2')); $this->appendBody("\n"); $this->appendBody($this->createPermanentLink(array(), '_mem')); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_notification_explanation_admin')); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_REFUSED_SUBSCRIPTION_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_sub_dec_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_sub_dec_bod'), $this->getObjectTitle())); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_ACCEPTED_SUBSCRIPTION_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_sub_acc_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_sub_acc_bod'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_WAITING_LIST_MEMBER: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_wl_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $info = $this->getAdditionalInformation(); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_wl_bod'), $this->getObjectTitle(), $info['position'])); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; case self::TYPE_STATUS_CHANGED: foreach ($this->getRecipients() as $rcp) { $this->initLanguage($rcp); $this->initMail(); $this->setSubject(sprintf($this->getLanguageText('grp_mail_status_sub'), $this->getObjectTitle(true))); $this->setBody(ilMail::getSalutation($rcp, $this->getLanguage())); $this->appendBody("\n\n"); $this->appendBody(sprintf($this->getLanguageText('grp_mail_status_bod'), $this->getObjectTitle())); $this->appendBody("\n\n"); $this->appendBody($this->createGroupStatus($rcp)); $this->appendBody("\n\n"); $this->appendBody($this->getLanguageText('grp_mail_permanent_link')); $this->appendBody("\n\n"); $this->appendBody($this->createPermanentLink()); $this->getMail()->appendInstallationSignature(true); $this->sendMail(array($rcp), array('system')); } break; } return true; }