forked from science-ation/science-ation
Few code touchups, emergencyContactStatus pulls from users
not students
This commit is contained in:
parent
0b50b6b8f8
commit
4fe1b04db3
@ -102,10 +102,9 @@ function emergencycontactStatus($reg_id="")
|
||||
if($reg_id) $rid=$reg_id;
|
||||
else $rid=$_SESSION['registration_id'];
|
||||
|
||||
$sq=mysql_query("SELECT id FROM students WHERE registrations_id='$rid' AND conferences_id='".$conference['id']."'");
|
||||
$sq=mysql_query("SELECT id FROM users WHERE registrations_id='$rid' AND conferences_id='".$conference['id']."'");
|
||||
$returnval = 'complete';
|
||||
while($sr=mysql_fetch_object($sq))
|
||||
{
|
||||
while($sr=mysql_fetch_object($sq)) {
|
||||
$u = user_load($sr->id);
|
||||
if(!array_key_exists('emergencycontacts', $u)){
|
||||
$returnval = 'incomplete';
|
||||
@ -212,17 +211,14 @@ function safetyStatus($reg_id="")
|
||||
|
||||
//grab all of their answers
|
||||
$q=mysql_query("SELECT * FROM safety WHERE registrations_id='$rid'");
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
$safetyanswers[$r->safetyquestions_id]=$r->answer;
|
||||
}
|
||||
|
||||
//now grab all the questions
|
||||
$q=mysql_query("SELECT * FROM safetyquestions WHERE conferences_id='".$conference['id']."' ORDER BY ord");
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
if($r->required=="yes" && !$safetyanswers[$r->id])
|
||||
{
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
if($r->required=="yes" && !$safetyanswers[$r->id]) {
|
||||
return "incomplete";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user