Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admissions: Changed the string of the withdraw notification #1828

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
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