1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-25 15:37:24 +02:00

Phase 3 : réponse aux questions

This commit is contained in:
galaxyoyo
2019-09-21 20:39:40 +02:00
parent ac48412f7e
commit 5355ba87b1
9 changed files with 261 additions and 22 deletions

View File

@ -60,9 +60,12 @@
case Phase::PHASE1: ?>
<li><a href="<?= $URL_BASE ?>/envoyer-video-1">Envoyer ma vidéo (phase 1)</a></li>
<?php break;
case Phase::PHASE2: ?>
case Phase::PHASE2: ?>
<li><a href="<?= $URL_BASE ?>/poser-questions-2">Poser des questions (phase 2)</a></li>
<?php break;
<?php break;
case Phase::PHASE3: ?>
<li><a href="<?= $URL_BASE ?>/repondre-questions-3">Répondre aux questions (phase 3)</a></li>
<?php break;
}
} ?>
<?php } ?>

View File

@ -0,0 +1,87 @@
<?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() ?>" />
<table style="width: 100%;">
<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="<?= $URL_BASE . "/file/" . $question->getAttachedFile() ?>">Télécharger</a>
</td>
</tr>
<?php } ?>
<tr>
<td>
<label for="answer_<?= $i + 1 ?>">Réponse :</label>
</td>
<td>
<textarea style="width: 100%;" id="answer_<?= $i + 1 ?>" name="answer_<?= $i + 1 ?>"><?= $question->getAnswer() ?></textarea>
</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>
<input style="width: 100%;" type="file" name="file_<?= $i + 1 ?>" id="file_<?= $i + 1 ?>" />
</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">
<input style="width: 100%;" type="submit" name="answer" value="Répondre aux questions posées" />
</td>
</tr>
</tbody>
</table>
</form>
<?php } ?>
<?php
require_once "footer.php";

View File

@ -42,9 +42,12 @@ for ($problem = 1; $problem <= 4; ++$problem) {
continue;
echo "Question " . ($i + 1) . " : " . $question->getQuestion() . "<br />\n";
if ($question->getAttachedFile() != null) {
if ($question->getAttachedFile() != null)
echo "<em>Pièce jointe attachée :</em> <a href=\"$URL_BASE/file/" . $question->getAttachedFile() . "\">Télécharger</a><br />\n";
}
if ($question->getAnswer() != null)
echo "Réponse apportée : " . $question->getAnswer() . "<br />\n";
if ($question->getAttachedFileAnswer() != null)
echo "<em>Pièce jointe attachée pour la réponse :</em> <a href=\"$URL_BASE/file/" . $question->getAttachedFileAnswer() . "\">Télécharger</a><br />\n";
}
}
}