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"> + + +