- Don't include judges that area already on a judging team (their ID appears in

judges_teams_link) in the pool of judges for the judges scheduler.
This commit is contained in:
dave 2006-08-02 07:43:02 +00:00
parent d01a3eede6
commit 5438821b1c

View File

@ -380,6 +380,16 @@ while($r=mysql_fetch_object($q))
unset($catprefs);
unset($langprefs);
/* Try to fetch a team link ID for this judge, if we can, we don't want to use this judge
* in the divisional awards, they are already assigned to soemthing */
$q2 = mysql_query("SELECT judges_id FROM judges_teams_link WHERE ".
"judges_id='$r->id' ".
" AND year='".$config['FAIRYEAR']."'");
if(mysql_num_rows($q2) != 0) {
TRACE("Judge [{$r->firstname} {$r->lastname}] is already on a judging team, skipping.\n");
continue;
}
//get category preferences
$q2=mysql_query("SELECT * FROM judges_catpref WHERE judges_id='$r->id' AND year='".$config['FAIRYEAR']."' ORDER BY projectcategories_id");
$catprefs=array();