From 536fec616f0cedde11c61f894a2134eb25c23f6b Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 12 Apr 2010 00:07:33 +0000 Subject: [PATCH] Add a school principal field. --- admin/reports_students.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/admin/reports_students.inc.php b/admin/reports_students.inc.php index 5e80e8b..a4e9fda 100644 --- a/admin/reports_students.inc.php +++ b/admin/reports_students.inc.php @@ -70,6 +70,15 @@ function reports_students_award_selfnom_5(&$report, $field, $text) { return reports_students_award_selfnom_num(&$report, $field, $text, 4); } +function reports_students_school_principal(&$report, $field, $text) +{ + $year = $report['year']; + if($text > 0) { /* text is the uid */ + $u = user_load_by_uid_year($text, $year); + return $u['name']; + } + return ''; +} $report_students_fields = array( @@ -413,6 +422,13 @@ $report_students_fields = array( 'width' => 0.75, 'table' => 'schools.postalcode' ), + 'school_principal' => array( + 'name' => 'School -- Principal', + 'header' => 'Principal', + 'width' => 1.25, + 'table' => 'schools.principal_uid', + 'exec_function' => 'reports_students_school_principal'), + 'school_board' => array( 'name' => 'School -- Board ID', 'header' => 'Board',