Can change a validated question
This commit is contained in:
parent
42fec70edf
commit
30c06c08e8
2 changed files with 38 additions and 13 deletions
|
|
@ -27,19 +27,26 @@
|
|||
</a>
|
||||
<h1>Nemubot Questions (BETA)</h1>
|
||||
</header>
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<?php
|
||||
|
||||
include("Question.class.php");
|
||||
include("QuestionsFile.class.php");
|
||||
|
||||
$id = $_GET['id'];
|
||||
@$id = $_GET['id'];
|
||||
|
||||
$fileQ = new QuestionsFile("questions.xml");
|
||||
$question = $fileQ->get_question($id);
|
||||
if (isset($question))
|
||||
{
|
||||
?>
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Dernière chance pour changer d'avis</h2>
|
||||
<h2><?php
|
||||
if ($question->isValidated())
|
||||
echo "Cette question a déjà été validée ; si vous la modifiez, elle devra être de nouveau validée";
|
||||
else
|
||||
echo"Dernière chance pour changer d'avis";
|
||||
?></h2>
|
||||
<p>
|
||||
<strong>Cours concerné :</strong> <?php echo $question->getCourse()->getName(); ?><br><br>
|
||||
<strong>Question posée :</strong> <?php echo $question->getQuestion(); ?><br><br>
|
||||
|
|
@ -107,6 +114,10 @@ print '<script type="text/javascript">var nbAnswer = '.($max+1).';</script>';
|
|||
</p>
|
||||
</form>
|
||||
</article>
|
||||
<?php
|
||||
if (!$question->isValidated())
|
||||
{
|
||||
?>
|
||||
<article>
|
||||
<h2>... ou la confirmer telle quelle !</h2>
|
||||
<p>
|
||||
|
|
@ -120,6 +131,12 @@ print '<script type="text/javascript">var nbAnswer = '.($max+1).';</script>';
|
|||
<input type="submit" value="Je confirme">
|
||||
</form>
|
||||
<span style="clear: both; display: block;"></span>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else
|
||||
header("Location: ./");
|
||||
?>
|
||||
</article>
|
||||
</section>
|
||||
<?php include('footer.html') ?>
|
||||
|
|
|
|||
Reference in a new issue