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