diff --git a/README.md b/README.md index 5f37be9..59ae10b 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.20). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.43.21). Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**. diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.43.21.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.43.21.sql new file mode 100644 index 0000000..802f4c1 --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.43.21.sql @@ -0,0 +1 @@ +-- Wydanie 1.43.21: naprawiono wyświetlanie obrazów w szczegółach rozwiązanego testu. diff --git a/administrator/components/com_testquestions/src/Model/ResultModel.php b/administrator/components/com_testquestions/src/Model/ResultModel.php index 2b5b84d..e9b8e22 100644 --- a/administrator/components/com_testquestions/src/Model/ResultModel.php +++ b/administrator/components/com_testquestions/src/Model/ResultModel.php @@ -17,7 +17,7 @@ class ResultModel extends BaseDatabaseModel $db = Factory::getContainer()->get('DatabaseDriver'); $item = $db->setQuery( $db->getQuery(true) - ->select(['r.*', 's.title AS set_title', 'sub.title AS subject_title']) + ->select(['r.*', 's.title AS set_title', 's.image AS set_image', 'sub.title AS subject_title']) ->from($db->quoteName('#__testquestions_results', 'r')) ->leftJoin($db->quoteName('#__testquestions_sets', 's') . ' ON s.id = r.set_id') ->leftJoin($db->quoteName('#__testquestions_subjects', 'sub') . ' ON sub.id = s.subject_id') @@ -35,7 +35,7 @@ class ResultModel extends BaseDatabaseModel if ($ids) { $item->questions = $db->setQuery( $db->getQuery(true) - ->select(['id', 'question_type', 'question', 'answer_a', 'answer_b', 'answer_c', 'answer_d', 'answer_open', 'correct_answer', 'points']) + ->select(['id', 'question_type', 'question', 'answer_a', 'answer_b', 'answer_c', 'answer_d', 'answer_open', 'correct_answer', 'points', 'image']) ->from($db->quoteName('#__testquestions_questions')) ->where('id IN (' . implode(',', $ids) . ')') )->loadObjectList('id'); diff --git a/administrator/components/com_testquestions/tmpl/result/default.php b/administrator/components/com_testquestions/tmpl/result/default.php index b7a061e..b6a98f9 100644 --- a/administrator/components/com_testquestions/tmpl/result/default.php +++ b/administrator/components/com_testquestions/tmpl/result/default.php @@ -1,6 +1,18 @@ + +