diff --git a/README.md b/README.md index 5a0431f..24264b4 100644 --- a/README.md +++ b/README.md @@ -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**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.6.3.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.6.3.sql new file mode 100644 index 0000000..fe447de --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.6.3.sql @@ -0,0 +1 @@ +-- Limit exam sheet selection to symbols beginning with E. diff --git a/com_testquestions.xml b/com_testquestions.xml index f70ad78..edc3bbe 100644 --- a/com_testquestions.xml +++ b/com_testquestions.xml @@ -4,7 +4,7 @@ 2026-10-14 Komponent GNU General Public License version 2 or later - 1.6.2 + 1.6.3 COM_TESTQUESTIONS_DESCRIPTION com_testquestions Komponent\Component\Testquestions diff --git a/components/com_testquestions/src/Model/QuestionsModel.php b/components/com_testquestions/src/Model/QuestionsModel.php index dd88009..818d2c0 100644 --- a/components/com_testquestions/src/Model/QuestionsModel.php +++ b/components/com_testquestions/src/Model/QuestionsModel.php @@ -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(); diff --git a/components/com_testquestions/tmpl/questions/default.xml b/components/com_testquestions/tmpl/questions/default.xml index 1404d68..0e2a017 100644 --- a/components/com_testquestions/tmpl/questions/default.xml +++ b/components/com_testquestions/tmpl/questions/default.xml @@ -6,7 +6,7 @@