From bb96cb3116d097ec22c88af248e2ac132afae980 Mon Sep 17 00:00:00 2001 From: Wojtek Date: Thu, 15 Oct 2026 17:21:30 +0200 Subject: [PATCH] Add test duration content and image to sets --- README.md | 3 ++- administrator/components/com_testquestions/forms/set.xml | 3 +++ .../com_testquestions/language/en-GB/com_testquestions.ini | 4 ++++ .../com_testquestions/sql/install.mysql.utf8mb4.sql | 3 +++ .../components/com_testquestions/sql/updates/mysql/1.12.0.sql | 4 ++++ .../components/com_testquestions/sql/updates/mysql/1.9.0.sql | 3 +++ com_testquestions.xml | 2 +- 7 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 administrator/components/com_testquestions/sql/updates/mysql/1.12.0.sql diff --git a/README.md b/README.md index fb83bc6..5b5a0f0 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,11 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych. - opcjonalne zdjęcie wybierane z Media Managera, - publikowanie, filtrowanie i usuwanie pytań w panelu administratora, - tworzenie zestawów pytań w panelu administratora i przypisywanie do nich pytań, +- czas trwania, treść i obraz zestawu testowego, - tabela `#__testquestions_questions` tworzona podczas instalacji. ## Instalacja -W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.11.0). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.12.0). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/forms/set.xml b/administrator/components/com_testquestions/forms/set.xml index 2297e59..88e6816 100644 --- a/administrator/components/com_testquestions/forms/set.xml +++ b/administrator/components/com_testquestions/forms/set.xml @@ -6,6 +6,9 @@ + + + diff --git a/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini b/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini index ff10acd..697a8cb 100644 --- a/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini +++ b/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini @@ -58,6 +58,10 @@ COM_TESTQUESTIONS_SET_ALL_CATEGORIES="Wszystkie kategorie" COM_TESTQUESTIONS_UNCATEGORIZED="Bez kategorii" COM_TESTQUESTIONS_SET_SHOW_DETAILS="Pokaż odpowiedzi" COM_TESTQUESTIONS_SUBJECTS="Przedmioty" +COM_TESTQUESTIONS_SET_DURATION="Czas trwania testu (minuty)" +COM_TESTQUESTIONS_SET_DURATION_DESC="Podaj czas trwania testu w minutach." +COM_TESTQUESTIONS_SET_TEST_CONTENT="Treść testu" +COM_TESTQUESTIONS_SET_IMAGE="Obraz testu" COM_TESTQUESTIONS_SUBJECT="Przedmiot" COM_TESTQUESTIONS_SUBJECT_TITLE="Nazwa przedmiotu" COM_TESTQUESTIONS_NEW_SUBJECT="Nowy przedmiot" diff --git a/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql b/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql index 5728d6e..a58240f 100644 --- a/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql +++ b/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql @@ -42,6 +42,9 @@ CREATE TABLE IF NOT EXISTS `#__testquestions_sets` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `subject_id` int unsigned NOT NULL DEFAULT 0, `title` varchar(255) NOT NULL, + `duration` smallint unsigned NOT NULL DEFAULT 0, + `test_content` text NULL, + `image` varchar(1024) NOT NULL DEFAULT '', `description` text NULL, `published` tinyint NOT NULL DEFAULT 1, `ordering` int NOT NULL DEFAULT 0, diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.12.0.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.12.0.sql new file mode 100644 index 0000000..2a5d21e --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.12.0.sql @@ -0,0 +1,4 @@ +ALTER TABLE `#__testquestions_sets` + ADD COLUMN `duration` smallint unsigned NOT NULL DEFAULT 0 AFTER `title`, + ADD COLUMN `test_content` text NULL AFTER `duration`, + ADD COLUMN `image` varchar(1024) NOT NULL DEFAULT '' AFTER `test_content`; diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.9.0.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.9.0.sql index a89489c..fcfe236 100644 --- a/administrator/components/com_testquestions/sql/updates/mysql/1.9.0.sql +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.9.0.sql @@ -2,6 +2,9 @@ CREATE TABLE IF NOT EXISTS `#__testquestions_sets` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `subject_id` int unsigned NOT NULL DEFAULT 0, `title` varchar(255) NOT NULL, + `duration` smallint unsigned NOT NULL DEFAULT 0, + `test_content` text NULL, + `image` varchar(1024) NOT NULL DEFAULT '', `description` text NULL, `published` tinyint NOT NULL DEFAULT 1, `ordering` int NOT NULL DEFAULT 0, diff --git a/com_testquestions.xml b/com_testquestions.xml index 6c3e690..dc64fc8 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.11.0 + 1.12.0 COM_TESTQUESTIONS_DESCRIPTION com_testquestions Komponent\Component\Testquestions