aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2013-09-11 13:11:38 +0000
committercassiopc <cassiopc@gmail.com>2013-09-11 13:11:38 +0000
commit91ddcb9dd5405438bd335ca2ca16f6f9149ccba8 (patch)
tree16a1e1257b13c64dd22f080b3cf10dccd42a098d
parent8c4f0fe4db623cf3ff81ab49a97f4707c85def37 (diff)
downloadboca-91ddcb9dd5405438bd335ca2ca16f6f9149ccba8.tar.gz
boca-91ddcb9dd5405438bd335ca2ca16f6f9149ccba8.zip
fixed sysvutils issue with new distros and updated ordering of reports and exclusion of judge runs from reports
-rw-r--r--src/admin/report/clar.php2
-rw-r--r--src/admin/report/run.php6
-rw-r--r--src/admin/report/task.php2
-rw-r--r--src/fclar.php6
-rw-r--r--src/frun.php14
-rwxr-xr-xtools/installv2.sh18
6 files changed, 28 insertions, 20 deletions
diff --git a/src/admin/report/clar.php b/src/admin/report/clar.php
index 66bd4cd..61816d9 100644
--- a/src/admin/report/clar.php
+++ b/src/admin/report/clar.php
@@ -40,7 +40,7 @@ $s = $st;
if (trim($s["sitejudging"])!="") $s["sitejudging"].=",".$_SESSION["usertable"]["usersitenumber"];
else $s["sitejudging"]=$_SESSION["usertable"]["usersitenumber"];
-$clar = DBAllClarsInSites($_SESSION["usertable"]["contestnumber"], $s["sitejudging"], 'normal');
+$clar = DBAllClarsInSites($_SESSION["usertable"]["contestnumber"], $s["sitejudging"], 'report');
for ($i=0; $i<count($clar); $i++) {
echo " <tr>\n";
diff --git a/src/admin/report/run.php b/src/admin/report/run.php
index 422200d..9b65d2b 100644
--- a/src/admin/report/run.php
+++ b/src/admin/report/run.php
@@ -1,7 +1,7 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
-// Copyright (C) 2003-2012 by BOCA Development Team (bocasystem@gmail.com)
+// Copyright (C) 2003-2013 by BOCA Development Team (bocasystem@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
-// Last modified 05/aug/2012 by cassio@ime.usp.br
+// Last modified 06/sep/2013 by cassio@ime.usp.br
require('header.php');
?>
@@ -40,7 +40,7 @@ $s = $st;
if (trim($s["sitejudging"])!="") $s["sitejudging"].=",".$_SESSION["usertable"]["usersitenumber"];
else $s["sitejudging"]=$_SESSION["usertable"]["usersitenumber"];
-$run = DBAllRunsInSites($_SESSION["usertable"]["contestnumber"], $s["sitejudging"], 'normal');
+$run = DBAllRunsInSites($_SESSION["usertable"]["contestnumber"], $s["sitejudging"], 'report');
for ($i=0; $i<count($run); $i++) {
echo " <tr>\n";
diff --git a/src/admin/report/task.php b/src/admin/report/task.php
index 59ca0e2..30f3799 100644
--- a/src/admin/report/task.php
+++ b/src/admin/report/task.php
@@ -33,7 +33,7 @@ require('header.php');
</tr>
<?php
$s = $st;
-$task = DBAllTasksInSites($_SESSION["usertable"]["contestnumber"], $s["sitetasking"], 'normal');
+$task = DBAllTasksInSites($_SESSION["usertable"]["contestnumber"], $s["sitetasking"], 'report');
$cf = globalconf();
for ($i=0; $i<count($task); $i++) {
$st = $task[$i]["status"];
diff --git a/src/fclar.php b/src/fclar.php
index 0a7b439..7c73975 100644
--- a/src/fclar.php
+++ b/src/fclar.php
@@ -1,7 +1,7 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
-// Copyright (C) 2003-2012 by BOCA Development Team (bocasystem@gmail.com)
+// Copyright (C) 2003-2013 by BOCA Development Team (bocasystem@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
-// Last modified 05/aug/2012 by cassio@ime.usp.br
+// Last modified 06/sep/2013 by cassio@ime.usp.br
function DBDropClarTable() {
$c = DBConnect();
@@ -473,7 +473,7 @@ function DBOpenClarsSNS($contest,$site,$st,$order='clar') {
else if ($order == "user")
$sql .= "c.usernumber,c.clarsitenumber,";
- if ($st == 1 || $order == "normal")
+ if ($st == 1 || $order == "report")
$sql .= "c.clarnumber";
else
$sql .= "c.clardatediff desc";
diff --git a/src/frun.php b/src/frun.php
index f786602..e272b85 100644
--- a/src/frun.php
+++ b/src/frun.php
@@ -1,7 +1,7 @@
<?php
////////////////////////////////////////////////////////////////////////////////
//BOCA Online Contest Administrator
-// Copyright (C) 2003-2012 by BOCA Development Team (bocasystem@gmail.com)
+// Copyright (C) 2003-2013 by BOCA Development Team (bocasystem@gmail.com)
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
-// Last modified 21/jul/2012 by cassio@ime.usp.br
+// Last modified 06/sep/2013 by cassio@ime.usp.br
function DBDropRunTable() {
$c = DBConnect();
@@ -551,9 +551,9 @@ function DBOpenRunsSNS($contest,$site,$st,$order='run') {
"a.runanswer as answer, r.runfilename as filename, " .
"r.runanswer1 as answer1, r.runanswer2 as answer2, " .
"r.autobegindate as autobegin, r.autoenddate as autoend, r.autoanswer as autoanswer ".
- "from runtable as r, problemtable as p, langtable as l, answertable as a " .
- "where r.contestnumber=$contest and p.contestnumber=r.contestnumber and " .
- "r.runproblem=p.problemnumber and l.contestnumber=r.contestnumber and " .
+ "from runtable as r, problemtable as p, langtable as l, answertable as a, usertable as u " .
+ "where r.contestnumber=$contest and p.contestnumber=r.contestnumber and u.contestnumber=r.contestnumber and " .
+ "r.runproblem=p.problemnumber and l.contestnumber=r.contestnumber and r.usernumber=u.usernumber and r.runsitenumber=u.usersitenumber and " .
"l.langnumber=r.runlangnumber and a.answernumber=r.runanswer and " .
"a.contestnumber=r.contestnumber";
if ($site != "x") {
@@ -576,6 +576,8 @@ function DBOpenRunsSNS($contest,$site,$st,$order='run') {
" (r.runjudge2!=". $_SESSION["usertable"]["usernumber"] . " or " .
"r.runjudgesite2!=". $_SESSION["usertable"]["usersitenumber"] . ") and " .
" (not (r.runjudge1 is null)) and (not (r.runjudge2 is null))))";
+ if ($order == 'report')
+ $sql .= " and (u.usertype != 'judge')";
$sql .= " and (not r.runstatus = 'judged') " .
" and not r.runstatus ~ 'deleted' order by ";
} else $sql .= " order by ";
@@ -595,7 +597,7 @@ function DBOpenRunsSNS($contest,$site,$st,$order='run') {
else if ($order == "user")
$sql .= "r.usernumber,r.runsitenumber,";
- if ($st == 1 || $order == "normal")
+ if ($st == 1 || $order == "report")
$sql .= "r.runnumber";
else
$sql .= "r.rundatediff desc";
diff --git a/tools/installv2.sh b/tools/installv2.sh
index e35ce1a..302c5e4 100755
--- a/tools/installv2.sh
+++ b/tools/installv2.sh
@@ -15,10 +15,10 @@
# // You should have received a copy of the GNU General Public License
# // along with this program. If not, see <http://www.gnu.org/licenses/>.
# ////////////////////////////////////////////////////////////////////////////////
-# // Last modified 03/sep/2013 by cassio@ime.usp.br
+# // Last modified 11/sep/2013 by cassio@ime.usp.br
#///////////////////////////////////////////////////////////////////////////////////////////
echo "#############################################################"
-echo "### installv2.sh of 03/Sept/2013 (A) by cassio@ime.usp.br ###"
+echo "### installv2.sh of 11/Sept/2013 (A) by cassio@ime.usp.br ###"
echo "#############################################################"
apt-get install python-software-properties software-properties-common
@@ -73,9 +73,15 @@ apt-get -y purge libreoffice-common libreoffice-base-core bluez thunderbird \
ubuntuone-client python-ubuntuone-client \
ubuntuone-installer python-ubuntuone-storageprotocol
-sysvutils=sysvutils
-if [ "$DISTRIB_CODENAME" == "oneiric" -o "$DISTRIB_CODENAME" == "precise" ]; then
- sysvutils=sysvinit-utils
+echo "========= INSTALLING SYSVINIT-UTILS ==========="
+apt-get -y install sysvinit-utils
+if [ $? != 0 ]; then
+ apt-get -y install sysvutils
+ if [ $? != 0 ]; then
+ echo ""
+ echo "ERROR running the apt-get -- must check if all needed packages are available"
+ exit 1
+ fi
fi
echo "====================================================================="
@@ -114,7 +120,7 @@ apt-get -y install zenity apache2 eclipse-pde eclipse-rcp eclipse-platform eclip
evince g++ gcc gedit scite libstdc++6 makepasswd manpages-dev mii-diag php5-cli php5-mcrypt openjdk-6-dbg \
php5 php5-pgsql postgresql postgresql-client postgresql-contrib quota sharutils default-jdk openjdk-6-doc \
vim-gnome geany geany-plugin-addons geany-plugin-gdb geany-plugins default-jre sysstat \
- $sysvutils vim xfce4 $libCppdev $libCppdoc $libCppdbg php5-gd stl-manual gcc-doc debootstrap schroot c++-annotations
+ vim xfce4 $libCppdev $libCppdoc $libCppdbg php5-gd stl-manual gcc-doc debootstrap schroot c++-annotations
if [ $? != 0 ]; then
echo ""
echo "ERROR running the apt-get -- must check if all needed packages are available"