Add classes to abstract Users and Courses
Can refuse a question (email the author) Can modify question before validation
This commit is contained in:
parent
6e9554e2f2
commit
42fec70edf
14 changed files with 667 additions and 401 deletions
|
|
@ -1,6 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="Stylesheet" href="style.css">
|
||||
<title>Every Questions (BETA)</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<a href="http://www.h2g2.com" target="_blank">
|
||||
<img src="marvin-robot_normal.png" alt="" id="banner"/>
|
||||
</a>
|
||||
<h1>Nemubot Questions (BETA)</h1>
|
||||
</header>
|
||||
<?php
|
||||
|
||||
<?php
|
||||
include("Question.class.php");
|
||||
include("QuestionsFile.class.php");
|
||||
|
||||
|
|
@ -9,44 +23,42 @@ $file = new QuestionsFile("questions.xml");
|
|||
$question = $file->get_question($id);
|
||||
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="Stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div id="main_title">
|
||||
<a href="http://www.h2g2.com" target="_blank">
|
||||
<img src="marvin-robot_normal.png" alt="" id="banner"/>
|
||||
</a>
|
||||
<h1>Nemubot Questions</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Validation de la question</h2>
|
||||
<strong>Rappel de la question</strong><br/><br/>
|
||||
<?php if (!$question)
|
||||
{
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Validation de la question</h2>
|
||||
<h3>Rappel de la question</h3>
|
||||
<?php
|
||||
if (!isset($question))
|
||||
echo "La question n'existe pas.";
|
||||
}
|
||||
else
|
||||
{
|
||||
$question->print_test();
|
||||
|
||||
echo "\n\n";
|
||||
}
|
||||
?><br/>
|
||||
|
||||
<a href='thanksValidation.php?id=<?php echo $question->getId() ?>'>
|
||||
Valider la question
|
||||
</a>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
?>
|
||||
<p>
|
||||
<strong>Cours concerné :</strong> <?php echo $question->getCourse()->getName(); ?><br><br>
|
||||
<strong>Question posée :</strong> <?php echo $question->getQuestion(); ?><br><br>
|
||||
<strong>Réponses valides exhaustives :</strong>
|
||||
</p>
|
||||
<?php
|
||||
echo "<ul>";
|
||||
foreach($question->getAnswer() as $a)
|
||||
echo "<li>".$a."</li>";
|
||||
echo "</ul>";
|
||||
?>
|
||||
<form method="post"
|
||||
class="invalidation"
|
||||
action="thanksRefused.php">
|
||||
<input type="hidden" name="id" value="<?php echo $question->getId() ?>">
|
||||
<input type="submit" value="Refuser la question">
|
||||
</form>
|
||||
<form method="post"
|
||||
class="validation"
|
||||
action="thanksValidation.php">
|
||||
<input type="hidden" name="id" value="<?php echo $question->getId() ?>">
|
||||
<input type="submit" value="Valider la question">
|
||||
</form>
|
||||
<span style="clear: both; display: block;"></span>
|
||||
<?php } ?>
|
||||
</article>
|
||||
</section>
|
||||
<body>
|
||||
</html>
|
||||
|
|
|
|||
Reference in a new issue