diff --git a/db/db.update.14.sql b/db/db.update.14.sql new file mode 100644 index 0000000..b3506f3 --- /dev/null +++ b/db/db.update.14.sql @@ -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'); diff --git a/register_participants.inc.php b/register_participants.inc.php index 396a5d6..6e4c169 100644 --- a/register_participants.inc.php +++ b/register_participants.inc.php @@ -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"; diff --git a/register_participants_students.php b/register_participants_students.php index 77962df..aa0a552 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -239,6 +239,8 @@ else if($newstatus=="complete") echo " ".i18n("Last Name")."lastname\" />".REQUIREDFIELD."\n"; echo "\n"; +if($config['participant_student_personal']=="yes") +{ echo "\n"; echo " ".i18n("Sex").""; echo "".REQUIREDFIELD; - +} echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo " ".i18n("Email Address")."email\" />".REQUIREDFIELD."\n"; + +if($config['participant_student_personal']=="yes") +{ echo " ".i18n("City")."city\" />".REQUIREDFIELD."\n"; +} +else +{ + echo ""; +} + echo "\n"; + +if($config['participant_student_personal']=="yes") +{ echo "\n"; echo " ".i18n("Address")."address\" />".REQUIREDFIELD."\n"; echo " ".i18n("Province").""; @@ -285,6 +299,10 @@ else if($newstatus=="complete") emit_year_selector("year[$x]",$year,$minyearselect,$maxyearselect); echo "".REQUIREDFIELD."\n"; echo "\n"; +} +else + echo ""; + echo " ".i18n("Grade")."\n"; echo "