diff --git a/webapp/src/Controller/Jury/SubmissionController.php b/webapp/src/Controller/Jury/SubmissionController.php index 83cebaef3c..406440daff 100644 --- a/webapp/src/Controller/Jury/SubmissionController.php +++ b/webapp/src/Controller/Jury/SubmissionController.php @@ -72,7 +72,7 @@ public function indexAction( #[MapQueryParameter(name: 'view')] ?string $viewFromRequest = null, ): Response { - $viewTypes = [0 => 'newest', 1 => 'unverified', 2 => 'unjudged', 3 => 'all']; + $viewTypes = [0 => 'newest', 1 => 'unverified', 2 => 'unjudged', 3 => 'judging', 4 => 'all']; $view = 0; if (($submissionViewCookie = $this->dj->getCookie('domjudge_submissionview')) && isset($viewTypes[$submissionViewCookie])) { @@ -101,6 +101,9 @@ public function indexAction( if ($viewTypes[$view] == 'unjudged') { $restrictions['judged'] = 0; } + if ($viewTypes[$view] == 'judging') { + $restrictions['judging'] = 1; + } $contests = $this->dj->getCurrentContests(); if ($contest = $this->dj->getCurrentContest()) { diff --git a/webapp/src/Service/SubmissionService.php b/webapp/src/Service/SubmissionService.php index 789a3e0a86..73f656e9e5 100644 --- a/webapp/src/Service/SubmissionService.php +++ b/webapp/src/Service/SubmissionService.php @@ -149,6 +149,13 @@ public function getSubmissionList( $queryBuilder->andWhere('j.result IS NULL OR j.endtime IS NULL'); } } + if (isset($restrictions['judging'])) { + if ($restrictions['judging']) { + $queryBuilder->andWhere('j.starttime IS NOT NULL AND j.result IS NULL'); + } else { + $queryBuilder->andWhere('j.starttime IS NULL OR j.result IS NOT NULL'); + } + } if (isset($restrictions['externally_judged'])) { if ($restrictions['externally_judged']) {