mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-26 05:42:20 +00:00
71 lines
2.8 KiB
PHP
71 lines
2.8 KiB
PHP
<?php
|
|
require_once "header.php";
|
|
?>
|
|
|
|
<div class="mt-4 mb-4">
|
|
<h1 class="display-4">Répondre aux questions</h1>
|
|
</div>
|
|
|
|
<?php
|
|
if (isset($answer_questions) && !$has_error) { ?>
|
|
<div class="alert alert-success">
|
|
Vos réponses ont bien été mises à jour !
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<div class="alert alert-info">
|
|
<strong>Lien de la vidéo :</strong> <a href="<?= $video->getLink() ?>"><?= $video->getLink() ?></a>
|
|
</div>
|
|
|
|
<?php displayVideo($video->getLink()); ?>
|
|
|
|
<?php
|
|
foreach ($questions as $questions_team) {
|
|
$from = Team::fromId($questions_team[0]->getFrom());
|
|
echo "<h4>Questions de l'équipe " . $from->getName() . " (" . $from->getTrigram() . ") :</h4>\n";
|
|
?>
|
|
<form method="POST" enctype="multipart/form-data">
|
|
<input type="hidden" name="from" value="<?= $from->getTrigram() ?>"/>
|
|
<?php
|
|
for ($i = 0; $i < sizeof($questions_team); ++$i) {
|
|
$question = $questions_team[$i];
|
|
if ($question->getQuestion() == null)
|
|
continue;
|
|
?>
|
|
<div class="alert alert-info">
|
|
<strong>Question <?= $i + 1 ?> :</strong> <?= $question->getQuestion() ?><br/>
|
|
<?php
|
|
if ($question->getAttachedFile() != null) { ?>
|
|
Pièce jointe :
|
|
<a href="/file/<?= $question->getAttachedFile() ?>"><strong>Télécharger</strong></a><br/>
|
|
<?php } ?>
|
|
<div class="form-group row">
|
|
<div class="form-group col-md-12">
|
|
<label for="answer_<?= $i + 1 ?>">Réponse :</label>
|
|
<textarea class="form-control" id="answer_<?= $i + 1 ?>"
|
|
name="answer_<?= $i + 1 ?>"><?= $question->getAnswer() ?></textarea>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
if ($question->getAttachedFileAnswer() != null) { ?>
|
|
Pièce jointe :
|
|
<a href="/file/<?= $question->getAttachedFileAnswer() ?>"><strong>Télécharger</strong></a>
|
|
<?php } ?>
|
|
<div class="form-group row">
|
|
<div class="form-group col-md-12">
|
|
<label for="file_<?= $i + 1 ?>">Ajouter une pièce jointe (<em>facultatif</em>) :</label>
|
|
<input type="file" name="file_<?= $i + 1 ?>" id="file_<?= $i + 1 ?>"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php } ?>
|
|
<input type="checkbox" name="no_drawing" id="no_drawing_<?= $from->getTrigram() ?>"/> <label for="no_drawing_<?= $from->getTrigram() ?>">Je confirme que mes
|
|
pièces jointes ne contiennent pas de texte.</label>
|
|
|
|
<input class="btn btn-primary btn-lg btn-block" type="submit" name="answer" value="Répondre aux questions posées"/>
|
|
</form>
|
|
<hr />
|
|
<?php } ?>
|
|
|
|
<?php
|
|
require_once "footer.php";
|