T201704031340

This commit is contained in:
Leander
2017-04-03 13:40:43 +02:00
parent 85118cea6a
commit 55c8ca52d3

View File

@@ -28,11 +28,12 @@ class Question
$cid = $question_details['Categories_ID'];
$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);
$this->answers = array($a0, $a1, $a2, $a3);
print_r($this->answers);
shuffle($this->answers);
print_r($this->answers);
$this->correct_answer_position = array_search('a0', $this->answers);
$this->correct_answer_position = array_search($a0, $this->answers);
print_r($this->correct_answer_position);
$this->category_id = $cid;
$this->category = $c;
}