T201704031340
This commit is contained in:
@@ -28,11 +28,12 @@ class Question
|
|||||||
$cid = $question_details['Categories_ID'];
|
$cid = $question_details['Categories_ID'];
|
||||||
$c = $db->query('SELECT "name" FROM "Categories" WHERE "ID" = $1', array($cid))['data'][0]['name'];
|
$c = $db->query('SELECT "name" FROM "Categories" WHERE "ID" = $1', array($cid))['data'][0]['name'];
|
||||||
$this->question = $q;
|
$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);
|
print_r($this->answers);
|
||||||
shuffle($this->answers);
|
shuffle($this->answers);
|
||||||
print_r($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_id = $cid;
|
||||||
$this->category = $c;
|
$this->category = $c;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user