Add optgroup headers and shuffle some fields around for student reports

This commit is contained in:
dave 2010-04-12 00:23:21 +00:00
parent 3597f83ee9
commit 072e07a06f

View File

@ -90,6 +90,7 @@ $report_students_fields = array(
'table_sort' => 'projects.projectsort, projects.projectnumber'), 'table_sort' => 'projects.projectsort, projects.projectnumber'),
'last_name' => array( 'last_name' => array(
'start_option_group' => 'Student Name Information',
'name' => 'Student -- Last Name', 'name' => 'Student -- Last Name',
'header' => 'Last Name', 'header' => 'Last Name',
'width' => 1.0, 'width' => 1.0,
@ -150,7 +151,14 @@ $report_students_fields = array(
'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')", 'table' => "GROUP_CONCAT(students.firstname, ' ', students.lastname ORDER BY students.lastname SEPARATOR ', ')",
'group_by' => array('students.registrations_id')), 'group_by' => array('students.registrations_id')),
'pronunciation' => array(
'name' => 'Student -- Name Pronunciation',
'header' => 'Pronunciation',
'width' => 2.0,
'table' => 'students.pronunciation'),
'email' => array( 'email' => array(
'start_option_group' => 'Student Contact Information',
'name' => 'Student -- Email', 'name' => 'Student -- Email',
'header' => 'Email', 'header' => 'Email',
'width' => 2.25, 'width' => 2.25,
@ -163,7 +171,41 @@ $report_students_fields = array(
'width' => 1.0, 'width' => 1.0,
'table' => 'students.phone'), 'table' => 'students.phone'),
'address' => array(
'name' => 'Student -- Street Address',
'header' => 'Address',
'width' => 2.0,
'scalable' => true,
'table' => 'students.address'),
'city' => array(
'name' => 'Student -- City',
'header' => 'City',
'width' => 1.5,
'table' => 'students.city' ),
'province' => array(
'name' => 'Student -- '.$config['provincestate'],
'header' => $config['provincestate'],
'width' => 0.75,
'table' => 'students.province' ),
'postal' => array(
'name' => 'Student -- '.$config['postalzip'],
'header' => $config['postalzip'],
'width' => 0.75,
'table' => 'students.postalcode' ),
'address_full' => array(
'name' => 'Student -- Full Address',
'header' => 'Address',
'width' => 3.0,
'scalable' => true,
'table' => "CONCAT(students.address, ', ', students.city, ', ', students.province, ', ', students.postalcode)" ),
'grade' => array( 'grade' => array(
'start_option_group' => 'Other Student Information',
'name' => 'Student -- Grade', 'name' => 'Student -- Grade',
'header' => 'Gr.', 'header' => 'Gr.',
'width' => 0.3, 'width' => 0.3,
@ -204,12 +246,6 @@ $report_students_fields = array(
'value_map' => array ('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium', 'value_map' => array ('none' => '', 'xsmall' => 'X-Small', 'small' => 'Small', 'medium' => 'Medium',
'large' => 'Large', 'xlarge' => 'X-Large')), 'large' => 'Large', 'xlarge' => 'X-Large')),
'pronunciation' => array(
'name' => 'Student -- Name Pronunciation',
'header' => 'Pronunciation',
'width' => 2.0,
'table' => 'students.pronunciation'),
'medicalalert' => array( 'medicalalert' => array(
'name' => 'Student -- Medical Alert Info', 'name' => 'Student -- Medical Alert Info',
'header' => 'medical', 'header' => 'medical',
@ -223,12 +259,22 @@ $report_students_fields = array(
'table' => 'students.foodreq'), 'table' => 'students.foodreq'),
'registrations_num' => array( 'registrations_num' => array(
'start_option_group' => 'Student Registration Information',
'name' => 'Student -- Registration Number', 'name' => 'Student -- Registration Number',
'header' => 'RegNum', 'header' => 'RegNum',
'width' => 1, 'width' => 1,
'table' => 'registrations.num' ), 'table' => 'registrations.num' ),
'paid' => array(
'name' => 'Paid',
'header' => 'Paid',
'width' => '0.4',
'table' => 'registrations.status',
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
/* Project Information */
'title' => array( 'title' => array(
'start_option_group' => 'Project Information',
'name' => 'Project -- Title', 'name' => 'Project -- Title',
'header' => 'Project Title', 'header' => 'Project Title',
'width' => 2.75, 'width' => 2.75,
@ -321,39 +367,29 @@ $report_students_fields = array(
'width' => 1.00, 'width' => 1.00,
'table' => '""' ), 'table' => '""' ),
'address' => array( 'req_elec' => array(
'name' => 'Student Address -- Street Address', 'name' => 'Project -- If the project requires electricity',
'header' => 'Address', 'header' => 'Elec',
'width' => 2.0, 'width' => .5,
'scalable' => true, 'table' => "projects.req_electricity",
'table' => 'students.address'), 'value_map' => array ('no' => '', 'yes' => 'Yes')),
'city' => array( 'req_table' => array(
'name' => 'Student Address -- City', 'name' => 'Project -- If the project requires a table',
'header' => 'City', 'header' => 'Table',
'width' => 1.5, 'width' => .5,
'table' => 'students.city' ), 'table' => "projects.req_table",
'value_map' => array ('no' => '', 'yes' => 'Yes')),
'province' => array( 'req_special' => array(
'name' => 'Student Address -- '.$config['provincestate'], 'name' => 'Project -- Any special requirements the project has',
'header' => $config['provincestate'], 'header' => 'Special Requirements',
'width' => 0.75, 'width' => 3,
'table' => 'students.province' ), 'table' => "projects.req_special"),
'postal' => array(
'name' => 'Student Address -- '.$config['postalzip'],
'header' => $config['postalzip'],
'width' => 0.75,
'table' => 'students.postalcode' ),
'address_full' => array(
'name' => 'Student Address -- Full Address',
'header' => 'Address',
'width' => 3.0,
'scalable' => true,
'table' => "CONCAT(students.address, ', ', students.city, ', ', students.province, ', ', students.postalcode)" ),
'school' => array( 'school' => array(
'start_option_group' => 'School Information',
'name' => 'School -- Name', 'name' => 'School -- Name',
'header' => 'School Name', 'header' => 'School Name',
'width' => 2.25, 'width' => 2.25,
@ -368,13 +404,13 @@ $report_students_fields = array(
'table' => "CONCAT(schools.address, ', ', schools.city, ', ', schools.province_code, ', ', schools.postalcode)" ), 'table' => "CONCAT(schools.address, ', ', schools.city, ', ', schools.province_code, ', ', schools.postalcode)" ),
'teacher' => array( 'teacher' => array(
'name' => 'Student -- Teacher Name', 'name' => 'School -- Teacher Name (as entered by the student)',
'header' => 'Teacher', 'header' => 'Teacher',
'width' => 1.5, 'width' => 1.5,
'table' => 'students.teachername' ), 'table' => 'students.teachername' ),
'teacheremail' => array( 'teacheremail' => array(
'name' => 'Student -- Teacher Email', 'name' => 'School -- Teacher Email (as entered by the student)',
'header' => 'Teacher Email', 'header' => 'Teacher Email',
'width' => 2.0, 'width' => 2.0,
'table' => 'students.teacheremail' ), 'table' => 'students.teacheremail' ),
@ -393,31 +429,31 @@ $report_students_fields = array(
'school_address' => array( 'school_address' => array(
'name' => 'School Address -- Street Address', 'name' => 'School -- Street Address',
'header' => 'Address', 'header' => 'Address',
'width' => 2.0, 'width' => 2.0,
'table' => 'schools.address'), 'table' => 'schools.address'),
'school_city' => array( 'school_city' => array(
'name' => 'School Address -- City', 'name' => 'School -- City',
'header' => 'City', 'header' => 'City',
'width' => 1.5, 'width' => 1.5,
'table' => 'schools.city' ), 'table' => 'schools.city' ),
'school_province' => array( 'school_province' => array(
'name' => 'School Address -- '.$config['provincestate'], 'name' => 'School -- '.$config['provincestate'],
'header' => $config['provincestate'], 'header' => $config['provincestate'],
'width' => 0.75, 'width' => 0.75,
'table' => 'schools.province_code' ), 'table' => 'schools.province_code' ),
'school_city_prov' => array( 'school_city_prov' => array(
'name' => 'School Address -- City, '.$config['provincestate'].' (for mailing)', 'name' => 'School -- City, '.$config['provincestate'].' (for mailing)',
'header' => 'City', 'header' => 'City',
'width' => 1.5, 'width' => 1.5,
'table' => "CONCAT(schools.city, ', ', schools.province_code)" ), 'table' => "CONCAT(schools.city, ', ', schools.province_code)" ),
'school_postal' => array( 'school_postal' => array(
'name' => 'School Address -- '.$config['postalzip'], 'name' => 'School -- '.$config['postalzip'],
'header' => $config['postalzip'], 'header' => $config['postalzip'],
'width' => 0.75, 'width' => 0.75,
'table' => 'schools.postalcode' ), 'table' => 'schools.postalcode' ),
@ -435,15 +471,9 @@ $report_students_fields = array(
'width' => 0.75, 'width' => 0.75,
'table' => 'schools.board' ), 'table' => 'schools.board' ),
'paid' => array(
'name' => 'Paid',
'header' => 'Paid',
'width' => '0.4',
'table' => 'registrations.status',
'value_map' => array ('complete' => '', 'paymentpending' => 'No')),
'awards' => array( 'awards' => array(
'name' => 'Award -- Type + Name (warning: duplicates student for multiple awards!)', 'start_option_group' => 'Awards assigned to student (warning: duplicates student entries for multiple awards won!)',
'name' => 'Award -- Type + Name',
'header' => 'Award Name', 'header' => 'Award Name',
'width' => 4, 'width' => 4,
'table' => "CONCAT(IF(award_types.type='Other','Special',award_types.type),' ', award_awards.name)", 'table' => "CONCAT(IF(award_types.type='Other','Special',award_types.type),' ', award_awards.name)",
@ -564,7 +594,8 @@ $report_students_fields = array(
'components' => array('awards')), 'components' => array('awards')),
'nom_awards' => array( 'nom_awards' => array(
'name' => 'Award Nominations -- Award Name (warning: duplicates student for multiple awards!)', 'start_option_group' => 'Nominated Awards (warning: duplicates student for multiple awards!)',
'name' => 'Award Nominations -- Award Name',
'header' => 'Award Name', 'header' => 'Award Name',
'width' => 4, 'width' => 4,
'table' => "CONCAT(award_types.type,' -- ',award_awards.name)", 'table' => "CONCAT(award_types.type,' -- ',award_awards.name)",
@ -619,27 +650,9 @@ $report_students_fields = array(
'table_sort' => 'projects.id', 'table_sort' => 'projects.id',
'exec_function' => 'reports_students_award_selfnom_5'), 'exec_function' => 'reports_students_award_selfnom_5'),
'req_elec' => array( /* Emergency Contact Info */
'name' => 'If the project requires electricity',
'header' => 'Elec',
'width' => .5,
'table' => "projects.req_electricity",
'value_map' => array ('no' => '', 'yes' => 'Yes')),
'req_table' => array(
'name' => 'If the project requires a table',
'header' => 'Table',
'width' => .5,
'table' => "projects.req_table",
'value_map' => array ('no' => '', 'yes' => 'Yes')),
'req_special' => array(
'name' => 'Any special requirements the project has',
'header' => 'Special Requirements',
'width' => 3,
'table' => "projects.req_special"),
'emerg_name' => array( 'emerg_name' => array(
'start_option_group' => 'Emergency Contact Information',
'name' => 'Emergency Contact -- Name', 'name' => 'Emergency Contact -- Name',
'header' => 'Contact Name', 'header' => 'Contact Name',
'width' => 1.5, 'width' => 1.5,
@ -660,7 +673,9 @@ $report_students_fields = array(
'table' => "CONCAT(emergencycontact.phone1, ' ', emergencycontact.phone2, ' ', emergencycontact.phone3, ' ', emergencycontact.phone4)", 'table' => "CONCAT(emergencycontact.phone1, ' ', emergencycontact.phone2, ' ', emergencycontact.phone3, ' ', emergencycontact.phone4)",
'components' => array('emergencycontacts')), 'components' => array('emergencycontacts')),
/* Tour Information */
'tour_assign_name' => array( 'tour_assign_name' => array(
'start_option_group' => 'Tour Information',
'name' => 'Tours -- Assigned Tour Name', 'name' => 'Tours -- Assigned Tour Name',
'header' => 'Tour', 'header' => 'Tour',
'width' => 4, 'width' => 4,
@ -682,7 +697,9 @@ $report_students_fields = array(
'table_sort' => 'tours.num', 'table_sort' => 'tours.num',
'components' => array('tours')), 'components' => array('tours')),
/* Mentor Information */
'mentor_name_proj' => array( 'mentor_name_proj' => array(
'start_option_group' => 'Mentor Information',
'name' => 'Mentor -- Project and Name (Distinct for each Project+Mentor pair)', 'name' => 'Mentor -- Project and Name (Distinct for each Project+Mentor pair)',
'header' => 'Mentor Name', 'header' => 'Mentor Name',
'width' => 1.75, 'width' => 1.75,
@ -762,7 +779,9 @@ $report_students_fields = array(
'table' => 'mentors.description', 'table' => 'mentors.description',
'components' => array('mentors')), 'components' => array('mentors')),
/* Fair Information */
'feeder_fair_name' => array ( 'feeder_fair_name' => array (
'start_option_group' => 'Fair Information',
'name' => 'Feeder Fair -- Name', 'name' => 'Feeder Fair -- Name',
'header' => 'Fair Name', 'header' => 'Fair Name',
'width' => 1.5, 'width' => 1.5,
@ -789,7 +808,9 @@ $report_students_fields = array(
'width' => 3, 'width' => 3,
'table' => "'".mysql_escape_string($config['fairname'])."'"), 'table' => "'".mysql_escape_string($config['fairname'])."'"),
/* Special/Misc/Other */
'static_text' => array ( 'static_text' => array (
'start_option_group' => 'Special Fields',
'name' => 'Label -- Static Text', 'name' => 'Label -- Static Text',
'header' => '', 'header' => '',
'width' => 0.1, 'width' => 0.1,