diff options
| author | cassiopc <cassiopc@gmail.com> | 2013-09-11 13:11:38 +0000 |
|---|---|---|
| committer | cassiopc <cassiopc@gmail.com> | 2013-09-11 13:11:38 +0000 |
| commit | 91ddcb9dd5405438bd335ca2ca16f6f9149ccba8 (patch) | |
| tree | 16a1e1257b13c64dd22f080b3cf10dccd42a098d /src | |
| parent | 8c4f0fe4db623cf3ff81ab49a97f4707c85def37 (diff) | |
| download | boca-91ddcb9dd5405438bd335ca2ca16f6f9149ccba8.tar.gz boca-91ddcb9dd5405438bd335ca2ca16f6f9149ccba8.zip | |
fixed sysvutils issue with new distros and updated ordering of reports and exclusion of judge runs from reports
Diffstat (limited to 'src')
| -rw-r--r-- | src/admin/report/clar.php | 2 | ||||
| -rw-r--r-- | src/admin/report/run.php | 6 | ||||
| -rw-r--r-- | src/admin/report/task.php | 2 | ||||
| -rw-r--r-- | src/fclar.php | 6 | ||||
| -rw-r--r-- | src/frun.php | 14 |
5 files changed, 16 insertions, 14 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"; |