aboutsummaryrefslogtreecommitdiff
path: root/src/frun.php
diff options
context:
space:
mode:
authorCassio de Campos <cassiopc@gmail.com>2017-08-04 13:20:51 +0000
committerCassio de Campos <cassiopc@gmail.com>2017-08-04 13:20:51 +0000
commitaf925fb218e7a333759eb49c667bfb22eb71196d (patch)
tree9aa8254c42a50d2c6bb253074c54609287258053 /src/frun.php
parent5592a6c28bdf04165d60a9579f70f9c63fc830ca (diff)
downloadboca-af925fb218e7a333759eb49c667bfb22eb71196d.tar.gz
boca-af925fb218e7a333759eb49c667bfb22eb71196d.zip
bug fixes
Diffstat (limited to 'src/frun.php')
-rw-r--r--src/frun.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/frun.php b/src/frun.php
index 359b395..34bfd83 100644
--- a/src/frun.php
+++ b/src/frun.php
@@ -481,7 +481,7 @@ function DBUpdateRunAutojudging($contest, $site, $number, $ip, $answer, $stdout,
$b = DBSiteInfo($contest, $site, $c);
- if($b["siteautojudge"]!="t") {
+ if($b["siteautojudge"]!="t") { // && $retval != 1 && $retval != 6) { //cassiopc incluir automatic judging of some codes 1:YES WA:6
DBExec($c, "commit work", "DBUpdateRunAutojudging(commit)");
LOGLevel("Autojudging answered a run (run=$number, site=$site, contest=$contest, answer='$answer', retval=$retval)", 3);
return true;
@@ -753,7 +753,14 @@ function DBNewRun($param,$c=null) {
return 0;
}
} else {
+ $b = DBSiteInfo($contest, $site, $c);
$dif = $rundatediff;
+ if ($dif >= $b['siteduration']) {
+ DBExec($c, "rollback work", "DBNewRun(rollback-over)");
+ LOGError("Tried to submit a run but the contest is over. SQL=(" . $sql . ")");
+ MSGError("The contest is over!");
+ return 0;
+ }
}
if($updatetime > $t || $insert) {