Les questions et réponses ont maintenant de vrais retours à la ligne

This commit is contained in:
Yohann 2020-01-24 09:35:39 +01:00
parent f458f37766
commit e5501c2076
2 changed files with 4 additions and 5 deletions

View File

@ -97,8 +97,7 @@ if (false) {
continue;
?>
<div class="alert alert-info">
<strong>Question <?= $question->getNumber() ?>
:</strong> <?= $question->getQuestion() ?>
<strong>Question <?= $question->getNumber() ?> :</strong> <?= preg_replace("#\n#", "<br />\n", $question->getQuestion()) ?>
<br/>
<?php
if ($question->getAttachedFile() !== null) { ?>
@ -107,7 +106,7 @@ if (false) {
<br/>
<?php } ?>
<?php if (Phase::getCurrentPhase() >= Phase::PHASE4) { ?>
<strong>Réponse :</strong> <?= $question->getAnswer() ?><br/>
<strong>Réponse :</strong> <?= preg_replace("#\n#", "<br />\n", $question->getAnswer()) ?><br/>
<?php
if ($question->getAttachedFile() !== null) { ?>
<em>Pièce jointe attachée :</em>

View File

@ -114,11 +114,11 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
continue;
echo "<div class=\"alert alert-info\">\n";
echo "<strong>" . ($i == 0 ? "Remarques générales :" : "Question " . $i . " :") . "</strong> " . $question->getQuestion() . "<br />\n";
echo "<strong>" . ($i == 0 ? "Remarques générales :" : "Question " . $i . " :") . "</strong> " . preg_replace("#\n#", "<br />\n", $question->getQuestion()) . "<br />\n";
if ($question->getAttachedFile() != null)
echo "<em>Pièce jointe attachée :</em> <a href=\"/file/" . $question->getAttachedFile() . "\"><strong>Télécharger</strong></a><br />\n";
if ($question->getAnswer() != null)
echo "<strong>Réponse apportée :</strong> " . $question->getAnswer() . "<br />\n";
echo "<strong>Réponse apportée :</strong> " . preg_replace("#\n#", "<br />\n", $question->getAnswer()) . "<br />\n";
if ($question->getAttachedFileAnswer() != null)
echo "<em>Pièce jointe attachée pour la réponse :</em> <a href=\"/file/" . $question->getAttachedFileAnswer() . "\"><strong>Télécharger</strong></a><br />\n";
echo "</div>\n";