This commit is contained in:
@@ -1065,13 +1065,7 @@ class GradingController extends Controller
|
||||
|
||||
public function belowSixty()
|
||||
{
|
||||
$configuredYear = (string) $this->schoolYear;
|
||||
|
||||
$schoolYear = trim((string)($this->request->getGet('school_year') ?? ''));
|
||||
|
||||
if ($schoolYear === '') {
|
||||
$schoolYear = $configuredYear;
|
||||
}
|
||||
$schoolYear = $this->currentSchoolYearName((string) $this->schoolYear);
|
||||
|
||||
// This page is Fall only.
|
||||
$semester = 'fall';
|
||||
@@ -1124,6 +1118,16 @@ public function belowSixty()
|
||||
'canViewGrading' => $canViewGrading,
|
||||
]);
|
||||
}
|
||||
|
||||
private function currentSchoolYearName(?string $fallback = null): string
|
||||
{
|
||||
try {
|
||||
return service('schoolYearContext')->resolve($this->request)->yearName();
|
||||
} catch (\Throwable) {
|
||||
return trim((string) ($fallback ?? ''));
|
||||
}
|
||||
}
|
||||
|
||||
public function editBelowSixtyEmail()
|
||||
{
|
||||
$studentId = (int)$this->request->getGet('student_id');
|
||||
|
||||
Reference in New Issue
Block a user