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;
|
return $this->course;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setCourse($course)
|
||||||
|
{
|
||||||
|
$this->course = $course;
|
||||||
|
}
|
||||||
|
|
||||||
public function getQuestion()
|
public function getQuestion()
|
||||||
{
|
{
|
||||||
return $this->question;
|
return $this->question;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public setQuestion($question)
|
||||||
|
{
|
||||||
|
$this->question = $question;
|
||||||
|
}
|
||||||
|
|
||||||
public function getAnswer()
|
public function getAnswer()
|
||||||
{
|
{
|
||||||
return $this->answers;
|
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)',
|
function mail_utf8($to, $subject = '(No subject)',
|
||||||
$message = '', $header = '')
|
$message = '', $header = '')
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ if (!empty($question))
|
|||||||
while ($dest_mail == $question->get_validator());
|
while ($dest_mail == $question->get_validator());
|
||||||
|
|
||||||
$question->set_validator($dest_mail);
|
$question->set_validator($dest_mail);
|
||||||
|
echo $dest_mail;
|
||||||
$validationAddress = "/validation.php?id=".$question->getId();
|
$validationAddress = "/validation.php?id=".$question->getId();
|
||||||
|
|
||||||
/* This code works, perhaps should be placed in a method in Question class?*/
|
/* This code works, perhaps should be placed in a method in Question class?*/
|
||||||
|
@ -15,16 +15,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section>
|
<section id="introduction">
|
||||||
|
<article>
|
||||||
<h2>Merci de votre participation</h2>
|
<h2>Merci de votre participation</h2>
|
||||||
<p>
|
<p>
|
||||||
Votre question a bien été prise en compte.<br/>
|
Votre question a bien été prise en compte.<br/>
|
||||||
Un email a été envoyé à une personne du chan pour
|
Un email a été envoyé à une personne du chan pour
|
||||||
qu'elle valide votre question.
|
qu'elle valide votre question.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Nemubot vous remercie de l'aider à agrandir sa base de donnée
|
Nemubot vous remercie de l'aider à agrandir sa base de donnée
|
||||||
</p>
|
</p>
|
||||||
|
</article>
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
1;3001;0c<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
include("Question.class.php");
|
include("Question.class.php");
|
||||||
@ -13,7 +13,7 @@ $question = $file->get_question($id);
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf8" />
|
<meta charset="utf8" />
|
||||||
<link rel="Stylesheet" href="styleConfirmation.css" />
|
<link rel="Stylesheet" href="style.css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -26,9 +26,10 @@ $question = $file->get_question($id);
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section>
|
<section id="introduction">
|
||||||
<h1>Validation de la question</h1>
|
<article>
|
||||||
<h3>Rappel de la question</h3>
|
<h2>Validation de la question</h2>
|
||||||
|
<strong>Rappel de la question</strong><br/><br/>
|
||||||
<?php if (!$question)
|
<?php if (!$question)
|
||||||
{
|
{
|
||||||
echo "La question n'existe pas.";
|
echo "La question n'existe pas.";
|
||||||
@ -44,7 +45,7 @@ else
|
|||||||
<a href='thanksValidation.php?id=<?php echo $question->getId() ?>'>
|
<a href='thanksValidation.php?id=<?php echo $question->getId() ?>'>
|
||||||
Valider la question
|
Valider la question
|
||||||
</a>
|
</a>
|
||||||
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user