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 "