T201704031335

This commit is contained in:
Leander
2017-04-03 13:35:51 +02:00
parent 4d2b46a1e7
commit 5a12609956

View File

@@ -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;
}