1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-03 20:42:47 +02:00

Suivi des correspondances par problème

This commit is contained in:
Yohann
2020-02-14 13:17:27 +01:00
parent 7815737079
commit b3e96dd0a8
14 changed files with 21 additions and 86 deletions

View File

@ -50,8 +50,14 @@ class ValidateVideo
$videos = [];
for ($problem = 1; $problem <= 4; ++$problem)
$videos[] = Video::getVideos(Reason::SOLUTION, $problem);
if (!isset($_GET["problem"])) {
for ($problem = 1; $problem <= 4; ++$problem)
$videos[] = Video::getVideos(Reason::SOLUTION, $problem);
}
else {
$videos = [[], [], [], []];
$videos[intval($_GET["problem"]) - 1] = Video::getVideos(Reason::SOLUTION, intval($_GET["problem"]));
}
$waiting_teams = [];
$waiting_emails = [];
@ -116,6 +122,8 @@ if (isset($req)) {
$team = Team::fromId($data["id"]);
if (Phase::getCurrentPhase() >= Phase::PHASE12 && $team->getSolution() == null)
continue;
if (isset($_GET["problem"]) && intval($_GET["problem"]) != $team->getProblem())
continue;
$waiting_teams[] = $team;
$waiting_emails = array_merge($waiting_emails, $team->getAllEmails());
}
@ -125,6 +133,8 @@ $all_emails = [];
foreach (Team::getAllTeams() as $team) {
if (Phase::getCurrentPhase() >= Phase::PHASE12 && $team->getSolution() == null)
continue;
if (isset($_GET["problem"]) && intval($_GET["problem"]) != $team->getProblem())
continue;
$all_emails = array_merge($all_emails, $team->getAllEmails());
}