mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-26 17:02:22 +00:00
132 lines
3.4 KiB
PHP
132 lines
3.4 KiB
PHP
|
<?php
|
||
|
require_once "header.php";
|
||
|
|
||
|
for ($i = 0; $i < 2; ++$i) {
|
||
|
/** @var Team $answer_team */
|
||
|
$answer_team = $teams[$i];
|
||
|
/** @var Video $sol */
|
||
|
$sol = $sols[$i];
|
||
|
/** @var Video $answer */
|
||
|
$answer = $answers[$i];
|
||
|
/** @var Video $answer_validated */
|
||
|
$answer_validated = $answers_validated[$i];
|
||
|
/** @var Question[] $questions */
|
||
|
$questions = Question::getQuestions($team, $answer_team);
|
||
|
?>
|
||
|
<h2>Vidéo de l'équipe <?= $answer_team->getName() ?> (<?= $answer_team->getTrigram() ?>) :</h2>
|
||
|
<h5>Lien de la vidéo de présentation de la solution au problème : <a href="<?= $sol->getLink() ?>"><?= $sol->getLink() ?></a></h5>
|
||
|
<?php displayVideo($sol->getLink()) ?>
|
||
|
|
||
|
<h5>Questions échangées :</h5>
|
||
|
<table style="width: 100%;">
|
||
|
<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="<?= $URL_BASE ?>/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="<?= $URL_BASE ?>/file/<?= $question->getAttachedFileAnswer() ?>">Télécharger</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php } ?>
|
||
|
<?php } ?>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<br />
|
||
|
<h5>Vidéo de réponse :</h5>
|
||
|
|
||
|
<?php
|
||
|
if ($answer !== null) {
|
||
|
$link = $answer->getLink();
|
||
|
echo "Lien de la vidéo déjà envoyée : <a href=\"$link\">$link</a> (version " . $answer->getVersion() . ")<br />\n";
|
||
|
displayVideo($link);
|
||
|
switch ($answer->getValidation()) {
|
||
|
case 0:
|
||
|
echo "La vidéo n'a pas encore été contrôlée.<br />";
|
||
|
break;
|
||
|
case 1:
|
||
|
echo "La vidéo a été acceptée.<br />";
|
||
|
break;
|
||
|
case -1:
|
||
|
echo "La vidéo a été rejetée.<br />";
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
if ($answer_validated != null && $answer_validated->getId() != $answer->getId()) {
|
||
|
$link = $answer_validated->getLink();
|
||
|
echo "<hr />\nLien de la dernière vidéo validée : <a href=\"$link\">$link</a><br />";
|
||
|
displayVideo($link);
|
||
|
}
|
||
|
?>
|
||
|
|
||
|
<form method="POST">
|
||
|
<input type="hidden" name="team" value="<?= $i + 1 ?>" />
|
||
|
<table style="width: 100%;">
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td style="width: 30%;">
|
||
|
<label for="link">Lien de la vidéo à soumettre :</label>
|
||
|
</td>
|
||
|
<td style="width: 70%;">
|
||
|
<input style="width: 100%;" type="url" id="link" name="link" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td style="text-align: center;" colspan="2">
|
||
|
<input type="checkbox" name="valid_link" id="valid_link" required /> <label for="valid_link">Je confirme que le lien est valide</label>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td style="text-align: center;" colspan="2">
|
||
|
<input type="checkbox" name="no_change" id="no_change" required /> <label for="no_change">Je m'engage à ne pas changer le contenu du lien et de la vidéo</label>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td colspan="2">
|
||
|
<input style="width: 100%;" type="submit" name="upload_answer" value="Envoyer la vidéo" />
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</form>
|
||
|
<hr />
|
||
|
<?php
|
||
|
}
|
||
|
|
||
|
require_once "footer.php";
|