diff --git a/admin/judges_teams.php b/admin/judges_teams.php
index 3a37b88..654d1a7 100644
--- a/admin/judges_teams.php
+++ b/admin/judges_teams.php
@@ -140,7 +140,8 @@ function delbuttonclicked(team_id,team_num,judge)
WHERE
judges_years.year='".$config['FAIRYEAR']."' AND
judges.id=judges_years.judges_id AND
- judges_teams_link.judges_id IS NULL
+ judges_teams_link.judges_id IS NULL AND
+ judges.complete='yes'
ORDER BY
lastname,
firstname";
diff --git a/register_judges.inc.php b/register_judges.inc.php
index a1951d8..a50f55a 100644
--- a/register_judges.inc.php
+++ b/register_judges.inc.php
@@ -106,4 +106,24 @@ if(!strstr($_SERVER['PHP_SELF'],"register_judges_password.php"))
}
}
+
+//ji = judgeinfo record from database (select * from judges where id='whatever')
+function updateJudgeCompleteStatus($ji)
+{
+ if( personalStatus()=="complete" &&
+ expertiseStatus()=="complete"
+ )
+ $complete="yes";
+ else
+ $complete="no";
+
+ if($complete!=$ji->complete)
+ {
+ mysql_query("UPDATE judges SET complete='$complete' WHERE id='".$ji->id."'");
+ }
+}
+
+//finally, if everything else is good, update their 'overall status' if it needs to be
+updateJudgeCompleteStatus($judgeinfo);
+
?>
diff --git a/register_judges_expertise.php b/register_judges_expertise.php
index 23c24b9..094319d 100644
--- a/register_judges_expertise.php
+++ b/register_judges_expertise.php
@@ -64,6 +64,7 @@
}
$q=mysql_query("SELECT * FROM judges WHERE email='".$_SESSION['email']."' AND id='".$_SESSION['judges_id']."'");
$judgeinfo=mysql_fetch_object($q);
+ updateJudgeCompleteStatus($judgeinfo);
//output the current status
$newstatus=expertiseStatus();
diff --git a/register_judges_main.php b/register_judges_main.php
index fcd4ed5..4151b3c 100644
--- a/register_judges_main.php
+++ b/register_judges_main.php
@@ -81,6 +81,7 @@
}
else
{
+ $overallstatus="complete";
echo i18n("Please use the checklist below to complete your registration. Click on an item in the table to edit that information. When you have entered all information, the Status field will change to Complete");
echo "
";
@@ -98,6 +99,7 @@
//check to see if its complete
$statuspersonal=personalStatus();
echo outputStatus($statuspersonal);
+ if($statuspersonal!="complete") $overallstatus="incomplete";
echo "";
/*
@@ -122,13 +124,29 @@
//check to see if its complete
$statusexpertise=expertiseStatus();
echo outputStatus($statusexpertise);
+ if($statusexpertise!="complete") $overallstatus="incomplete";
+ echo "";
+
+ echo "