plateforme-corres2math/server_files/views/poser_questions.php

62 lines
2.3 KiB
PHP
Raw Normal View History

2019-09-20 12:57:06 +00:00
<?php
require_once "header.php";
for ($i = 0; $i < 2; ++$i) {
$receiver = $receivers[$i];
$video = $videos[$i]; ?>
<h2>Questions pour l'équipe <?= $receiver->getName() ?> (<?= $receiver->getTrigram() ?>) :</h2>
Lien de la vidéo : <a href="<?= $video->getLink() ?>"><?= $video->getLink() ?></a><br/>
<?php displayVideo($video->getLink()) ?>
<br/>
<form method="POST" enctype="multipart/form-data">
2019-09-20 12:57:06 +00:00
<input type="hidden" name="to" value="<?= $receiver->getTrigram() ?>"/>
<table style="width: 100%;">
<tbody>
<?php
for ($j = 0; $j < 6; ++$j) {
$question = $questions[$i][$j]; ?>
2019-09-20 12:57:06 +00:00
<tr>
<td style="width: 30%;">
<label for="question_<?= $j + 1 ?>">Question <?= $j + 1 ?> <?= $j >= 3 ? "(<em>facultatif</em>)" : "" ?> :</label>
2019-09-20 12:57:06 +00:00
</td>
<td style="width: 70%;">
<textarea style="width: 100%;" id="question_<?= $j + 1 ?>" name="question_<?= $j + 1 ?>"><?= $question->getQuestion() ?></textarea>
2019-09-20 12:57:06 +00:00
</td>
</tr>
<?php
if ($question->getAttachedFile() != null) { ?>
<tr>
<td>
Pièce jointe :
</td>
<td>
<a href="<?= $URL_BASE . "/file/" . $question->getAttachedFile() ?>">Télécharger</a>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label for="file_<?= $j + 1 ?>">Ajouter une pièce jointe (<em>facultatif</em>) :</label>
</td>
<td>
<input style="width: 100%;" type="file" name="file_<?= $j + 1 ?>" id="file_<?= $j + 1 ?>" />
</td>
</tr>
2019-09-20 12:57:06 +00:00
<?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>
2019-09-20 12:57:06 +00:00
<tr>
<td colspan="2">
<input style="width: 100%;" type="submit" name="give_questions" value="Poser les questions" />
</td>
</tr>
</tbody>
</table>
</form>
<hr/>
<?php }
require_once "footer.php";