forked from science-ation/science-ation
Add a configuration option to specify whether to collect 'personal' information about the students, such as address, phone number, date of birth, etc.
This commit is contained in:
parent
99af4b4f4a
commit
1771c83da4
2
db/db.update.14.sql
Normal file
2
db/db.update.14.sql
Normal file
@ -0,0 +1,2 @@
|
||||
INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '-1');
|
||||
INSERT INTO `config` ( `var` , `val` , `description` , `year` ) VALUES ( 'participant_student_personal', 'yes', 'Collect personal information about the students, such as phone number, address, gender, etc.', '2006');
|
@ -49,7 +49,10 @@ function registrationDeadlinePassed()
|
||||
function studentStatus($reg_id="")
|
||||
{
|
||||
global $config;
|
||||
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","dateofbirth","schools_id");
|
||||
if($config['participant_student_personal']=="yes")
|
||||
$required_fields=array("firstname","lastname","address","city","postalcode","phone","email","grade","dateofbirth","schools_id");
|
||||
else
|
||||
$required_fields=array("firstname","lastname","email","grade","schools_id");
|
||||
|
||||
if($config['participant_student_tshirt']=="yes")
|
||||
$required_fields[]="tshirt";
|
||||
|
@ -239,6 +239,8 @@ else if($newstatus=="complete")
|
||||
echo " <td>".i18n("Last Name")."</td><td><input type=\"text\" name=\"lastname[$x]\" value=\"$studentinfo->lastname\" />".REQUIREDFIELD."</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Sex")."</td><td>";
|
||||
echo "<select name=\"sex[$x]\">";
|
||||
@ -248,15 +250,27 @@ else if($newstatus=="complete")
|
||||
if($studentinfo->sex=="female") $sel="selected=\"selected\""; else $sel="";
|
||||
echo "<option $sel value=\"female\">".i18n("Female")."</option>\n";
|
||||
echo "</select>".REQUIREDFIELD;
|
||||
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo " <td></td><td></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Email Address")."</td><td><input type=\"text\" name=\"email[$x]\" value=\"$studentinfo->email\" />".REQUIREDFIELD."</td>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo " <td>".i18n("City")."</td><td><input type=\"text\" name=\"city[$x]\" value=\"$studentinfo->city\" />".REQUIREDFIELD."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td></td>";
|
||||
}
|
||||
|
||||
echo "</tr>\n";
|
||||
|
||||
if($config['participant_student_personal']=="yes")
|
||||
{
|
||||
echo "<tr>\n";
|
||||
echo " <td>".i18n("Address")."</td><td><input type=\"text\" name=\"address[$x]\" value=\"$studentinfo->address\" />".REQUIREDFIELD."</td>\n";
|
||||
echo " <td>".i18n("Province")."</td><td>";
|
||||
@ -285,6 +299,10 @@ else if($newstatus=="complete")
|
||||
emit_year_selector("year[$x]",$year,$minyearselect,$maxyearselect);
|
||||
echo "</td><td>".REQUIREDFIELD."</td></tr></table>\n";
|
||||
echo "</td>\n";
|
||||
}
|
||||
else
|
||||
echo "<tr>";
|
||||
|
||||
echo " <td>".i18n("Grade")."</td><td>\n";
|
||||
|
||||
echo "<select name=\"grade[$x]\">\n";
|
||||
|
Loading…
Reference in New Issue
Block a user