diff options
| author | cassio <cassiopc@gmail.com> | 2013-09-13 10:54:28 +0000 |
|---|---|---|
| committer | cassio <cassiopc@gmail.com> | 2013-09-13 10:54:28 +0000 |
| commit | 7de285c768e1ad2366bae17b354a512189f17741 (patch) | |
| tree | abf5bc52b7d650583a88975b0eba430e94527630 /src | |
| parent | 5e7b4f6a355b62791dd6d318c2b2b3153f6e2dfe (diff) | |
| download | boca-7de285c768e1ad2366bae17b354a512189f17741.tar.gz boca-7de285c768e1ad2366bae17b354a512189f17741.zip | |
improved messages from autojudge
Diffstat (limited to 'src')
| -rwxr-xr-x | src/private/autojudging.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/private/autojudging.php b/src/private/autojudging.php index d077866..f80ee68 100755 --- a/src/private/autojudging.php +++ b/src/private/autojudging.php @@ -433,6 +433,7 @@ if($retval != 0) { } $script = $dir . $ds . 'compare' . $ds . $run["extension"]; $retval = 0; + $answer='(Contact staff) nothing compared yet'; chmod($script, 0700); foreach($outputlist as $file) { $file = basename($file); @@ -454,7 +455,7 @@ if($retval != 0) { fwrite($fp, $dif[$difi]); if($difi >= 5000) fwrite($fp, "===OUTPUT OF COMPARING SCRIPT TOO LONG - TRUNCATED===\n"); else fwrite($fp, "===OUTPUT OF COMPARING SCRIPT ENDS HERE===\n"); - $answer = trim($dif[count($dif)-1]); + $answertmp = trim($dif[count($dif)-1]); fclose($fp); foreach (glob($dir . $ds . '*') as $fne) { @chown($fne,"nobody"); @@ -464,26 +465,26 @@ if($retval != 0) { if($localretval < 4 || $localretval > 6) { // contact staff $retval = 7; - $answer='(Contact staff)' . $answer; + $answer='(Contact staff)' . $answertmp; break; } if($localretval == 6) { $retval=$localretval; - $answer='(Wrong answer)'. $answer; + $answer='(Wrong answer)'. $answertmp; break; } if($localretval == 5) { $retval=$localretval; - $answer='(Presentation error)'. $answer; + $answer='(Presentation error)'. $answertmp; } else { if($localretval != 4) { $retval = 7; - $answer='(Contact staff)' . $answer; + $answer='(Contact staff)' . $answertmp; break; } if($retval == 0) { // YES! - $answer='(YES)' . $answer; + $answer='(YES)' . $answertmp; $retval = 1; } } |