Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
defdfcb32f | ||
|
|
0f1bd3e9fe |
@@ -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.36.0).
|
||||
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.37.1).
|
||||
|
||||
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-- No database changes required for version 1.37.0.
|
||||
@@ -0,0 +1 @@
|
||||
-- No database changes required for version 1.37.1.
|
||||
@@ -17,8 +17,39 @@ class SetController extends FormController
|
||||
$this->setRedirect('index.php?option=com_testquestions&view=set&layout=edit&parent_id=' . $parentId);
|
||||
}
|
||||
|
||||
public function save2close($key = null, $urlVar = null)
|
||||
{
|
||||
$formData = (array) $this->input->post->get('jform', [], 'array');
|
||||
$parentId = (int) ($formData['parent_id'] ?? 0);
|
||||
$result = parent::save2close($key, $urlVar);
|
||||
|
||||
if ($result && $parentId > 0) {
|
||||
$this->setRedirect('index.php?option=com_testquestions&task=set.edit&id=' . $parentId);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function cancel($key = null)
|
||||
{
|
||||
$parentId = $this->input->getInt('parent_id');
|
||||
$formData = (array) $this->input->post->get('jform', [], 'array');
|
||||
$parentId = (int) ($formData['parent_id'] ?? $parentId);
|
||||
|
||||
if ($parentId < 1) {
|
||||
$itemId = $this->input->getInt('id');
|
||||
if ($itemId > 0) {
|
||||
$item = $this->getModel()->getItem($itemId);
|
||||
$parentId = (int) ($item->parent_id ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
if ($parentId > 0) {
|
||||
$this->setRedirect('index.php?option=com_testquestions&task=set.edit&id=' . $parentId);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->setRedirect('index.php?option=com_testquestions&view=sets');
|
||||
|
||||
return true;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<creationDate>2026-10-14</creationDate>
|
||||
<author>Komponent</author>
|
||||
<license>GNU General Public License version 2 or later</license>
|
||||
<version>1.36.0</version>
|
||||
<version>1.37.1</version>
|
||||
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
|
||||
<element>com_testquestions</element>
|
||||
<namespace path="src">Komponent\Component\Testquestions</namespace>
|
||||
|
||||
Reference in New Issue
Block a user