Skip to content

Commit

Permalink
Admissions: Changed the string of the withdraw notification when a st…
Browse files Browse the repository at this point in the history
…udent is going to withdraw in the future
  • Loading branch information
ali-ichk committed May 6, 2024
1 parent d360b63 commit 73e8d4d
Showing 1 changed file with 18 additions and 7 deletions.
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 73e8d4d

Please sign in to comment.