answers = $q->getAnswers(); shuffle($q->answers); } return $questions; } public function getQuestion() { return $this->questiondata_content; } public function getAnswers() { return Answer::getAllWhere("answerdata_question = ".$this->getId()); } public function getCorrectAnswer() { return Answer::getWhere("answerdata_question = ".$this->getId()." and answerdata_correct = 1"); } public function getImage() { return $this->questiondata_image; } }