From 7651426f034bf3b400c52186252beba1064c4e61 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 12 Mar 2008 01:18:29 +0000 Subject: [PATCH] - Add a field for trophies - Fix a bug with the ordering of the sql statement. Something I noticed fixing this bug: Tour info and award info will generate an error if used together. --- admin/reports_students.inc.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/admin/reports_students.inc.php b/admin/reports_students.inc.php index df6ed9a..ab2470d 100644 --- a/admin/reports_students.inc.php +++ b/admin/reports_students.inc.php @@ -471,6 +471,16 @@ $report_students_fields = array( 'table_sort' => 'award_prizes.order', 'components' => array('awards')), + 'award_prize_trophy_any' => array( + 'name' => 'Award -- Trophy (\'Yes\' if the award has a trophy)', + 'header' => 'Trophy', + 'width' => 0.5, + 'table' => "IF ( award_prizes.trophystudentkeeper=1 + OR award_prizes.trophystudentreturn=1 + OR award_prizes.trophyschoolkeeper=1 + OR award_prizes.trophyschoolreturn=1, 'Yes', 'No')", + 'components' => array('awards')), + 'nom_awards' => array( 'name' => 'Award Nominations -- Award Name (warning: duplicates student for multiple awards!)', 'header' => 'Award Name', @@ -784,10 +794,10 @@ $report_students_fields = array( LEFT JOIN projectdivisions ON projectdivisions.id=projects.projectdivisions_id LEFT JOIN projectcategories ON projectcategories.id=projects.projectcategories_id $emergencycontact_join - $tour_join - $awards_join $partner_join $mentor_join + $tour_join + $awards_join WHERE students.year='$year' AND projects.year='$year' @@ -795,9 +805,9 @@ $report_students_fields = array( AND projectcategories.year='$year' AND projectdivisions.year='$year' AND (registrations.status='complete' OR registrations.status='paymentpending') + $mentor_where $awards_where $tour_where - $mentor_where "; return $q;