T201704031335
This commit is contained in:
@@ -26,7 +26,7 @@ class Question
|
||||
$a2 = $question_details['answer2'];
|
||||
$a3 = $question_details['answer3'];
|
||||
$cid = $question_details['Categories_ID'];
|
||||
$c = $db->query('SELECT "name" FROM "Categories" WHERE "ID" = $1', array($cid));
|
||||
$c = $db->query('SELECT "name" FROM "Categories" WHERE "ID" = $1', array($cid))['data'][0]['name'];
|
||||
$this->question = $q;
|
||||
$this->answers = array('a0' => $a0, 'a1' => $a1, 'a2' => $a2, 'a3' => $a3);
|
||||
shuffle($this->answers);
|
||||
@@ -52,7 +52,6 @@ class Question
|
||||
'question' => $this->question,
|
||||
'answers' => [$this->answers['a0'], $this->answers['a1'], $this->answers['a2'], $this->answers['a3']]
|
||||
);
|
||||
print_r($this->question);
|
||||
return $question_object;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user