From 64026ed7243af7f39fd1ab665705848da6259ee6 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 29 Mar 2011 18:48:27 +0000 Subject: [PATCH] Fix active but not complete emails for judges (need to check for NULL complete) --- admin/communication.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index e483ba8..b8b6f4d 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -23,18 +23,18 @@ "judges_spec_active_thisyear"=>array("name"=>"Judges (special award judges only) active for this year", "query"=> "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND deleted='no' AND users_judge.judge_active='yes' AND users_judge.special_award_only='yes' ORDER BY email"), - "judges_inactive"=>array("name"=>"Judges not active for this year", "query"=> + "judges_inactive"=>array("name"=>"Judges (all) not active for this year", "query"=> "SELECT firstname, lastname, email, judge_active, deleted, MAX(year) FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' GROUP BY uid HAVING deleted='no' AND ((max(year)='{$config['FAIRYEAR']}' AND judge_active='no') OR max(year)<'{$config['FAIRYEAR']}') ORDER BY email"), - "judges_active_complete_thisyear"=>array("name"=>"Judges active for this year and complete", "query"=> + "judges_active_complete_thisyear"=>array("name"=>"Judges (all) active for this year and complete", "query"=> "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND users_judge.judge_complete='yes' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), - "judges_active_incomplete_thisyear"=>array("name"=>"Judges active for this year but not complete", "query"=> - "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND users_judge.judge_complete='no' AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), + "judges_active_incomplete_thisyear"=>array("name"=>"Judges (all) active for this year but not complete", "query"=> + "SELECT firstname, lastname, email FROM users LEFT JOIN users_judge ON users_judge.users_id=users.id WHERE types LIKE '%judge%' AND year='{$config['FAIRYEAR']}' AND (users_judge.judge_complete!='yes' OR users_judge.judge_complete IS NULL) AND deleted='no' AND users_judge.judge_active='yes' ORDER BY email"), "participants_complete_thisyear"=>array("name"=>"Participants complete this year","query"=> "SELECT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND registrations.year='".$config['FAIRYEAR']."' AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"),