Match set frontend to exam view
This commit is contained in:
@@ -56,4 +56,18 @@ class SetModel extends BaseDatabaseModel
|
||||
->order('sq.ordering ASC, q.id ASC')
|
||||
)->loadObjectList();
|
||||
}
|
||||
|
||||
public function getSets()
|
||||
{
|
||||
$db = Factory::getContainer()->get('DatabaseDriver');
|
||||
|
||||
return $db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->select(['s.id', 's.title', 'sub.title AS subject_title'])
|
||||
->from($db->quoteName('#__testquestions_sets', 's'))
|
||||
->leftJoin($db->quoteName('#__testquestions_subjects', 'sub') . ' ON sub.id = s.subject_id')
|
||||
->where('s.published = 1')
|
||||
->order('sub.title ASC, s.title ASC')
|
||||
)->loadObjectList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user