diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..62c8935
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.idea/
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 03fd30e..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-
-# Default ignored files
-/workspace.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/Correspondances.iml b/.idea/Correspondances.iml
deleted file mode 100644
index c956989..0000000
--- a/.idea/Correspondances.iml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 8f9a506..0000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 79ee123..0000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml
deleted file mode 100644
index 0be229c..0000000
--- a/.idea/dataSources.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- mysql.8
- true
- com.mysql.cj.jdbc.Driver
- jdbc:mysql://galaxyoyo.com:3306/corres2math
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/deployment.xml b/.idea/deployment.xml
deleted file mode 100644
index f8e28e0..0000000
--- a/.idea/deployment.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 28a804d..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index a80396f..0000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 94a25f7..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dispatcher.php b/dispatcher.php
index e49b87a..b6cf0f3 100644
--- a/dispatcher.php
+++ b/dispatcher.php
@@ -65,6 +65,7 @@ $ROUTES["^rejoindre-equipe/?$"] = ["server_files/controllers/rejoindre_equipe.ph
$ROUTES["^repondre-questions-3$"] = ["server_files/controllers/repondre_questions.php"];
$ROUTES["^repondre-questions-3/([A-Z]{3})$"] = ["server_files/controllers/repondre_questions.php", "trigram"];
$ROUTES["^suivi-correspondances/?$"] = ["server_files/controllers/suivi_correspondances.php"];
+$ROUTES["^suivi-correspondances/([1-4])/?$"] = ["server_files/controllers/suivi_correspondances.php", "problem"];
# Assets files
diff --git a/server_files/controllers/suivi_correspondances.php b/server_files/controllers/suivi_correspondances.php
index 7d1b5f1..522fabd 100644
--- a/server_files/controllers/suivi_correspondances.php
+++ b/server_files/controllers/suivi_correspondances.php
@@ -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());
}
diff --git a/server_files/views/header.php b/server_files/views/header.php
index f10128f..3e5a089 100644
--- a/server_files/views/header.php
+++ b/server_files/views/header.php
@@ -117,6 +117,12 @@
Suivi des Correspondances
+
Exporter les données
diff --git a/server_files/views/suivi_correspondances.php b/server_files/views/suivi_correspondances.php
index 4b5104a..4ea4538 100644
--- a/server_files/views/suivi_correspondances.php
+++ b/server_files/views/suivi_correspondances.php
@@ -35,7 +35,7 @@ if (sizeof($waiting_teams) > 0) { ?>
+foreach ((isset($_GET["problem"]) ? [intval($_GET["problem"])] : [1, 2, 3, 4]) as $problem) { ?>
Vidéos pour le problème = $problem ?>