diff --git a/admin/judges_sa.php b/admin/judges_sa.php index 71460b99..7421c86d 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -42,6 +42,10 @@ function TRACE_R($array) { print_r($array); } TRACE("
"); +$round_divisional1 = NULL; +$round_divisional2 = NULL; + + function set_status($txt) { @@ -89,7 +93,8 @@ function judges_cost_function($annealer, $bucket_id, $ids) { global $config; global $jteam; - global $judges; + global $judges, $round_divisional2; + /* Bucket ID is the team number */ /* ids are the judge ids currently in the bucket */ @@ -166,8 +171,10 @@ function judges_cost_function($annealer, $bucket_id, $ids) $cost += 40; /* Huge penalty for not having a round2 person on the team */ - if($have_div2 == false) - $cost += 40; + if($round_divisional2 != NULL) { + if($have_div2 == false) + $cost += 40; + } // TRACE("Team $bucket_id, cost is $cost\n"); @@ -334,8 +341,6 @@ while($r=mysql_fetch_object($q)) { } TRACE("Loading Judging Round time data...\n"); -$round_divisional1 = NULL; -$round_divisional2 = NULL; $round_special_awards = array(); $round = array(); $q = mysql_query("SELECT * FROM judges_timeslots WHERE round_id='0' AND `year`='{$config['FAIRYEAR']}'");