Filter exam sheets by E symbol
This commit is contained in:
@@ -21,6 +21,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
|
|||||||
|
|
||||||
## Instalacja
|
## Instalacja
|
||||||
|
|
||||||
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.6.2).
|
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.6.3).
|
||||||
|
|
||||||
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
|
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
-- Limit exam sheet selection to symbols beginning with E.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<creationDate>2026-10-14</creationDate>
|
<creationDate>2026-10-14</creationDate>
|
||||||
<author>Komponent</author>
|
<author>Komponent</author>
|
||||||
<license>GNU General Public License version 2 or later</license>
|
<license>GNU General Public License version 2 or later</license>
|
||||||
<version>1.6.2</version>
|
<version>1.6.3</version>
|
||||||
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
|
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
|
||||||
<element>com_testquestions</element>
|
<element>com_testquestions</element>
|
||||||
<namespace path="src">Komponent\Component\Testquestions</namespace>
|
<namespace path="src">Komponent\Component\Testquestions</namespace>
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class QuestionsModel extends ListModel
|
|||||||
->leftJoin($db->quoteName('#__testquestions_categories', 'c') . ' ON c.id = q.category_id')
|
->leftJoin($db->quoteName('#__testquestions_categories', 'c') . ' ON c.id = q.category_id')
|
||||||
->where('q.' . $db->quoteName('published') . ' = 1')
|
->where('q.' . $db->quoteName('published') . ' = 1')
|
||||||
->where('q.' . $db->quoteName('test_symbol') . ' <> ' . $db->quote(''))
|
->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')])
|
->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')
|
->order('q.' . $db->quoteName('exam_year') . ' DESC, q.' . $db->quoteName('test_symbol') . ' ASC')
|
||||||
)->loadObjectList();
|
)->loadObjectList();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<fields name="request">
|
<fields name="request">
|
||||||
<fieldset name="request">
|
<fieldset name="request">
|
||||||
<field name="test_symbol" type="sql" label="COM_TESTQUESTIONS_TEST_SYMBOL" description="COM_TESTQUESTIONS_MENU_TEST_SYMBOL_DESC"
|
<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" />
|
key_field="value" value_field="text" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</fields>
|
</fields>
|
||||||
|
|||||||
Reference in New Issue
Block a user