diff --git a/CHANGELOG.txt b/CHANGELOG.txt index bf094756ac..81acfb97aa 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -86,6 +86,7 @@ v27.0.00 Activities: fixed missing Waiting List option when adding activity enrolment Admissions: fixed Form Group at Entry field when not using it as Office Only Admissions: ensure form submission email goes to the admissions account email address rather than parent1 + Admissions: fixed the tense of the notification string when a student withdraws from the school Attendance: fixed handling of double periods in Set Future Absence tool Attendance: fixed timestamp of attendance taken for double periods in Take Attendance by Class Attendance: fixed onsite school absences not showing blue in Attendance by Form Group diff --git a/modules/Admissions/student_withdrawProcess.php b/modules/Admissions/student_withdrawProcess.php index 9e5b4f3bd8..6838721ebf 100644 --- a/modules/Admissions/student_withdrawProcess.php +++ b/modules/Admissions/student_withdrawProcess.php @@ -106,13 +106,24 @@ if (!empty($notify) || !empty($notificationList)) { // Create the notification body $studentName = Format::name('', $student['preferredName'], $student['surname'], 'Student', false, true); - $notificationString = __('{student} {formGroup} has withdrawn from {school} on {date}.', [ - 'student' => $studentName, - 'formGroup' => $student['formGroup'], - 'school' => $session->get('organisationNameShort'), - 'date' => Format::date($data['dateEnd']), - ]); - + + $today = date("Y-m-d"); + if ($today > $data['dateEnd']) { + $notificationString = __('{student} {formGroup} has withdrawn from {school} on {date}.', [ + 'student' => $studentName, + 'formGroup' => $student['formGroup'], + 'school' => $session->get('organisationNameShort'), + 'date' => Format::date($data['dateEnd']), + ]); + } else { + $notificationString = __('{student} {formGroup} will withdraw from {school}, effective from {date}.', [ + 'student' => $studentName, + 'formGroup' => $student['formGroup'], + 'school' => $session->get('organisationNameShort'), + 'date' => Format::date($data['dateEnd']), + ]); + } + if (!empty($withdrawNote)) { $notificationString .= '

'.__('Withdraw Note').': '.$withdrawNote; }