@@ -114,7 +114,7 @@ public function getJudgehostsAction(
114114 * Add a new judgehost to the list of judgehosts.
115115 * Also restarts (and returns) unfinished judgings.
116116 *
117- * @return array<array{jobid: int, submitid: int }>
117+ * @return array<array{jobid: int, submitid: string }>
118118 * @throws NonUniqueResultException
119119 */
120120 #[IsGranted('ROLE_JUDGEHOST ' )]
@@ -127,7 +127,7 @@ public function getJudgehostsAction(
127127 items: new OA \Items (
128128 properties: [
129129 new OA \Property (property: 'jobid ' , type: 'integer ' ),
130- new OA \Property (property: 'submitid ' , type: 'integer ' ),
130+ new OA \Property (property: 'submitid ' , type: 'string ' ),
131131 ],
132132 type: 'object '
133133 )
@@ -188,7 +188,7 @@ public function createJudgehostAction(Request $request): array
188188
189189 return array_map (fn (Judging $ judging ) => [
190190 'jobid ' => $ judging ->getJudgingid (),
191- 'submitid ' => $ judging ->getSubmission ()->getSubmitid (),
191+ 'submitid ' => $ judging ->getSubmission ()->getExternalid (),
192192 ], $ judgings );
193193 }
194194
@@ -460,8 +460,8 @@ public function updateJudgingAction(
460460 $ problem = $ submission ->getProblem ();
461461 $ this ->scoreboardService ->calculateScoreRow ($ contest , $ team , $ problem );
462462
463- $ message = sprintf ("submission %d , judging %d: compiler-error " ,
464- $ submission ->getSubmitid (), $ judging ->getJudgingid ());
463+ $ message = sprintf ("submission %s , judging %d: compiler-error " ,
464+ $ submission ->getExternalid (), $ judging ->getJudgingid ());
465465 $ this ->dj ->alert ('reject ' , $ message );
466466 });
467467 }
@@ -1119,7 +1119,7 @@ private function addSingleJudgingRun(
11191119 // this means that these alert messages should be treated as
11201120 // confidential information.
11211121 $ msg = sprintf ("submission %s, judging %s: %s " ,
1122- $ submission ->getSubmitid (), $ judging ->getJudgingid (), $ result );
1122+ $ submission ->getExternalid (), $ judging ->getJudgingid (), $ result );
11231123 $ this ->dj ->alert ($ result === 'correct ' ? 'accept ' : 'reject ' , $ msg );
11241124
11251125 // Potentially send a balloon, i.e. if no verification required (case of verification required is
@@ -1224,7 +1224,7 @@ private function maybeUpdateActiveJudging(Judging $judging): void
12241224 * @return JudgehostFile[]
12251225 */
12261226 #[IsGranted(new Expression ("is_granted('ROLE_JURY') or is_granted('ROLE_JUDGEHOST') " ))]
1227- #[Rest \Get('/get_files/{type}/{id<\d+> } ' )]
1227+ #[Rest \Get('/get_files/{type}/{id} ' )]
12281228 #[OA \Response(
12291229 response: 200 ,
12301230 description: 'The files for the submission, testcase or script. ' ,
@@ -1271,7 +1271,7 @@ public function getVersionCommands(string $judgetaskid): array
12711271 }
12721272
12731273 $ submission = $ this ->em ->getRepository (Submission::class)
1274- ->findOneBy ([ ' submitid ' => $ judgeTask ->getSubmitid ()] );
1274+ ->findByExternalId ( $ judgeTask ->getSubmitid ());
12751275 if (!$ submission ) {
12761276 throw new HttpException (500 , 'Unknown submission with submitid ' . $ judgeTask ->getSubmitid ());
12771277 }
@@ -1335,7 +1335,7 @@ public function checkVersions(Request $request, string $judgetaskid): array
13351335 }
13361336
13371337 $ submission = $ this ->em ->getRepository (Submission::class)
1338- ->findOneBy ([ ' submitid ' => $ judgeTask ->getSubmitid ()] );
1338+ ->findByExternalId ( $ judgeTask ->getSubmitid ());
13391339 if (!$ submission ) {
13401340 throw new BadRequestHttpException ('Unknown submission with submitid ' . $ judgeTask ->getSubmitid ());
13411341 }
@@ -1419,7 +1419,8 @@ private function getSourceFiles(string $id): array
14191419 $ queryBuilder = $ this ->em ->createQueryBuilder ()
14201420 ->from (SubmissionFile::class, 'f ' )
14211421 ->select ('f ' )
1422- ->andWhere ('f.submission = :submitid ' )
1422+ ->join ('f.submission ' , 's ' )
1423+ ->andWhere ('s.externalid = :submitid ' )
14231424 ->setParameter ('submitid ' , $ id )
14241425 ->orderBy ('f.ranknumber ' );
14251426
@@ -1837,7 +1838,7 @@ private function getJudgetasks(string|int|null $jobId, int $max_batchsize, Judge
18371838 ->getQuery ()
18381839 ->execute ();
18391840 $ this ->em ->flush ();
1840- $ this ->dj ->auditlog ('queuetask ' , $ jobId , 'deleted ' );
1841+ $ this ->dj ->auditlog ('queuetask ' , ( string ) $ jobId , 'deleted ' );
18411842 } else {
18421843 return $ this ->serializeJudgeTasks ($ judgetasks , $ judgehost );
18431844 }
0 commit comments