fix parent pages to adopt the school year logic
Tests / PHPUnit (push) Successful in 1m20s

This commit is contained in:
root
2026-07-17 00:02:53 -04:00
parent a5517b516a
commit 539d0eb220
12 changed files with 258 additions and 51 deletions
@@ -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 {