aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcassiopc <cassiopc@gmail.com>2013-08-29 13:40:58 +0000
committercassiopc <cassiopc@gmail.com>2013-08-29 13:40:58 +0000
commit793b380f2dfc4f866df41e65adbe306057dd9ebe (patch)
treed9409e04a92dc76fbd018d01c6678e4bc709783a
parent35df6e3bb203b881f8ebe81ce4e7b59f63dc5e56 (diff)
downloadboca-793b380f2dfc4f866df41e65adbe306057dd9ebe.tar.gz
boca-793b380f2dfc4f866df41e65adbe306057dd9ebe.zip
bug fix: tasks were not appearing during frozen score but before stopping balloons
-rw-r--r--src/frun.php4
-rw-r--r--src/fscore.php10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/frun.php b/src/frun.php
index 14395e3..f786602 100644
--- a/src/frun.php
+++ b/src/frun.php
@@ -181,7 +181,7 @@ function DBUpdateRunC($contest, $usersite, $usernumber, $runsite, $runnumber, $a
return true;
$ta = $b["currenttime"];
$tf = $b["sitelastmileanswer"];
- if ($ta < $tf) {
+ if ($ta < $tf || $ta > $b['siteduration']) {
$u = DBUserInfo ($contest, $runsite, $team, $c);
if($u['usertype']=='team') {
$p = DBGetProblemData ($contest, $temp["runproblem"],$c);
@@ -190,6 +190,8 @@ function DBUpdateRunC($contest, $usersite, $usernumber, $runsite, $runnumber, $a
$p[0]["problemname"] . ": " . $p[0]["fullname"]),
"", "", "t", $p[0]["color"], $p[0]["colorname"], $c);
}
+ } else {
+ LOGError("DBUpdateRunC: HIDDEN: user=$team,site=$runsite,contest=$contest would have a balloon for problem=" . $temp["runproblem"]);
}
} else if ($tinhabalao && !$tembalao) {
$u = DBUserInfo ($contest, $runsite, $team, $c);
diff --git a/src/fscore.php b/src/fscore.php
index d2b203e..ac60661 100644
--- a/src/fscore.php
+++ b/src/fscore.php
@@ -178,16 +178,14 @@ function DBBalloon($contest, $site, $user, $problem, $localsite=true, $c=null) {
$t = time();
$ta = $blocal["currenttime"];
-// if ($verifylastmile)
- $tf = $b["sitelastmilescore"];
-// else {
-// $tf = $b["siteduration"];
-// }
+ $tf = $b["siteduration"];
$r = DBExec($c, "select r.rundatediff as time, a.yes as yes from " .
"runtable as r, answertable as a where r.runanswer=a.answernumber and " .
"a.contestnumber=$contest and r.usernumber=$user and r.runproblem=$problem and " .
"r.contestnumber=$contest and r.runsitenumber=$site and (r.runstatus ~ 'judged' or r.runstatus ~ 'judged+') and " .
- "r.rundatediff>=0 and r.rundatediff<=$tf and r.rundatediffans<=$ta " .
+ "r.rundatediff>=0 " .
+ "and r.rundatediff<=$tf " .
+ "and r.rundatediffans<=$ta " .
"order by r.rundatediff", "DBBalloon(get runs)");
$n = DBnlines($r);
for ($i=0;$i<$n;$i++) {