File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
webapp/src/Controller/Team Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ public function homeAction(Request $request): Response
9292 paginated: false
9393 )[0 ];
9494
95- /** @var Clarification[] $clarifications */
96- $ clarifications = $ this ->em ->createQueryBuilder ()
95+ $ qb = $ this ->em ->createQueryBuilder ()
9796 ->from (Clarification::class, 'c ' )
9897 ->leftJoin ('c.problem ' , 'p ' )
9998 ->leftJoin ('c.sender ' , 's ' )
@@ -105,9 +104,14 @@ public function homeAction(Request $request): Response
105104 ->setParameter ('contest ' , $ contest )
106105 ->setParameter ('team ' , $ team )
107106 ->addOrderBy ('c.submittime ' , 'DESC ' )
108- ->addOrderBy ('c.clarid ' , 'DESC ' )
109- ->getQuery ()
110- ->getResult ();
107+ ->addOrderBy ('c.clarid ' , 'DESC ' );
108+ if (!$ this ->dj ->checkrole ('jury ' )) {
109+ $ qb ->andWhere ('c.submittime <= :time ' )
110+ ->setparameter ('time ' , time ());
111+ }
112+
113+ /** @var Clarification[] $clarifications */
114+ $ clarifications = $ qb ->getQuery ()->getResult ();
111115
112116 /** @var Clarification[] $clarificationRequests */
113117 $ clarificationRequests = $ this ->em ->createQueryBuilder ()
You can’t perform that action at this time.
0 commit comments