plateforme-corres2math/server_files/views/repondre_questions.php

87 lines
2.2 KiB
PHP
Raw Normal View History

2019-09-21 18:39:40 +00:00
<?php
require_once "header.php";
?>
Lien de la vidéo : <a href="<?= $video->getLink() ?>"><?= $video->getLink() ?></a>
<?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() ?>" />
2019-09-24 21:44:38 +00:00
<table >
2019-09-21 18:39:40 +00:00
<tbody>
<?php
for ($i = 0; $i < sizeof($questions_team); ++$i) {
$question = $questions_team[$i];
if ($question->getQuestion() == null)
continue;
?>
<tr>
<td>
Question <?= $i + 1 ?> :
</td>
<td>
<?= $question->getQuestion() ?>
</td>
</tr>
<?php
if ($question->getAttachedFile() != null) { ?>
<tr>
<td>
Pièce jointe :
</td>
<td>
<a href="/file<?= $question->getAttachedFile() ?>">Télécharger</a>
2019-09-21 18:39:40 +00:00
</td>
</tr>
<?php } ?>
<tr>
<td>
<label for="answer_<?= $i + 1 ?>">Réponse :</label>
</td>
<td>
2019-09-24 21:44:38 +00:00
<textarea id="answer_<?= $i + 1 ?>" name="answer_<?= $i + 1 ?>"><?= $question->getAnswer() ?></textarea>
2019-09-21 18:39:40 +00:00
</td>
</tr>
<?php
if ($question->getAttachedFileAnswer() != null) { ?>
<tr>
<td>
Pièce jointe :
</td>
<td>
<a href="<?= $URL_BASE . "/file/" . $question->getAttachedFileAnswer() ?>">Télécharger</a>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label for="file_<?= $i + 1 ?>">Ajouter une pièce jointe (<em>facultatif</em>) :</label>
</td>
<td>
2019-09-24 21:44:38 +00:00
<input type="file" name="file_<?= $i + 1 ?>" id="file_<?= $i + 1 ?>" />
2019-09-21 18:39:40 +00:00
</td>
</tr>
<?php } ?>
<tr>
<td style="text-align: center" colspan="2">
<input type="checkbox" name="no_drawing" id="no_drawing" /> <label for="no_drawing">Je confirme que mes pièces jointes ne contiennent pas de texte.</label>
</td>
</tr>
<tr>
<td colspan="2">
2019-09-24 21:44:38 +00:00
<input type="submit" name="answer" value="Répondre aux questions posées" />
2019-09-21 18:39:40 +00:00
</td>
</tr>
</tbody>
</table>
</form>
<?php } ?>
<?php
require_once "footer.php";