diff --git a/admin/judges.inc.php b/admin/judges.inc.php index a8f6c30..0fe7801 100644 --- a/admin/judges.inc.php +++ b/admin/judges.inc.php @@ -51,6 +51,10 @@ function getJudgingTeams() { $u = user_load($mr->judges_id, false); $judgelangs = join('/', $u['languages']); + foreach($u['languages'] AS $l) { + if(!in_array($l,$teamlangs)) + $teamlangs[]=$l; + } $teams[$lastteamid]['members'][]=array( "id"=>$mr->judges_id, diff --git a/admin/judges_sa.php b/admin/judges_sa.php index 3647f9a..d4db03d 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -466,17 +466,18 @@ foreach($judges as &$j) { unset($judges[$j['id']]); continue; } - - /* Load the judge time availability */ - $q = mysql_query("SELECT * FROM judges_availability WHERE users_id='{$j['id']}' ORDER BY `start`"); - if(mysql_num_rows($q) == 0) { - TRACE(" {$j['name']} hasn't selected any time availability, POTENTIAL BUG (they shouldn't be marked as complete).\n"); - TRACE(" Ignoring this judge.\n"); - unset($judges[$j['id']]); - continue; - } - while($r = mysql_fetch_assoc($q)) { - $j['availability'][] = $r; + if($config['judges_availability_enable']=="yes") { + /* Load the judge time availability */ + $q = mysql_query("SELECT * FROM judges_availability WHERE users_id='{$j['id']}' ORDER BY `start`"); + if(mysql_num_rows($q) == 0) { + TRACE(" {$j['name']} hasn't selected any time availability, POTENTIAL BUG (they shouldn't be marked as complete).\n"); + TRACE(" Ignoring this judge.\n"); + unset($judges[$j['id']]); + continue; + } + while($r = mysql_fetch_assoc($q)) { + $j['availability'][] = $r; + } } /* Load special award preferences */ @@ -1310,7 +1311,7 @@ for($k=0; $k<$keys_count; $k++) { print_r($jteams_ids); */ print("Jteams ids len=".count($jteams_ids)); - print("\n"); + print("n_timeslots=$n_timeslots\n"); set_percent(50 + ($k / $keys_count) * 50); diff --git a/admin/judges_schedulerconfig_check.inc.php b/admin/judges_schedulerconfig_check.inc.php index a542e93..c8c482c 100644 --- a/admin/judges_schedulerconfig_check.inc.php +++ b/admin/judges_schedulerconfig_check.inc.php @@ -7,9 +7,13 @@ function judges_scheduler_check_timeslots() $q=mysql_query("SELECT * FROM judges_timeslots WHERE ". " year='".$config['FAIRYEAR']."'". " AND `type`='divisional1'" ); - $rows = mysql_num_rows($q); - - return $rows; + if(mysql_num_rows($q)) { + $round=mysql_fetch_object($q); + $q=mysql_query("SELECT * FROM judges_timeslots WHERE round_id='$round->id' AND type='timeslot'"); + return mysql_num_rows($q); + } + else + return 0; } function judges_scheduler_check_awards() diff --git a/admin/judges_teams_projects.php b/admin/judges_teams_projects.php index 1969055..4288bbf 100644 --- a/admin/judges_teams_projects.php +++ b/admin/judges_teams_projects.php @@ -350,10 +350,8 @@ if( ($action=="edit" || $action=="assign" ) && $edit) echo ""; echo "".$team['name']." (#".$team['num'].")
"; $memberlist=""; - if(count($team['members'])) - { - foreach($team['members'] AS $member) - { + if(count($team['members'])) { + foreach($team['members'] AS $member) { echo "  "; if($member['captain']=="yes") echo "";