Images now load on main page + styling

This commit is contained in:
Daniel Mason 2016-12-31 20:36:47 +13:00
parent 0727b3c2ab
commit b6876e601e
2 changed files with 12 additions and 1 deletions

View file

@ -20,7 +20,7 @@ class Question extends DataItem {
public static function getQuestions($count = false)
{
$questions = static::getAllWhere(false, false, false, $count);
$questions = static::getAllWhere(false, "order by rand()", false, $count);
foreach ($questions as $q) {
$q->answers = $q->getAnswers();
shuffle($q->answers);
@ -37,4 +37,9 @@ class Question extends DataItem {
{
return Answer::getAllWhere("answerdata_question = ".$this->getId());
}
public function getImage()
{
return $this->questiondata_image;
}
}