@@ -374,7 +374,7 @@ public function testcaseResults(Submission $submission, ?bool $showExternal = fa
374374 $ externalJudgementId = $ externalJudgement ?->getExtjudgementid();
375375 $ probId = $ submission ->getProblem ()->getProbid ();
376376 $ testcases = $ this ->em ->getConnection ()->fetchAllAssociative (
377- 'SELECT er.result as runresult, t.ranknumber, t.description
377+ 'SELECT er.result as runresult, t.ranknumber, t.description, t.sample
378378 FROM testcase t
379379 LEFT JOIN external_run er ON (er.testcaseid = t.testcaseid
380380 AND er.extjudgementid = :extjudgementid)
@@ -388,7 +388,7 @@ public function testcaseResults(Submission $submission, ?bool $showExternal = fa
388388 $ judgingId = $ judging ? $ judging ->getJudgingid () : null ;
389389 $ probId = $ submission ->getProblem ()->getProbid ();
390390 $ testcases = $ this ->em ->getConnection ()->fetchAllAssociative (
391- 'SELECT r.runresult, jh.hostname, jt.valid, t.ranknumber, t.description
391+ 'SELECT r.runresult, jh.hostname, jt.valid, t.ranknumber, t.description, t.sample
392392 FROM testcase t
393393 LEFT JOIN judging_run r ON (r.testcaseid = t.testcaseid
394394 AND r.judgingid = :judgingid)
@@ -401,7 +401,12 @@ public function testcaseResults(Submission $submission, ?bool $showExternal = fa
401401 }
402402
403403 $ results = '' ;
404+ $ lastTypeSample = true ;
404405 foreach ($ testcases as $ key => $ testcase ) {
406+ if ($ testcase ['sample ' ] != $ lastTypeSample ) {
407+ $ results .= ' | ' ;
408+ $ lastTypeSample = $ testcase ['sample ' ];
409+ }
405410 $ class = $ submissionDone ? 'secondary ' : 'primary ' ;
406411 $ text = '? ' ;
407412
0 commit comments