This commit is contained in:
@@ -60,6 +60,8 @@ final class SchoolYearSelectionController extends BaseController
|
||||
return $fallback;
|
||||
}
|
||||
|
||||
$path = $this->normalizeSchoolYearReturnPath($path);
|
||||
|
||||
$query = [];
|
||||
if (! empty($parts['query'])) {
|
||||
parse_str((string) $parts['query'], $query);
|
||||
@@ -73,6 +75,15 @@ final class SchoolYearSelectionController extends BaseController
|
||||
return $path . ($cleanQuery !== '' ? '?' . $cleanQuery : '');
|
||||
}
|
||||
|
||||
private function normalizeSchoolYearReturnPath(string $path): string
|
||||
{
|
||||
if (preg_match('#^/(parent|teacher|admin)/progress/view/\d+$#', $path, $matches) === 1) {
|
||||
return '/' . $matches[1] . '/progress';
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
private function dashboardRoute(): string
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user