From 5438821b1cdc1e41282872a5243985cd05455209 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 2 Aug 2006 07:43:02 +0000 Subject: [PATCH] - 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. --- admin/judges_sa.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/judges_sa.php b/admin/judges_sa.php index d5ad4848..5dae4951 100644 --- a/admin/judges_sa.php +++ b/admin/judges_sa.php @@ -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();