mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-25 11:00:29 +02:00
Attribution des vidéos aux équipes (manuelle)
This commit is contained in:
@ -1,12 +1,8 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if (isset($admin)) {
|
||||
if ($has_error) {
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
} else {
|
||||
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>";
|
||||
}
|
||||
if (isset($admin) && !$has_error) {
|
||||
echo "<h2>Organisateur ajouté avec succès ! Ses identifiants ont été transmis par mail.</h2>";
|
||||
} ?>
|
||||
|
||||
<form method="POST">
|
||||
|
@ -9,8 +9,6 @@ if (isset($new_team) && !$has_error) { ?>
|
||||
<h2>La date limite d'inscription est dépassée.</h2>
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if (isset($error_message) && $error_message) echo "<h2>Erreur : " . $error_message . "</h2>"; ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true" />
|
||||
<table style="width: 100%;">
|
||||
|
@ -1,9 +1,7 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error)
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
else {
|
||||
if (!$has_error) {
|
||||
if (isset($recuperate_account))
|
||||
echo "<h2>Le mail de récupération de mot de passe a bien été envoyé.</h2>";
|
||||
elseif (isset($reset_password))
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error)
|
||||
echo "<h2>Erreur : $error_message</h2>";
|
||||
elseif (isset($new_video))
|
||||
if (isset($new_video) && !$has_error)
|
||||
echo "<h2>Votre vidéo a bien été envoyée !</h2>";
|
||||
?>
|
||||
|
||||
|
@ -20,6 +20,28 @@ for ($i = 1; $i <= 5; ++$i) {
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<hr />
|
||||
<form method="POST">
|
||||
<label for="other_teams">L'équipe va recevoir les questions des équipes suivantes (merci d'en sélectionner exactement 2) :</label>
|
||||
<select style="width: 100%;" id="other_teams" name="other_teams[]" multiple>
|
||||
<?php
|
||||
/** @var Team $other_team */
|
||||
foreach ($other_teams as $other_team) {
|
||||
if ($other_team->getId() == $team->getId())
|
||||
continue;
|
||||
|
||||
$team_name = $other_team->getName() . " (" . $other_team->getTrigram() . ")";
|
||||
$team_id = $other_team->getId();
|
||||
echo "<option value=\"$team_id\" " . (in_array($other_team->getId(), $team->getVideoTeamIds()) ? "selected" : "") . ">$team_name</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input style="width: 100%;" type="submit" name="update_video_teams" value="Mettre à jour" />
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Autorisations</h2>
|
||||
@ -31,6 +53,7 @@ for ($i = 1; $i <= 5; ++$i) {
|
||||
</form>
|
||||
|
||||
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<hr />
|
||||
<form method="POST">
|
||||
<input style="width: 100%;" type="submit" name="validate" value="Valider l'équipe"/>
|
||||
</form>
|
||||
|
@ -9,16 +9,20 @@
|
||||
<link REL="shortcut icon" href="<?= $URL_BASE ?>/favicon.ico"/>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/bootstrap/css/bootstrap.min.css">
|
||||
|
||||
<!-- Custom fonts for this template -->
|
||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/font-awesome/css/font-awesome.min.css">
|
||||
|
||||
<!-- Plugin CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/datatables/dataTables.bootstrap4.css">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/datatables/dataTables.bootstrap4.css">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/css2/sb-admin.css">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/css2/sb-admin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@ -54,7 +58,7 @@
|
||||
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) {
|
||||
switch (Phase::getCurrentPhase()) {
|
||||
case Phase::PHASE1: ?>
|
||||
<li><a href="<?= $URL_BASE ?>/envoyer-video-1">Envoyer ma vidéo (phase 1)</a></li>
|
||||
<li><a href="<?= $URL_BASE ?>/envoyer-video-1">Envoyer ma vidéo (phase 1)</a></li>
|
||||
<?php break;
|
||||
}
|
||||
} ?>
|
||||
@ -82,4 +86,8 @@
|
||||
|
||||
<div id="main-container">
|
||||
<div id="main-content">
|
||||
<div class="container-fluid">
|
||||
<div class="container-fluid">
|
||||
<?php
|
||||
if (isset($has_error) && $has_error) {
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
}
|
@ -1,11 +1,6 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error)
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
?>
|
||||
|
||||
<?php
|
||||
/** @var NewUser $user */
|
||||
if (isset($user) && !$has_error) {
|
||||
?>
|
||||
|
@ -1,10 +1,7 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error)
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
|
||||
elseif (isset($my_account) || isset($new_password)) {
|
||||
if (!$has_error && (isset($my_account) || isset($new_password))) {
|
||||
?>
|
||||
<h2>Votre compte a bien été mis à jour !</h2>
|
||||
<?php
|
||||
|
@ -1,9 +1,7 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error)
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
elseif (isset($send_document))
|
||||
if (!$has_error && isset($send_document))
|
||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
||||
?>
|
||||
|
||||
|
@ -7,185 +7,67 @@ if ($has_error)
|
||||
|
||||
<h2>Problème n°<?= $problem ?></h2>
|
||||
|
||||
<?php if (!isset($_GET["modifier"]) && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<a href="<?= $URL_BASE ?>/probleme/<?= $problem ?>/modifier">Éditer le tournoi</a>
|
||||
<?php } ?>
|
||||
|
||||
<hr/>
|
||||
|
||||
<?php if (!isset($_GET["modifier"])) { ?>
|
||||
<hr/>
|
||||
|
||||
<h2>Équipes inscrites pour ce problème :</h2>
|
||||
|
||||
<table style="border: 1px solid black; width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Équipe
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Trigramme
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
État de validation de l'inscription
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
/** @var Team $team */
|
||||
foreach ($teams as $team) {
|
||||
?>
|
||||
<tr>
|
||||
<td style="border: 1px solid black; text-align: center">
|
||||
<?php
|
||||
if (isset($_SESSION["role"]) && $_SESSION["role"] == Role::ADMIN)
|
||||
echo "<a href=\"$URL_BASE/equipe/" . $team->getTrigram() . "\">" . $team->getName(). "</a>";
|
||||
else
|
||||
echo $team->getName();
|
||||
?>
|
||||
</td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= $team->getTrigram() ?></td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= formatDate($team->getInscriptionDate()) ?></td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Équipe
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Trigramme
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
État de validation de l'inscription
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<h2>Équipes inscrites pour ce problème :</h2>
|
||||
|
||||
<table style="border: 1px solid black; width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Équipe
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Trigramme
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
État de validation de l'inscription
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
/** @var Team $team */
|
||||
foreach ($teams as $team) {
|
||||
?>
|
||||
<tr>
|
||||
<td style="border: 1px solid black; text-align: center">
|
||||
<?php
|
||||
if (isset($_SESSION["role"]) && $_SESSION["role"] == Role::ADMIN)
|
||||
echo "<a href=\"$URL_BASE/equipe/" . $team->getTrigram() . "\">" . $team->getName() . "</a>";
|
||||
else
|
||||
echo $team->getName();
|
||||
?>
|
||||
</td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= $team->getTrigram() ?></td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= formatDate($team->getInscriptionDate()) ?></td>
|
||||
<td style="border: 1px solid black; text-align: center"><?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="submitted" value="true" />
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="name">Nom :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input style="width: 100%;" type="text" id="name" name="name" value="<?= $tournament->getName() ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="organizers">Organisateur :</label>
|
||||
</td>
|
||||
<td>
|
||||
<select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" required>
|
||||
<?php
|
||||
while (($orga_data = $orgas_response->fetch()) !== FALSE) {
|
||||
echo "<option value=\"" . $orga_data["id"] . "\" " . ($tournament->organize($orga_data["id"]) ? "selected" : "")
|
||||
. ">" . $orga_data["first_name"] . " " . $orga_data["surname"] . "</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="size">Nombre d'équipes :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 100%;" type="number" id="size" name="size" min="3" max="12" value="<?= $tournament->getSize() ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="place">Lieu :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 100%;" type="text" id="place" name="place" value="<?= $tournament->getPlace() ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="price">Prix par participant</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 100%;" type="number" id="price" name="price" min="0" max="50" value="<?= $tournament->getPrice() ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="date_start">Dates :</label>
|
||||
</td>
|
||||
<td>
|
||||
Du <input style="width: 45%;" type="date" id="date_start" name="date_start" value="<?= $tournament->getStartDate() ?>" required />
|
||||
au <input style="width: 45%;" type="date" id="date_end" name="date_end" value="<?= $tournament->getEndDate() ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="date_inscription">Date limite d'inscription :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 49%;" type="date" id="date_inscription" name="date_inscription" value="<?= substr($tournament->getInscriptionDate(), 0, 10) ?>" required />
|
||||
<input style="width: 49%;" type="time" id="time_inscription" name="time_inscription" value="<?= substr($tournament->getInscriptionDate(), 11) ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="date_solutions">Date limite pour rendre les solutions :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 49%;" type="date" id="date_solutions" name="date_solutions" value="<?= substr($tournament->getSolutionsDate(), 0, 10) ?>" required />
|
||||
<input style="width: 49%;" type="time" id="time_solutions" name="time_solutions" value="<?= substr($tournament->getSolutionsDate(),11) ?>" required />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="date_syntheses">Date limite pour rendre les notes de synthèse :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width: 49%;" type="date" id="date_syntheses" name="date_syntheses"
|
||||
value="<?= substr($tournament->getSynthesesDate(), 0, 10) ?>" required/>
|
||||
<input style="width: 49%;" type="time" id="time_syntheses" name="time_syntheses"
|
||||
value="<?= substr($tournament->getSynthesesDate(), 11) ?>" required/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="description">Description :</label>
|
||||
</td>
|
||||
<td>
|
||||
<textarea style="width: 100%;" name="description" id="description" required><?= $tournament->getDescription() ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="width: 100%;" type="submit" name="edit_tournament" value="Modifier le tournoi" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Équipe
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Trigramme
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
Date d'inscription
|
||||
</th>
|
||||
<th style="border: 1px solid black; text-align: center">
|
||||
État de validation de l'inscription
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<?php require_once "footer.php" ?>
|
||||
|
||||
|
@ -2,10 +2,6 @@
|
||||
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error) {
|
||||
echo "<h2>Erreur : $error_message</h2>";
|
||||
}
|
||||
|
||||
for ($problem = 1; $problem <= 4; ++$problem) {
|
||||
echo "<h2>Vidéos pour le problème $problem</h2>\n";
|
||||
/** @var Video $video */
|
||||
|
Reference in New Issue
Block a user