diff --git a/README.md b/README.md index a189907..adcbda3 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.39). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.43.40). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.43.40.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.43.40.sql new file mode 100644 index 0000000..2ff6837 --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.43.40.sql @@ -0,0 +1 @@ +-- Brak zmian w schemacie bazy danych w wersji 1.43.40. diff --git a/administrator/components/com_testquestions/tmpl/result/default.php b/administrator/components/com_testquestions/tmpl/result/default.php index c3d9e6c..f3aa8ef 100644 --- a/administrator/components/com_testquestions/tmpl/result/default.php +++ b/administrator/components/com_testquestions/tmpl/result/default.php @@ -51,9 +51,11 @@ $resolveImageUrl = static function ($path) { const visibleAiFeedback = document.querySelector('.ai-feedback-screen[data-question-id="' + questionId + '"] .ai-feedback-text')?.textContent.trim() || ''; const aiComment = storedAiFeedback || visibleAiFeedback; const output = commentBlock.querySelector('.result-pdf-comment-text'); + const selectedComment = manualComment || aiComment; - if (output) { - output.textContent = manualComment || aiComment || '—'; + // Keep the server-rendered AI fallback when no input/source is found in the DOM. + if (output && selectedComment) { + output.textContent = selectedComment; } }); }); @@ -179,7 +181,7 @@ $resolveImageUrl = static function ($path) { question_type === 'open' && $hasResponse) : ?> -
+
diff --git a/com_testquestions.xml b/com_testquestions.xml index ca3e565..e260ad5 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.39 + 1.43.40 COM_TESTQUESTIONS_DESCRIPTION com_testquestions Komponent\Component\Testquestions