mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-04 12:52:15 +02:00
Suivi des correspondances par problème
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
|
@ -117,6 +117,12 @@
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/suivi-correspondances">Suivi des Correspondances</a>
|
||||
<ul class="deroule">
|
||||
<li class="nav-item active"><a class="nav-link" href="/suivi-correspondances/1">Problème 1</a></li>
|
||||
<li class="nav-item active"><a class="nav-link" href="/suivi-correspondances/2">Problème 2</a></li>
|
||||
<li class="nav-item active"><a class="nav-link" href="/suivi-correspondances/3">Problème 3</a></li>
|
||||
<li class="nav-item active"><a class="nav-link" href="/suivi-correspondances/4">Problème 4</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="/exporter-donnees">Exporter les données</a>
|
||||
|
@ -35,7 +35,7 @@ if (sizeof($waiting_teams) > 0) { ?>
|
||||
<hr />
|
||||
|
||||
<?php
|
||||
for ($problem = 1; $problem <= 4; ++$problem) { ?>
|
||||
foreach ((isset($_GET["problem"]) ? [intval($_GET["problem"])] : [1, 2, 3, 4]) as $problem) { ?>
|
||||
<div class="mt-4 mb-4">
|
||||
<h1 class="display-5">Vidéos pour le problème <?= $problem ?></h1>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user