diff --git a/webapp/src/Controller/Jury/ProblemController.php b/webapp/src/Controller/Jury/ProblemController.php index c3371b43dc..e10cc3f6be 100644 --- a/webapp/src/Controller/Jury/ProblemController.php +++ b/webapp/src/Controller/Jury/ProblemController.php @@ -241,8 +241,9 @@ public function indexAction(): Response #[Route(path: '/problemset', name: 'jury_problemset')] public function problemsetAction(StatisticsService $stats): Response { + $teamId = $this->dj->getUser()->getTeam()?->getTeamid(); return $this->render('jury/problemset.html.twig', - $this->dj->getTwigDataForProblemsAction($stats, forJury: true)); + $this->dj->getTwigDataForProblemsAction($stats, teamId: $teamId, forJury: true)); } #[Route(path: '/{probId<\d+>}/samples.zip', name: 'jury_problem_sample_zip')] diff --git a/webapp/templates/jury/problemset.html.twig b/webapp/templates/jury/problemset.html.twig index 4b5c7428b0..26009fc415 100644 --- a/webapp/templates/jury/problemset.html.twig +++ b/webapp/templates/jury/problemset.html.twig @@ -11,6 +11,7 @@ problem_statement_path: 'jury_problem_statement', problem_attachment_path: 'jury_attachment_fetch', problem_sample_zip_path: 'jury_problem_sample_zip', - show_jury_warning: not (current_contest.state.started ?? false) + show_jury_warning: not (current_contest.state.started ?? false), + team: team } %} {% endblock %} diff --git a/webapp/templates/partials/problem_list.html.twig b/webapp/templates/partials/problem_list.html.twig index 8414498602..71626753c3 100644 --- a/webapp/templates/partials/problem_list.html.twig +++ b/webapp/templates/partials/problem_list.html.twig @@ -130,7 +130,7 @@ {% if clarifications[problem.probid] is defined %} {% set clarificationsCount = clarifications[problem.probid] | length %} {% for clar in clarifications[problem.probid] %} - {% if team.unreadClarifications.contains(clar) %} + {% if team and team.unreadClarifications.contains(clar) %} {% set unseenClarificationCount = unseenClarificationCount + 1 %} {% endif %} {% endfor %}