From dfb54ec9dfe40c7bdb2a19960a6f5f4430edbf44 Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 16 Feb 2011 19:08:58 +0000 Subject: [PATCH] Added date of birth, food requriements, t-shirt size and medical alert info to the users table as student fields --- db/db.code.version.txt | 2 +- db/db.update.227.sql | 5 +++++ user.inc.php | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 db/db.update.227.sql diff --git a/db/db.code.version.txt b/db/db.code.version.txt index f414671..2c36bbd 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -226 +227 diff --git a/db/db.update.227.sql b/db/db.update.227.sql new file mode 100644 index 0000000..e3e705e --- /dev/null +++ b/db/db.update.227.sql @@ -0,0 +1,5 @@ +ALTER TABLE `users` +ADD `dateofbirth` DATE NOT NULL DEFAULT '0000-00-00' COMMENT 'student', +ADD `foodreq` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'student', +ADD `tshirt` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'student', +ADD `medicalalert` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'student'; diff --git a/user.inc.php b/user.inc.php index 5f18d65..be8a991 100644 --- a/user.inc.php +++ b/user.inc.php @@ -305,7 +305,7 @@ function user_get_role_fields($role){ } break; case 'participant': - $fields = array('grade', 'schools_id'); + $fields = array('grade', 'schools_id', 'foodreq', 'tshirt', 'medicalalert', 'dateofbirth'); break; case 'fair': $fields = array('fairs_id'); @@ -357,7 +357,11 @@ function user_get_field_info($noConference = false){ 'schools_id' => array('label' => 'School', 'group' => 'Personal Information'), 'grade' => array('label' => 'Grade', 'group' => 'Personal Information'), 'special_awards' => array('label' => 'Special Awards', 'group' => 'Judges'), - 'volunteer_positions' => array('label' => 'Volunteer Positions', 'group' => 'Volunteers') + 'volunteer_positions' => array('label' => 'Volunteer Positions', 'group' => 'Volunteers'), + 'foodreq' => array('label' => 'Special Food Requirements', 'group' => 'Personal Information'), + 'tshirt' => array('label' => 'T-shirt Size', 'group' => 'Personal Information'), + 'medicalalert' => array('label' => 'Medical Alert Info', 'group' => 'Personal Information'), + 'dateofbirth' => array('label' => 'Date of Birth', 'group' => 'Personal Information') ); if($noConference){ $returnval['cat_prefs'] = array('label' => 'Category Preferences', 'group' => 'Judges');