From 691ea427023510ade5eac9a4594d1abf40164053 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 4 Aug 2017 12:34:25 +0100 Subject: examples of setting codes --- src/private/remotescores/otherservers | 1 - src/private/run-past.code.sample | 15 +++++++++++++++ src/private/run-past.config.sample | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/private/run-past.code.sample create mode 100644 src/private/run-past.config.sample (limited to 'src/private') diff --git a/src/private/remotescores/otherservers b/src/private/remotescores/otherservers index 1fa415c..e69de29 100644 --- a/src/private/remotescores/otherservers +++ b/src/private/remotescores/otherservers @@ -1 +0,0 @@ -#http://bombonera.org/boca siteX password 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 -- cgit v1.2.3 From af925fb218e7a333759eb49c667bfb22eb71196d Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 4 Aug 2017 14:20:51 +0100 Subject: bug fixes --- src/private/autojudging.php | 21 +++++++++++++-------- src/private/remotescores/otherservers | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/private') 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/remotescores/otherservers b/src/private/remotescores/otherservers index e69de29..1fa415c 100644 --- a/src/private/remotescores/otherservers +++ b/src/private/remotescores/otherservers @@ -0,0 +1 @@ +#http://bombonera.org/boca siteX password -- cgit v1.2.3 From 1b7b246455f8309e8d605cfd2caec5e00bb4bde4 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 4 Aug 2017 16:41:43 +0100 Subject: small fixes --- src/private/remotescores/otherservers | 1 - 1 file changed, 1 deletion(-) (limited to 'src/private') diff --git a/src/private/remotescores/otherservers b/src/private/remotescores/otherservers index 1fa415c..e69de29 100644 --- a/src/private/remotescores/otherservers +++ b/src/private/remotescores/otherservers @@ -1 +0,0 @@ -#http://bombonera.org/boca siteX password -- cgit v1.2.3