Possibility to modify the question -> NOT WORKING
This commit is contained in:
parent
65670dd09d
commit
7d249967d6
@ -128,16 +128,41 @@ class Question
|
||||
return $this->course;
|
||||
}
|
||||
|
||||
public function setCourse($course)
|
||||
{
|
||||
$this->course = $course;
|
||||
}
|
||||
|
||||
public function getQuestion()
|
||||
{
|
||||
return $this->question;
|
||||
}
|
||||
|
||||
public setQuestion($question)
|
||||
{
|
||||
$this->question = $question;
|
||||
}
|
||||
|
||||
public function getAnswer()
|
||||
{
|
||||
return $this->answers;
|
||||
}
|
||||
|
||||
public function setAnswer($answers)
|
||||
{
|
||||
if (!empty($answers))
|
||||
{
|
||||
if (is_array($answers))
|
||||
{
|
||||
foreach ($answers as $ans)
|
||||
$q->answers[] = $ans;
|
||||
}
|
||||
else
|
||||
$q->answers[] = $answers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mail_utf8($to, $subject = '(No subject)',
|
||||
$message = '', $header = '')
|
||||
{
|
||||
|
@ -30,6 +30,7 @@ if (!empty($question))
|
||||
while ($dest_mail == $question->get_validator());
|
||||
|
||||
$question->set_validator($dest_mail);
|
||||
echo $dest_mail;
|
||||
$validationAddress = "/validation.php?id=".$question->getId();
|
||||
|
||||
/* This code works, perhaps should be placed in a method in Question class?*/
|
||||
|
@ -15,7 +15,8 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Merci de votre participation</h2>
|
||||
<p>
|
||||
Votre question a bien été prise en compte.<br/>
|
||||
@ -25,6 +26,7 @@
|
||||
<p>
|
||||
Nemubot vous remercie de l'aider à agrandir sa base de donnée
|
||||
</p>
|
||||
</article>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +1,4 @@
|
||||
1;3001;0c<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
|
||||
<?php
|
||||
include("Question.class.php");
|
||||
@ -13,7 +13,7 @@ $question = $file->get_question($id);
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf8" />
|
||||
<link rel="Stylesheet" href="styleConfirmation.css" />
|
||||
<link rel="Stylesheet" href="style.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -26,9 +26,10 @@ $question = $file->get_question($id);
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section>
|
||||
<h1>Validation de la question</h1>
|
||||
<h3>Rappel de la question</h3>
|
||||
<section id="introduction">
|
||||
<article>
|
||||
<h2>Validation de la question</h2>
|
||||
<strong>Rappel de la question</strong><br/><br/>
|
||||
<?php if (!$question)
|
||||
{
|
||||
echo "La question n'existe pas.";
|
||||
@ -44,7 +45,7 @@ else
|
||||
<a href='thanksValidation.php?id=<?php echo $question->getId() ?>'>
|
||||
Valider la question
|
||||
</a>
|
||||
|
||||
</article>
|
||||
</section>
|
||||
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user