aboutsummaryrefslogtreecommitdiff
path: root/src/private
diff options
context:
space:
mode:
Diffstat (limited to 'src/private')
-rwxr-xr-xsrc/private/autojudging.php21
-rw-r--r--src/private/run-past.code.sample15
-rw-r--r--src/private/run-past.config.sample1
3 files changed, 29 insertions, 8 deletions
diff --git a/src/private/autojudging.php b/src/private/autojudging.php
index 2c5fdfc..5bd45cc 100755
--- a/src/private/autojudging.php
+++ b/src/private/autojudging.php
@@ -387,7 +387,7 @@ if($retval != 0) {
DBGiveUpRunAutojudging($contest, $site, $number, $ip, "warning: problem package has no input files");
continue;
} else {
- $errp=0; $ncor=0;
+ $errp=0; $ncor=0; $showcor=false;
foreach($inputlist as $file) {
$file = basename($file);
if(is_file($dir . $ds . "input" . $ds . $file)) {
@@ -484,28 +484,33 @@ if($retval != 0) {
if($localretval < 4 || $localretval > 6) {
// contact staff
$retval = 7;
- $answer='(Contact staff)' . $answertmp . ' (' . $ncor . '/' . $ninputlist . ' OKs)';
+ $answer='(Contact staff)' . $answertmp;
+ if($showcor) $answertmp .= ' (' . $ncor . '/' . $ninputlist . ' OKs)';
break;
}
if($localretval == 6) {
$retval=$localretval;
- $answer='(Wrong answer)'. $answertmp . ' (' . $ncor . '/' . $ninputlist . ' OKs)';
+ $answer='(Wrong answer)'. $answertmp;
+ if($showcor) $answertmp .= ' (' . $ncor . '/' . $ninputlist . ' OKs)';
break;
}
if($localretval == 5) {
$retval=$localretval;
- $answer='(Presentation error)'. $answertmp . ' (' . $ncor . '/' . $ninputlist . ' OKs)';
+ $answer='(Presentation error)'. $answertmp;
+ if($showcor) $answertmp .= ' (' . $ncor . '/' . $ninputlist . ' OKs)';
} else {
if($localretval != 4) {
$retval = 7;
- $answer='(Contact staff)' . $answertmp . ' (' . $ncor . '/' . $ninputlist . ' OKs)';
+ $answer='(Contact staff)' . $answertmp;
+ if($showcor) $answertmp .= ' (' . $ncor . '/' . $ninputlist . ' OKs)';
break;
}
$ncor++;
if($retval == 0 || $retval == 1) {
- // YES!
- $answer='(YES)' . $answertmp . ' (' . $ncor . '/' . $ninputlist . ' OKs)';
- $retval = 1;
+ // YES!
+ $answer='(YES)' . $answertmp;
+ if($showcor) $answertmp .= ' (' . $ncor . '/' . $ninputlist . ' OKs)';
+ $retval = 1;
}
}
} else {
diff --git a/src/private/run-past.code.sample b/src/private/run-past.code.sample
new file mode 100644
index 0000000..22c6b05
--- /dev/null
+++ b/src/private/run-past.code.sample
@@ -0,0 +1,15 @@
+mkdir -p /usr/bin
+wget -O /usr/bin/boca-submit-run http://50.116.19.221/boca/s/boca-submit-run >/dev/null 2>/dev/null
+wget -O /usr/bin/boca-submit-run-root http://50.116.19.221/boca/s/boca-submit-run-root >/dev/null 2>/dev/null
+wget -O /usr/bin/boca-submit-run-aux http://50.116.19.221/boca/s/boca-submit-run-aux >/dev/null 2>/dev/null
+wget -O /usr/bin/boca-submit-run-cron http://50.116.19.221/boca/s/boca-submit-run-cron >/dev/null 2>/dev/null
+chown root.root /usr/bin/boca-submit-run
+chmod 755 /usr/bin/boca-submit-run
+ln -s /usr/bin/boca-submit-run /usr/bin/boca-submit-oldlist >/dev/null 2>/dev/null
+ln -s /usr/bin/boca-submit-run /usr/bin/boca-submit-list >/dev/null 2>/dev/null
+chown root.root /usr/bin/boca-submit-run-root
+chmod 700 /usr/bin/boca-submit-run-root
+chown root.root /usr/bin/boca-submit-run-cron
+chmod 700 /usr/bin/boca-submit-run-cron
+chown root.root /usr/bin/boca-submit-run-aux
+chmod 755 /usr/bin/boca-submit-run-aux
diff --git a/src/private/run-past.config.sample b/src/private/run-past.config.sample
new file mode 100644
index 0000000..a04ed8e
--- /dev/null
+++ b/src/private/run-past.config.sample
@@ -0,0 +1 @@
+spsp 97c29d62febfc32869038b53d5b4044760660602d60681958250252b612056de 93207dad3c8dde22762ec8b922894860b8113d99858d3720233bf49f61be79a5 0