From 8cab38e216af2d19280cabcb1d46b28440ccedc4 Mon Sep 17 00:00:00 2001 From: Yohann Date: Wed, 1 Jan 2020 21:27:28 +0100 Subject: [PATCH] =?UTF-8?q?Bouton=20pour=20envoyer=20un=20mail=20=C3=A0=20?= =?UTF-8?q?tout=20le=20monde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server_files/classes/Team.php | 2 +- server_files/controllers/suivi_correspondances.php | 7 +++++++ server_files/views/suivi_correspondances.php | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/server_files/classes/Team.php b/server_files/classes/Team.php index 5c8c5b9..7f44498 100644 --- a/server_files/classes/Team.php +++ b/server_files/classes/Team.php @@ -70,7 +70,7 @@ class Team return $team; } - public static function getAllTeams($problem, $only_validated = false) + public static function getAllTeams($problem = -1, $only_validated = false) { global $DB, $YEAR; $req = $DB->prepare("SELECT * FROM `teams` WHERE " . ($problem < 0 ? "" : "`problem` = ? AND ") . ($only_validated ? "`validation_status` = 'VALIDATED' AND " : "") . "`year` = $YEAR;"); diff --git a/server_files/controllers/suivi_correspondances.php b/server_files/controllers/suivi_correspondances.php index 5c3dcbc..290cfe9 100644 --- a/server_files/controllers/suivi_correspondances.php +++ b/server_files/controllers/suivi_correspondances.php @@ -121,4 +121,11 @@ if (isset($req)) { } } +$all_emails = []; +foreach (Team::getAllTeams() as $team) { + if (Phase::getCurrentPhase() >= Phase::PHASE12 && $team->getSolution() == null) + continue; + $all_emails = array_merge($all_emails, $team->getAllEmails()); +} + require_once "server_files/views/suivi_correspondances.php"; \ No newline at end of file diff --git a/server_files/views/suivi_correspondances.php b/server_files/views/suivi_correspondances.php index f542899..dfc91f0 100644 --- a/server_files/views/suivi_correspondances.php +++ b/server_files/views/suivi_correspondances.php @@ -24,6 +24,10 @@ if (sizeof($waiting_teams) > 0) { ?> + subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank"> + + +