forked from science-ation/science-ation
Make sure safety questions are only displayed/checked for the current fairyear
This commit is contained in:
parent
2179f3f709
commit
ba25b4ae86
@ -173,6 +173,8 @@ function mentorStatus($reg_id="")
|
||||
|
||||
function safetyStatus($reg_id="")
|
||||
{
|
||||
global $config;
|
||||
|
||||
if($reg_id) $rid=$reg_id;
|
||||
else $rid=$_SESSION['registration_id'];
|
||||
|
||||
@ -184,7 +186,7 @@ function safetyStatus($reg_id="")
|
||||
}
|
||||
|
||||
//now grab all the questions
|
||||
$q=mysql_query("SELECT * FROM safetyquestions ORDER BY ord");
|
||||
$q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord");
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
if($r->required=="yes" && !$safetyanswers[$r->id])
|
||||
|
@ -171,7 +171,7 @@
|
||||
if(mysql_num_rows($q)>0)
|
||||
{
|
||||
$r=mysql_fetch_object($q);
|
||||
print_r($r);
|
||||
// print_r($r);
|
||||
echo i18n("Please enter your <b>registration number</b> in order to continue your registration");
|
||||
echo "<input type=\"hidden\" name=\"action\" value=\"continue\">";
|
||||
$allownew=false;
|
||||
|
@ -112,7 +112,7 @@ else if($newstatus=="complete")
|
||||
$safetyanswers[$r->safetyquestions_id]=$r->answer;
|
||||
}
|
||||
|
||||
$q=mysql_query("SELECT * FROM safetyquestions ORDER BY ord");
|
||||
$q=mysql_query("SELECT * FROM safetyquestions WHERE year='".$config['FAIRYEAR']."' ORDER BY ord");
|
||||
$num=1;
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user