implement system to keep track of which judges are complete

make judge teams only list complete judges
This commit is contained in:
james 2005-03-10 19:43:49 +00:00
parent e049de4562
commit 258db162c7
5 changed files with 44 additions and 3 deletions

View File

@ -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";

View File

@ -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);
?>

View File

@ -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();

View File

@ -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 <b>Status</b> field will change to <b>Complete</b>");
echo "<br />";
@ -98,6 +99,7 @@
//check to see if its complete
$statuspersonal=personalStatus();
echo outputStatus($statuspersonal);
if($statuspersonal!="complete") $overallstatus="incomplete";
echo "</td></tr>";
/*
@ -122,13 +124,29 @@
//check to see if its complete
$statusexpertise=expertiseStatus();
echo outputStatus($statusexpertise);
if($statusexpertise!="complete") $overallstatus="incomplete";
echo "</td></tr>";
echo "<tr><td colspan=\"2\"><hr></td></tr>";
echo "<tr><td>".i18n("Overall Status")."</td><td>";
echo outputStatus($overallstatus);
echo "</td></tr>";
echo "</table>";
echo "<br />";
echo "<br />";
if($overallstatus!="complete")
{
echo error(i18n("You will not be marked as an active judge until your \"Overall Status\" is \"Complete\""));
}
else
{
echo happy(i18n("Thank you for completing the judge registration process. We look forward to seeing you at the fair"));
}
echo "<br />";
echo i18n("If you are unable to participate as a judge in the %1 %2 please click the deactivate button below to deactivate your judges account for the fair",array($config['FAIRYEAR'],$config['fairname']));
echo "<br />";
echo "<br />";

View File

@ -79,6 +79,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=personalStatus();