From 8e62165a1aba5461163d55029a011c2d69f8375d Mon Sep 17 00:00:00 2001 From: Wojtek Date: Fri, 16 Oct 2026 21:39:35 +0200 Subject: [PATCH] Color AI feedback by awarded points --- README.md | 2 +- .../com_testquestions/sql/updates/mysql/1.43.25.sql | 1 + .../components/com_testquestions/tmpl/result/default.php | 7 ++++++- com_testquestions.xml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 administrator/components/com_testquestions/sql/updates/mysql/1.43.25.sql diff --git a/README.md b/README.md index 871292c..6c60369 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.43.24). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.43.25). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.43.25.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.43.25.sql new file mode 100644 index 0000000..af22606 --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.43.25.sql @@ -0,0 +1 @@ +-- Wydanie 1.43.25: kolor oceny AI odzwierciedla poziom uznanych punktów. diff --git a/administrator/components/com_testquestions/tmpl/result/default.php b/administrator/components/com_testquestions/tmpl/result/default.php index 2d9a109..fee7a85 100644 --- a/administrator/components/com_testquestions/tmpl/result/default.php +++ b/administrator/components/com_testquestions/tmpl/result/default.php @@ -102,7 +102,12 @@ $resolveImageUrl = static function ($path) { -
:
+ points ?? 0); + $aiAlertClass = $aiPoints <= 0 ? 'alert-danger' : ($aiPoints >= $maxPoints ? 'alert-success' : 'alert-info'); + ?> +
:
question_type === 'open' && $hasResponse) : ?> diff --git a/com_testquestions.xml b/com_testquestions.xml index 69beb48..175d23f 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.43.24 + 1.43.25 COM_TESTQUESTIONS_DESCRIPTION com_testquestions Komponent\Component\Testquestions