mirror of
https://github.com/idanoo/nzart-exam-generator
synced 2025-07-01 22:02:17 +00:00
Images now load on main page + styling
This commit is contained in:
parent
0727b3c2ab
commit
b6876e601e
2 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue