From 7adfeeb68a0426a80e3e89d571f22b25be567c4d Mon Sep 17 00:00:00 2001 From: cassio Date: Tue, 23 Oct 2018 10:35:41 +0200 Subject: small fixes, commenting of undesired code --- src/frun.php | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'src/frun.php') diff --git a/src/frun.php b/src/frun.php index bbb20e9..75ccc2a 100644 --- a/src/frun.php +++ b/src/frun.php @@ -485,31 +485,33 @@ function DBUpdateRunAutojudging($contest, $site, $number, $ip, $answer, $stdout, $b = DBSiteInfo($contest, $site, $c); - if(true || //cassiopc remove the true here if you want this to take effect - (($retval != 1 || // for some problems, YES is not automatic - $a["runproblem"] == 1 || - $a["runproblem"] == 2 || - $a["runproblem"] == 3 || - $a["runproblem"] == 4 || - $a["runproblem"] == 5 || - $a["runproblem"] == 6 || - $a["runproblem"] == 7 || - $a["runproblem"] == 8 || - $a["runproblem"] == 9 || - $a["runproblem"] == 10 || - $a["runproblem"] == 11 || - $a["runproblem"] == 12 || - $a["runproblem"] == 13) - && $retval != 4 && $retval != 6)) { // but WA:6 and TLE:4 are automatic for all problems - //if($retval != 1 && $retval != 6 && $retval != 4) { - if($b["siteautojudge"]!="t") { - // && (($retval != 1 && $retval != 6) || $a["runproblem"] == 1 || $a["runproblem"] == 2) ) { //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; - } - //} + if($b["siteautojudge"]!="t") { + DBExec($c, "commit work", "DBUpdateRunAutojudging(commit)"); + LOGLevel("Autojudging answered a run (run=$number, site=$site, contest=$contest, answer='$answer', retval=$retval)", 3); + return true; } + /* // tricks that can be used to make automatic answering for some problems and types of answers. However, this should be integrated into the system in a smart way soon + if(true || //cassiopc remove the true here if you want this to take effect + (($retval != 1 || // for some problems, 1:YES is not automatic + $a["runproblem"] == 1 || + $a["runproblem"] == 2 || + $a["runproblem"] == 3 || + $a["runproblem"] == 4 || + $a["runproblem"] == 5 || + $a["runproblem"] == 6 || + $a["runproblem"] == 7 || + $a["runproblem"] == 8 || + $a["runproblem"] == 9 || + $a["runproblem"] == 10 || + $a["runproblem"] == 11 || + $a["runproblem"] == 12 || + $a["runproblem"] == 13) + && $retval != 4 && $retval != 6)) { // but WA:6 and TLE:4 are automatic for all problems + if($retval != 1 && $retval != 6 && $retval != 4) { + } + } + } + */ //echo "DEBUG: $contest, $site, " .$a["usernumber"].", $site, $number, $retval\n"; if(DBUpdateRunO($contest, $site, $a["usernumber"], $site, $number, $retval, $c)==false) { DBExec($c, "rollback work", "DBUpdateRunAutoJudging(rollback)"); -- cgit v1.2.3