From d8f2907fb00b701f91e6e98d33c4e6c0dd0619a5 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Mon, 16 Oct 2017 22:34:48 +0100 Subject: bug fixes --- src/private/autojudging.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/private') diff --git a/src/private/autojudging.php b/src/private/autojudging.php index dcb7398..2a8b1ed 100755 --- a/src/private/autojudging.php +++ b/src/private/autojudging.php @@ -44,7 +44,7 @@ if(system('test "`id -u`" -eq "0"',$retval)===false || $retval!=0) { exit; } -ini_set('memory_limit','600M'); +ini_set('memory_limit','1200M'); ini_set('output_buffering','off'); ini_set('implicit_flush','on'); @ob_end_flush(); @@ -487,10 +487,14 @@ while(42) { $answertmp = substr(trim($dif[count($dif)-1]),0,200); $answertmp = sanitizeText($answertmp); fclose($fp); + /* foreach (glob($dir . $ds . '*') as $fne) { - @chown($fne,"nobody"); - @chmod($fne,0755); + if(is_file($fne)) { + @chown($fne,"nobody"); + @chmod($fne,0755); + } } + */ // retval 5 (presentation) and retval 6 (wronganswer) are already compatible with the compare script if($localretval < 4 || $localretval > 6) { // contact staff @@ -616,9 +620,14 @@ while(42) { if(count($ans) > 0) $anstmp = substr(trim(escape_string($ans[count($ans)-1])),0,100); unset($ans); - $answer = "(probably runtime error - unusual code: $retval) " . $anstmp; - // runtime error - $retval = 3; + if(strpos(file_get_contents('allerr'),'Error: Could not find or load main class') === false) { + $answer = "(probably runtime error - unusual code: $retval) " . $anstmp; + // runtime error + $retval = 3; + } else { + $answer = "(probably wrong name of class - unusual code: $retval) "; // . $anstmp; + $retval = 8; + } } if($retval == 0 || $retval > 9) { $ans = file("allout"); @@ -638,7 +647,7 @@ while(42) { //echo "err==> "; system("tail -n1 ". $dir.$ds.'allerr'); $answer=substr($answer,0,200); DBUpdateRunAutojudging($contest, $site, $number, $ip, $answer, $dir.$ds.'allout', $dir.$ds.'allerr', $retval); - LogLevel("Autojudging: answered '$answer' (run=$number, site=$site, contest=$contest)",3); - echo "Autojudging answered '$answer' (contest=$contest, site=$site, run=$number)\n"; + LogLevel("Autojudging: answered $retval '$answer' (run=$number, site=$site, contest=$contest)",3); + echo "Autojudging answered $retval '$answer' (contest=$contest, site=$site, run=$number)\n"; } ?> -- cgit v1.2.3 From 47145dc8e4493e8faba21e82a6377a993fe93d8d Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Mon, 16 Oct 2017 22:56:25 +0100 Subject: bfix --- src/private/conf.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/private') diff --git a/src/private/conf.php b/src/private/conf.php index 9ad1a80..71956c0 100644 --- a/src/private/conf.php +++ b/src/private/conf.php @@ -20,8 +20,9 @@ function globalconf() { $conf["dbencoding"]="UTF8"; $conf["dbclientenc"]="UTF8"; + $conf['doenc']=FALSE; - $conf["dblocal"]="false"; // use unix socket to connect? + $conf["dblocal"]="false"; // use unix socket to connect? $conf["dbhost"]="localhost"; $conf["dbport"]="5432"; -- cgit v1.2.3 From 618cb71ee7d196afe6fbf5ba82308e8afea24a20 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Tue, 24 Oct 2017 15:10:55 +0100 Subject: bug fixes --- src/private/score.sep | 42 +++++++++++++++++++----------------------- src/private/score.sep.sample | 23 +++++++++++++++++++++++ 2 files changed, 42 insertions(+), 23 deletions(-) create mode 100644 src/private/score.sep.sample (limited to 'src/private') diff --git a/src/private/score.sep b/src/private/score.sep index fb45aae..b4798d9 100644 --- a/src/private/score.sep +++ b/src/private/score.sep @@ -1,23 +1,19 @@ -General 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 100 9999 -Site_1 1 -Site_2 2 -Site_3 3 -Site_4 4 -Site_5 5 -Site_6 6 -Site_7 7 -Site_8 8 -Site_9 9 -Site_10 10 -Site_11 11 -Site_12 12 -Site_13 13 -Site_14 14 -Site_15 15 -Site_16 16 -Site_17 17 -Site_18 18 -Site_19 19 -Site_20 20 -Site_100 100 -Site_9999 9999 +Global 101 102 103 104 105 106 107 108 109 110 121 122 123 124 +Caribbean 110 121 123 +MexicoCA 104 109 122 124 +NorthRegion 102 103 +SouthRegion 105 106 107 108 +Argentina 105 +Bolivia 106 +Brasil 101 +Chile 107 +Colombia 102 +CostaRica 122 +Cuba 110 +ElSalvador 124 +Mexico 109 +Panama 104 +Peru 108 +PuertoRico 123 +RepDominicana 121 +Venezuela 103 diff --git a/src/private/score.sep.sample b/src/private/score.sep.sample new file mode 100644 index 0000000..fb45aae --- /dev/null +++ b/src/private/score.sep.sample @@ -0,0 +1,23 @@ +General 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 100 9999 +Site_1 1 +Site_2 2 +Site_3 3 +Site_4 4 +Site_5 5 +Site_6 6 +Site_7 7 +Site_8 8 +Site_9 9 +Site_10 10 +Site_11 11 +Site_12 12 +Site_13 13 +Site_14 14 +Site_15 15 +Site_16 16 +Site_17 17 +Site_18 18 +Site_19 19 +Site_20 20 +Site_100 100 +Site_9999 9999 -- cgit v1.2.3