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;
|
if($reg_id) $rid=$reg_id;
|
||||||
else $rid=$_SESSION['registration_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';
|
$returnval = 'complete';
|
||||||
while($sr=mysql_fetch_object($sq))
|
while($sr=mysql_fetch_object($sq)) {
|
||||||
{
|
|
||||||
$u = user_load($sr->id);
|
$u = user_load($sr->id);
|
||||||
if(!array_key_exists('emergencycontacts', $u)){
|
if(!array_key_exists('emergencycontacts', $u)){
|
||||||
$returnval = 'incomplete';
|
$returnval = 'incomplete';
|
||||||
@ -212,17 +211,14 @@ function safetyStatus($reg_id="")
|
|||||||
|
|
||||||
//grab all of their answers
|
//grab all of their answers
|
||||||
$q=mysql_query("SELECT * FROM safety WHERE registrations_id='$rid'");
|
$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;
|
$safetyanswers[$r->safetyquestions_id]=$r->answer;
|
||||||
}
|
}
|
||||||
|
|
||||||
//now grab all the questions
|
//now grab all the questions
|
||||||
$q=mysql_query("SELECT * FROM safetyquestions WHERE conferences_id='".$conference['id']."' ORDER BY ord");
|
$q=mysql_query("SELECT * FROM safetyquestions WHERE conferences_id='".$conference['id']."' ORDER BY ord");
|
||||||
while($r=mysql_fetch_object($q))
|
while($r=mysql_fetch_object($q)) {
|
||||||
{
|
if($r->required=="yes" && !$safetyanswers[$r->id]) {
|
||||||
if($r->required=="yes" && !$safetyanswers[$r->id])
|
|
||||||
{
|
|
||||||
return "incomplete";
|
return "incomplete";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user