diff --git a/README.md b/README.md index f8b1bfa..871292c 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.23). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.43.24). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.43.24.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.43.24.sql new file mode 100644 index 0000000..ac31c78 --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.43.24.sql @@ -0,0 +1 @@ +-- Wydanie 1.43.24: ukryto ocenę AI i korektę punktów dla pustych odpowiedzi. diff --git a/administrator/components/com_testquestions/src/Model/ResultModel.php b/administrator/components/com_testquestions/src/Model/ResultModel.php index e9b8e22..777c2df 100644 --- a/administrator/components/com_testquestions/src/Model/ResultModel.php +++ b/administrator/components/com_testquestions/src/Model/ResultModel.php @@ -202,7 +202,7 @@ class ResultModel extends BaseDatabaseModel $questionIds = []; foreach ($item->answers as $questionId => $answer) { $question = $item->questions[(int) $questionId] ?? null; - if ($question && $question->question_type === 'open' && empty($answer['correct'])) { + if ($question && $question->question_type === 'open' && empty($answer['correct']) && trim((string) ($answer['selected'] ?? '')) !== '') { $questionIds[] = (int) $questionId; } } diff --git a/administrator/components/com_testquestions/tmpl/result/default.php b/administrator/components/com_testquestions/tmpl/result/default.php index b6a98f9..2d9a109 100644 --- a/administrator/components/com_testquestions/tmpl/result/default.php +++ b/administrator/components/com_testquestions/tmpl/result/default.php @@ -41,7 +41,7 @@ $resolveImageUrl = static function ($path) { item->answers as $questionId => $answer) : ?> item->questions[(int) $questionId] ?? null; ?> - question_type === 'open' && empty($answer['correct'])) { $pendingAiCount++; } ?> + question_type === 'open' && empty($answer['correct']) && trim((string) ($answer['selected'] ?? '')) !== '') { $pendingAiCount++; } ?> 0) : ?>