From 9ec497df9fc3f39aabca24ef407fe7ac6a2dc053 Mon Sep 17 00:00:00 2001 From: idziak Date: Fri, 20 Mar 2015 19:24:37 +0000 Subject: [PATCH] These changes were done by Richard Sin Increase the number of sorting and grouping fiels in the Reports Editor Fix display list when emailing schools Add "Judge -- Other Expertise" to Reports Editor Add "Award -- Script Order" to allow student reports to be sorted the same way they appear on the "Award Ceremony Script" --- admin/communication.inc.php | 8 ++++++-- admin/project_editor.php | 2 +- admin/reports_editor.php | 4 ++-- admin/reports_judges.inc.php | 7 +++++++ admin/reports_students.inc.php | 8 ++++++++ 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index 7a54c46..68b1d05 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -183,8 +183,12 @@ "SELECT schools.sciencehead_uid AS uid, schools.school, users.firstname AS firstname, users.lastname AS lastname, users.email AS email FROM schools JOIN users ON schools.sciencehead_uid=users.uid AND users.id=(SELECT id FROM users WHERE users.uid=schools.sciencehead_uid ORDER BY `year` DESC LIMIT 1) WHERE schools.year='".$config['FAIRYEAR']."' AND users.email!=''"), - "school_thisyear"=>array("name"=>"School this year","query"=> - "SELECT board, schoolemail FROM `schools` WHERE `year` ='".$config['FAIRYEAR']."' GROUP BY schoolemail"), + "school_with_project_thisyear"=>array("name"=>"Schools with projects this year","query"=> + "SELECT DISTINCT(sc.schoolemail) AS email, sc.school AS firstname FROM students AS st LEFT JOIN schools AS sc ON sc.id = st.schools_id WHERE st.year = ".$config['FAIRYEAR']." AND LENGTH( sc.schoolemail ) !=0 ORDER BY email +"), + + "school_thisyear"=>array("name"=>"Schools this year","query"=> + "SELECT school AS firstname, schoolemail AS email FROM `schools` WHERE `year` ='".$config['FAIRYEAR']."' GROUP BY schoolemail"), "school_teachers_thisyear"=>array("name"=>"Teachers (as entered by students) this year","query"=> "SELECT teachername AS firstname, teacheremail AS email FROM students WHERE year = '".$config['FAIRYEAR']."' GROUP BY teacheremail"), diff --git a/admin/project_editor.php b/admin/project_editor.php index 3d6d66e..84c738e 100644 --- a/admin/project_editor.php +++ b/admin/project_editor.php @@ -251,7 +251,7 @@ function countwords() ".i18n("Select Project Type").": "; + echo "".i18n("Project Type").": "; echo "