Compare commits

...
1 Commits
Author SHA1 Message Date
Wojtek 270143ad6a Filter exam sheets by E symbol 2026-10-15 09:30:40 +02:00
5 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -21,6 +21,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
## 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**.
@@ -0,0 +1 @@
-- Limit exam sheet selection to symbols beginning with E.
+1 -1
View File
@@ -4,7 +4,7 @@
<creationDate>2026-10-14</creationDate>
<author>Komponent</author>
<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>
<element>com_testquestions</element>
<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')
->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 &lt;&gt; '' 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>