Skip to content

Commit

Permalink
Admissions: change the wording of student withdraw notifications that…
Browse files Browse the repository at this point in the history
… are in the future (#1828)
  • Loading branch information
ali-ichk authored May 6, 2024
1 parent dc371ab commit eae1e4f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,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
Expand Down
25 changes: 18 additions & 7 deletions modules/Admissions/student_withdrawProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= '<br/><br/>'.__('Withdraw Note').': '.$withdrawNote;
}
Expand Down

0 comments on commit eae1e4f

Please sign in to comment.