From 70f9a0ac4b65b831e0d70af240065dbdda7022da Mon Sep 17 00:00:00 2001 From: Wojtek Date: Thu, 15 Oct 2026 17:14:58 +0200 Subject: [PATCH] Separate selected and available set questions --- README.md | 2 +- .../language/en-GB/com_testquestions.ini | 2 + .../sql/updates/mysql/1.11.0.sql | 1 + .../com_testquestions/tmpl/set/edit.php | 57 ++++++++++++++----- com_testquestions.xml | 2 +- 5 files changed, 48 insertions(+), 16 deletions(-) create mode 100644 administrator/components/com_testquestions/sql/updates/mysql/1.11.0.sql diff --git a/README.md b/README.md index 7433d16..fb83bc6 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,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.10.6). +W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.11.0). 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 f09a693..ff10acd 100644 --- a/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini +++ b/administrator/components/com_testquestions/language/en-GB/com_testquestions.ini @@ -64,3 +64,5 @@ COM_TESTQUESTIONS_NEW_SUBJECT="Nowy przedmiot" COM_TESTQUESTIONS_EDIT_SUBJECT="Edytuj przedmiot" COM_TESTQUESTIONS_SELECT_SUBJECT="-- wybierz przedmiot --" COM_TESTQUESTIONS_FILTER_SUBJECT="Wszystkie przedmioty" +COM_TESTQUESTIONS_SET_SELECTED_QUESTIONS="Wybrane pytania" +COM_TESTQUESTIONS_SET_AVAILABLE_QUESTIONS="Pytania do wyboru" diff --git a/administrator/components/com_testquestions/sql/updates/mysql/1.11.0.sql b/administrator/components/com_testquestions/sql/updates/mysql/1.11.0.sql new file mode 100644 index 0000000..cc7011e --- /dev/null +++ b/administrator/components/com_testquestions/sql/updates/mysql/1.11.0.sql @@ -0,0 +1 @@ +-- No database changes required for version 1.11.0. diff --git a/administrator/components/com_testquestions/tmpl/set/edit.php b/administrator/components/com_testquestions/tmpl/set/edit.php index 9bc693b..a391e02 100644 --- a/administrator/components/com_testquestions/tmpl/set/edit.php +++ b/administrator/components/com_testquestions/tmpl/set/edit.php @@ -13,21 +13,50 @@ HTMLHelper::_('behavior.formvalidator'); form->renderField('subject_id'); ?> form->renderField('description'); ?> form->renderField('published'); ?> -
- - -
- -
+ +
questions as $question) : ?> -
- id, (array) $this->item->question_ids, true) ? 'checked' : ''; ?>> + id, array_map('intval', (array) $this->item->question_ids), true)) continue; ?> +
+ + +
+ +
+ question_type === 'open') : ?> +
: escape($question->answer_open); ?>
+ +
A: answer_a; ?>correct_answer === 1 ? ' ✓' : ''; ?>
+
B: answer_b; ?>correct_answer === 2 ? ' ✓' : ''; ?>
+
C: answer_c; ?>correct_answer === 3 ? ' ✓' : ''; ?>
+
D: answer_d; ?>correct_answer === 4 ? ' ✓' : ''; ?>
+ +
+
+
+ +
+
+
+ +
+ + +
+
+ questions as $question) : ?> + id, array_map('intval', (array) $this->item->question_ids), true)) continue; ?> +
+