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

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea/

6
.idea/.gitignore vendored
View File

@ -1,6 +0,0 @@
# Default ignored files
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,9 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="PHP">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>

View File

@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="corres2math@galaxyoyo.com" uuid="ffa0ffc8-d602-402c-b199-f2cc9c5789c8">
<driver-ref>mysql.8</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
<jdbc-url>jdbc:mysql://galaxyoyo.com:3306/corres2math</jdbc-url>
<driver-properties>
<property name="autoReconnect" value="true" />
<property name="zeroDateTimeBehavior" value="CONVERT_TO_NULL" />
<property name="tinyInt1isBit" value="false" />
<property name="characterEncoding" value="utf8" />
<property name="characterSetResults" value="utf8" />
<property name="yearIsDateType" value="false" />
<property name="serverTimezone" value="Europe/Paris" />
</driver-properties>
</data-source>
</component>
</project>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PublishConfigData" autoUpload="Always" serverName="inscription.correspondances-maths.fr" autoUploadExternalChanges="true">
<serverData>
<paths name="inscription.correspondances-maths.fr">
<serverdata>
<mappings>
<mapping deploy="/var/inscription-corres2math" local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
<option name="myAutoUpload" value="ALWAYS" />
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Correspondances.iml" filepath="$PROJECT_DIR$/.idea/Correspondances.iml" />
</modules>
</component>
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -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

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());
}

View File

@ -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>

View File

@ -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>