This commit is contained in:
Daniel Mason 2017-01-01 00:23:57 +13:00
parent b6876e601e
commit 0824aca6b9
4 changed files with 42 additions and 9 deletions

View file

@ -38,6 +38,11 @@ class Question extends DataItem {
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;