1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 15:37:24 +02:00

Adaptation de la plateforme aux besoins des correspondances (en cours)

This commit is contained in:
galaxyoyo
2019-09-11 01:17:05 +02:00
parent e908ad1923
commit 07e7b94f5c
18 changed files with 65 additions and 520 deletions

View File

@ -11,14 +11,12 @@ elseif (isset($send_document))
Nom de l'équipe : <?= $team->getName() ?><br/>
Trigramme : <?= $team->getTrigram() ?><br/>
Tournoi : <a href="<?= $tournament->getName() ?>"><?= $tournament->getName() ?></a><br/>
Problème : <a href=""><?= $team->getProblem() ?></a><br/>
<?php
for ($i = 1; $i <= 2; ++$i) {
if ($team->getEncadrants()[$i] == NULL)
continue;
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
if ($team->getEncadrantId() !== null) {
$encadrant = User::fromId($team->getEncadrantId());
$id = $encadrant->getId();
echo "Encadrant $i : <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
echo "Encadrant : <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
}
for ($i = 1; $i <= 6; ++$i) {
if ($team->getParticipants()[$i - 1] == NULL)
@ -29,10 +27,6 @@ for ($i = 1; $i <= 6; ++$i) {
}
?>
Code d'accès : <strong><?= $team->getAccessCode() ?></strong><br/>
<?php if ($team->isSelectedForFinal()) {
$final_name = $FINAL->getName();
echo "<strong>Équipe sélectionnée pour la <a href=\"$URL_BASE/tournoi/$final_name\">finale nationale</a>.</strong><br />";
} ?>
<?php if (isset($_GET["modifier"])) { ?>
@ -59,13 +53,13 @@ for ($i = 1; $i <= 6; ++$i) {
</tr>
<tr>
<td>
<label for="tournament">Tournoi :</label>
<label for="problem">Problème :</label>
</td>
<td>
<select style="width: 100%;" id="tournament" name="tournament_id">
<select style="width: 100%;" id="problem" name="problem">
<?php
foreach ($tournaments as $tournament)
echo "<option value=\"" . $tournament->getId() . "\">" . $tournament->getName() . "</option>\n";
for ($i = 1; $i <= 4; ++$i)
echo "<option value=\"$i\"" . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>\n";
?>
</select>
</td>
@ -88,14 +82,8 @@ for ($i = 1; $i <= 6; ++$i) {
<hr/>
<h2>Mes autorisations</h2>
<?php
printDocuments($documents);
if ($team->isSelectedForFinal()) { ?>
<hr/>
<h2>Mes autorisations pour la finale</h2>
<?php
printDocuments($documents_final);
}
// TODO Add documents
//printDocuments($documents);
if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
<hr />
@ -109,11 +97,7 @@ for ($i = 1; $i <= 6; ++$i) {
</td>
<td>
<select style="width: 100%;" id="type" name="type">
<?php if ($_SESSION["user"]->getBirthDate() > strval($YEAR - 18) . substr($tournament->getStartDate(), 4)) { ?>
<option value="parental_consent">Autorisation parentale</option>
<?php } ?>
<option value="photo_consent">Autorisation de droit à l'image</option>
<option value="sanitary_plug">Fiche sanitaire</option>
</select>
</td>
</tr>
@ -144,8 +128,9 @@ for ($i = 1; $i <= 6; ++$i) {
</form>
</td>
<?php
$can_validate = canValidate($team, $tournament);
if ($can_validate) { ?>
// TODO check end of inscription
#$can_validate = canValidate($team, $tournament);
if (true) { ?>
<td style="width: 50%;">
<form method="post">
<input style="width: 100%;" type="submit" name="request_validation"