Filter exam sheets by E symbol
This commit is contained in:
@@ -53,6 +53,7 @@ class QuestionsModel extends ListModel
|
||||
->leftJoin($db->quoteName('#__testquestions_categories', 'c') . ' ON c.id = q.category_id')
|
||||
->where('q.' . $db->quoteName('published') . ' = 1')
|
||||
->where('q.' . $db->quoteName('test_symbol') . ' <> ' . $db->quote(''))
|
||||
->where('q.' . $db->quoteName('test_symbol') . ' LIKE ' . $db->quote('E%'))
|
||||
->group(['q.' . $db->quoteName('test_symbol'), 'q.' . $db->quoteName('exam_year'), 'c.' . $db->quoteName('title')])
|
||||
->order('q.' . $db->quoteName('exam_year') . ' DESC, q.' . $db->quoteName('test_symbol') . ' ASC')
|
||||
)->loadObjectList();
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<fields name="request">
|
||||
<fieldset name="request">
|
||||
<field name="test_symbol" type="sql" label="COM_TESTQUESTIONS_TEST_SYMBOL" description="COM_TESTQUESTIONS_MENU_TEST_SYMBOL_DESC"
|
||||
query="SELECT DISTINCT test_symbol AS value, test_symbol AS text FROM #__testquestions_questions WHERE published = 1 AND test_symbol <> '' ORDER BY test_symbol"
|
||||
query="SELECT DISTINCT test_symbol AS value, test_symbol AS text FROM #__testquestions_questions WHERE published = 1 AND test_symbol LIKE 'E%' ORDER BY test_symbol"
|
||||
key_field="value" value_field="text" />
|
||||
</fieldset>
|
||||
</fields>
|
||||
|
||||
Reference in New Issue
Block a user