diff --git a/README.md b/README.md index 46fda20..8ebf593 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.32). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.43.33). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. 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 51f79fb..dedc7b3 100644 --- a/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini +++ b/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini @@ -130,6 +130,7 @@ COM_TESTQUESTIONS_RESULTS_AI_TOKENS_TOTAL="Łączne wykorzystanie tokenów w wyn COM_TESTQUESTIONS_RESULT_SCORE="Wynik" COM_TESTQUESTIONS_RESULT_POINTS_BEFORE_AFTER="Punkty przed / po korekcie" COM_TESTQUESTIONS_RESULT_GRADE="Ocena" +COM_TESTQUESTIONS_RESULT_NOT_ASSESSED="Nie sprawdzono" COM_TESTQUESTIONS_RESULT_DATE="Data zakończenia" COM_TESTQUESTIONS_RESULT_ANSWERS="Odpowiedzi" COM_TESTQUESTIONS_RESULT_EXECUTION_TIME="Czas wykonania" diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.43.33.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.43.33.sql new file mode 100644 index 0000000..3395d2b --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.43.33.sql @@ -0,0 +1 @@ +-- Brak zmian w schemacie bazy danych w wersji 1.43.33. diff --git a/administrator/components/com_testquestions/src/Model/ResultsModel.php b/administrator/components/com_testquestions/src/Model/ResultsModel.php index b3ac1f2..447083f 100644 --- a/administrator/components/com_testquestions/src/Model/ResultsModel.php +++ b/administrator/components/com_testquestions/src/Model/ResultsModel.php @@ -14,6 +14,7 @@ class ResultsModel extends ListModel $items = parent::getItems(); foreach ($items as $item) { + $item->has_assessment = false; $item->ai_input_tokens = 0; $item->ai_output_tokens = 0; $item->ai_total_tokens = 0; @@ -30,6 +31,11 @@ class ResultsModel extends ListModel continue; } + // Manual assessment and AI both save awarded_points in the answer JSON. + if (array_key_exists('awarded_points', $answer)) { + $item->has_assessment = true; + } + $usages = $answer['ai_usage_history'] ?? (isset($answer['ai_usage']) ? [$answer['ai_usage']] : []); if (!is_array($usages)) { continue; diff --git a/administrator/components/com_testquestions/tmpl/results/default.php b/administrator/components/com_testquestions/tmpl/results/default.php index 2b2211b..1f8e278 100644 --- a/administrator/components/com_testquestions/tmpl/results/default.php +++ b/administrator/components/com_testquestions/tmpl/results/default.php @@ -84,12 +84,14 @@ HTMLHelper::_('behavior.multiselect'); points_total ?: (int) $item->total_count; ?> points_before / $pointsTotal) * 100, 2) : 0; ?> points_after / $pointsTotal) * 100, 2) : 0; ?> - - - = $gradeScale[1]) { $grade = $gradeScale[0]; break; } ?> - -