Can change a validated question
This commit is contained in:
parent
42fec70edf
commit
30c06c08e8
2 changed files with 38 additions and 13 deletions
|
|
@ -160,7 +160,11 @@ class Question
|
|||
|
||||
public function setQuestion($question)
|
||||
{
|
||||
$this->question = $question;
|
||||
if ($this->question != $question)
|
||||
{
|
||||
$this->question = $question;
|
||||
$this->validated = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function getAnswer()
|
||||
|
|
@ -183,18 +187,22 @@ class Question
|
|||
|
||||
public function setAnswer($answers)
|
||||
{
|
||||
$this->answers = array();
|
||||
if (!empty($answers))
|
||||
if ($this->answers != $answers)
|
||||
{
|
||||
if (is_array($answers))
|
||||
{
|
||||
foreach ($answers as $ans)
|
||||
$this->answers[] = $ans;
|
||||
}
|
||||
else
|
||||
$this->answers[] = $answers;
|
||||
}
|
||||
$this->answers = array();
|
||||
$this->validated = false;
|
||||
|
||||
if (!empty($answers))
|
||||
{
|
||||
if (is_array($answers))
|
||||
{
|
||||
foreach ($answers as $ans)
|
||||
$this->answers[] = $ans;
|
||||
}
|
||||
else
|
||||
$this->answers[] = $answers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mail_utf8($to, $subject = '(No subject)',
|
||||
|
|
|
|||
Reference in a new issue