fix enrollment and registration email send
This commit is contained in:
@@ -95,10 +95,13 @@ class EnrollmentAdminController extends BaseController
|
||||
return redirect()->back()->with('error', 'Registration launch is not ready: ' . implode(', ', $missing));
|
||||
}
|
||||
|
||||
$force = (bool) $this->request->getPost('force_resend');
|
||||
$result = service('enrollmentRegistrationEmail')->sendForSchoolYearName($schoolYear, $force);
|
||||
$failedOnly = (bool) $this->request->getPost('failed_only');
|
||||
$force = ! $failedOnly && (bool) $this->request->getPost('force_resend');
|
||||
$result = service('enrollmentRegistrationEmail')->sendForSchoolYearName($schoolYear, $force, $failedOnly);
|
||||
$message = sprintf(
|
||||
'Registration emails processed for %s: %d sent, %d failed, %d skipped.',
|
||||
$failedOnly
|
||||
? 'Failed registration emails retried for %s: %d sent, %d failed, %d skipped.'
|
||||
: 'Registration emails processed for %s: %d sent, %d failed, %d skipped.',
|
||||
$schoolYear,
|
||||
(int) ($result['sent'] ?? 0),
|
||||
(int) ($result['failed'] ?? 0),
|
||||
|
||||
Reference in New Issue
Block a user