Add two columns for the feeder fair info in the student report.

This commit is contained in:
james 2010-04-05 19:19:53 +00:00
parent e07f22995b
commit 015b04a81a

View File

@ -746,6 +746,21 @@ $report_students_fields = array(
'table' => 'mentors.description', 'table' => 'mentors.description',
'components' => array('mentors')), 'components' => array('mentors')),
'feeder_fair_name' => array (
'name' => 'Feeder Fair -- Name',
'header' => 'Fair Name',
'width' => 1.5,
'table' => 'fairs.name',
'components' => array('fairs')),
'feeder_fair_abbrv' => array (
'name' => 'Feeder Fair -- Abbreviation',
'header' => 'Fair',
'width' => 0.75,
'table' => 'fairs.abbrv',
'components' => array('fairs')),
'fair_year' => array ( 'fair_year' => array (
'name' => 'Fair -- Year', 'name' => 'Fair -- Year',
'header' => 'Year', 'header' => 'Year',
@ -851,6 +866,11 @@ $report_students_fields = array(
$mentor_where = "AND mentors.year='$year'"; $mentor_where = "AND mentors.year='$year'";
} }
$fairs_join = '';
if(in_array('fairs', $components)) {
$fairs_join = "LEFT JOIN fairs ON fairs.id=projects.fairs_id";
}
if($report['option']['include_incomplete_registrations'] == 'yes') if($report['option']['include_incomplete_registrations'] == 'yes')
$reg_where = ''; $reg_where = '';
else else
@ -868,6 +888,7 @@ $report_students_fields = array(
$mentor_join $mentor_join
$tour_join $tour_join
$awards_join $awards_join
$fairs_join
WHERE WHERE
students.year='$year' students.year='$year'
AND projects.year='$year' AND projects.year='$year'