diff --git a/README.md b/README.md index ef9ff54..7a0cea3 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,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.28.2). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.29.0). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql b/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql index 93122fc..2e29b11 100644 --- a/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql +++ b/administrator/components/com_testquestions/sql/install.mysql.utf8mb4.sql @@ -84,6 +84,7 @@ CREATE TABLE IF NOT EXISTS `#__testquestions_results` ( `correct_count` smallint unsigned NOT NULL DEFAULT 0, `total_count` smallint unsigned NOT NULL DEFAULT 0, `percentage` decimal(5,2) NOT NULL DEFAULT 0.00, + `points_total` int unsigned NOT NULL DEFAULT 0, `points_before` int unsigned NOT NULL DEFAULT 0, `points_after` int unsigned NOT NULL DEFAULT 0, `answers` longtext NULL, diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.29.0.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.29.0.sql new file mode 100644 index 0000000..eb56dbc --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.29.0.sql @@ -0,0 +1,6 @@ +ALTER TABLE `#__testquestions_results` + ADD COLUMN `points_total` int unsigned NOT NULL DEFAULT 0 AFTER `percentage`; + +UPDATE `#__testquestions_results` +SET `points_total` = `total_count` +WHERE `points_total` = 0; diff --git a/administrator/components/com_testquestions/tmpl/results/default.php b/administrator/components/com_testquestions/tmpl/results/default.php index dc3f52f..c9fc5c4 100644 --- a/administrator/components/com_testquestions/tmpl/results/default.php +++ b/administrator/components/com_testquestions/tmpl/results/default.php @@ -25,7 +25,10 @@ use Joomla\CMS\Router\Route;