mentors are also incomplete if we have less than we say we're gonna have

This commit is contained in:
james 2011-03-03 01:46:37 +00:00
parent 04dcd31b6a
commit 0d365bc731

View File

@ -181,26 +181,26 @@ function mentorStatus($reg_id="")
if($r->nummentors==null)
return "incomplete";
//grab all the mentors for this registration
$q=mysql_query("SELECT * FROM mentors WHERE registrations_id='$rid' AND conferences_id='".$conference['id']."'");
//if we dont have the minimum, return incomplete
if(mysql_num_rows($q)<$config['minmentorserproject'])
return "incomplete";
while($r=mysql_fetch_object($q))
{
foreach ($required_fields AS $req)
{
if(!$r->$req)
{
//and if we have less than they say we're gonna have, we're also incomplete
if(mysql_num_rows($q)<$r->nummentors)
return "incomplete";
while($r=mysql_fetch_object($q)) {
foreach ($required_fields AS $req) {
if(!$r->$req) {
return "incomplete";
}
}
}
//if it made it through without returning incomplete, then we must be complete
return "complete";
}
function safetyStatus($reg_id="")