Copyright (C) 2005 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> $req) { return "incomplete"; } } } //if it made it through without returning incomplete, then we must be complete return "complete"; } function expertiseStatus() { global $config; //easiest check here is to check the number of divisions, then check the number of entries //that they have in the judges_expertise table. If they are the same, then we're good to go //if they are different, they forgot to fill one out (because it only gets inserted if a value) //is choosen, and they are always ALL removed before each update $q=mysql_query("SELECT COUNT(id) AS num FROM projectdivisions WHERE year='".$config['FAIRYEAR']."'"); $r=mysql_fetch_object($q); $numdivisions=$r->num; $q=mysql_query("SELECT COUNT(id) AS num FROM judges_expertise WHERE projectdivisions_id IS NOT NULL AND judges_id='".$_SESSION['judges_id']."' AND year='".$config['FAIRYEAR']."'"); $r=mysql_fetch_object($q); $numjudgesexpertise=$r->num; if($numdivisions == $numjudgesexpertise) return "complete"; else return "incomplete"; } ?>