mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-26 00:27:29 +02:00
Design "Mon tournoi"
This commit is contained in:
@ -146,166 +146,7 @@ require_once "header.php";
|
||||
<div class="alert alert-warning">
|
||||
Votre équipe est en attente de validation.
|
||||
</div>
|
||||
<?php } elseif (Phase::getCurrentPhase() >= Phase::PHASE1) { ?>
|
||||
<hr/>
|
||||
<h2>Déroulement du tournoi</h2>
|
||||
<?php if ($video != null) { ?>
|
||||
<h4>Vidéo de solution proposée :</h4>
|
||||
Lien de la vidéo : <a href="<?= $video->getLink() ?>"><?= $video->getLink() ?></a><br/>
|
||||
<?php displayVideo($video->getLink()) ?>
|
||||
<br/>
|
||||
<?php if (Phase::getCurrentPhase() >= Phase::PHASE3) { ?>
|
||||
<h4>Questions reçues :</h4>
|
||||
<?php
|
||||
for ($i = 0; $i < 2; ++$i) {
|
||||
if ($questions_received[$i] == null)
|
||||
continue;
|
||||
$asker = Team::fromId($questions_received[$i][0]->getFrom());
|
||||
$answer = Video::getVideo($asker->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $asker);
|
||||
?>
|
||||
<h5>Questions de l'équipe <?= $asker->getName() ?> (<?= $asker->getTrigram() ?>) :</h5>
|
||||
<table>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($j = 0; $j < 6; ++$j) {
|
||||
/** @var Question $question */
|
||||
$question = $questions_received[$i][$j];
|
||||
if ($question->getQuestion() === null)
|
||||
continue;
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
Question <?= $question->getNumber() ?> :
|
||||
</td>
|
||||
<td>
|
||||
<?= $question->getQuestion() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($question->getAttachedFile() !== null) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Pièce jointe attachée :</em>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/file/<?= $question->getAttachedFile() ?>">Télécharger</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<td>
|
||||
Réponse :
|
||||
</td>
|
||||
<td>
|
||||
<?= $question->getAnswer() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($question->getAttachedFileAnswer() !== null) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Pièce jointe attachée :</em>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/file/<?= $question->getAttachedFileAnswer() ?>">Télécharger</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<?php if (Phase::getCurrentPhase() >= Phase::PHASE4 && $answer != null) { ?>
|
||||
<h6>Vidéo de réponse proposée par l'équipe :</h6>
|
||||
Lien de la vidéo : <a href="<?= $answer->getLink() ?>"><?= $answer->getLink() ?></a><br/>
|
||||
<?php displayVideo($answer->getLink()) ?>
|
||||
<br/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<hr/>
|
||||
|
||||
<?php
|
||||
if (Phase::getCurrentPhase() >= 2) {
|
||||
for ($i = 0; $i < 2; ++$i) {
|
||||
$defender = Team::fromId($team->getVideoTeamIds()[$i]);
|
||||
if ($defender == null)
|
||||
continue;
|
||||
$sol = Video::getVideo(Reason::SOLUTION, $defender);
|
||||
$answer = Video::getVideo($i == 0 ? Reason::ANSWER1 : Reason::ANSWER2, $team);
|
||||
$questions = Question::getQuestions($team, $defender);
|
||||
?>
|
||||
<h4>Vidéo de solution proposée par l'équipe <?= $defender->getName() ?>
|
||||
(<?= $defender->getTrigram() ?>) :</h4>
|
||||
Lien de la vidéo : <a href="<?= $sol->getLink() ?>"><?= $sol->getLink() ?></a><br/>
|
||||
<?php displayVideo($sol->getLink()) ?>
|
||||
<br/>
|
||||
<h5>Vos questions :</h5>
|
||||
<br/>
|
||||
<table>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($j = 0; $j < 6; ++$j) {
|
||||
/** @var Question $question */
|
||||
$question = $questions[$j];
|
||||
if ($question->getQuestion() === null)
|
||||
continue;
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
Question <?= $question->getNumber() ?> :
|
||||
</td>
|
||||
<td>
|
||||
<?= $question->getQuestion() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($question->getAttachedFile() !== null) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Pièce jointe attachée :</em>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/file/<?= $question->getAttachedFile() ?>">Télécharger</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if (Phase::getCurrentPhase() >= Phase::PHASE3) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
Réponse :
|
||||
</td>
|
||||
<td>
|
||||
<?= $question->getAnswer() ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($question->getAttachedFileAnswer() !== null) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<em>Pièce jointe attachée :</em>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/file/<?= $question->getAttachedFileAnswer() ?>">Télécharger</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br/>
|
||||
<?php if (Phase::getCurrentPhase() >= Phase::PHASE4 && $answer != null) { ?>
|
||||
<h5>Votre vidéo de réponse :</h5>
|
||||
Lien de la vidéo : <a href="<?= $answer->getLink() ?>"><?= $answer->getLink() ?></a><br/>
|
||||
<?php displayVideo($answer->getLink()) ?>
|
||||
<hr/>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
Reference in New Issue
Block a user