Show all exam questions
This commit is contained in:
@@ -22,6 +22,6 @@ Szkielet komponentu Joomla 6 do gromadzenia pytań testowych.
|
|||||||
|
|
||||||
## Instalacja
|
## Instalacja
|
||||||
|
|
||||||
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.7.0).
|
W Joomla wybierz **System → Install → Install from Folder** i wskaż ten katalog. Manifestem instalacyjnym jest `com_testquestions.xml` (wersja 1.7.1).
|
||||||
|
|
||||||
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
|
Po instalacji komponent jest dostępny w panelu administratora jako **Pytania testowe**.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
-- No database changes required for version 1.7.1.
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<creationDate>2026-10-14</creationDate>
|
<creationDate>2026-10-14</creationDate>
|
||||||
<author>Komponent</author>
|
<author>Komponent</author>
|
||||||
<license>GNU General Public License version 2 or later</license>
|
<license>GNU General Public License version 2 or later</license>
|
||||||
<version>1.7.0</version>
|
<version>1.7.1</version>
|
||||||
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
|
<description>COM_TESTQUESTIONS_DESCRIPTION</description>
|
||||||
<element>com_testquestions</element>
|
<element>com_testquestions</element>
|
||||||
<namespace path="src">Komponent\Component\Testquestions</namespace>
|
<namespace path="src">Komponent\Component\Testquestions</namespace>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class QuestionsModel extends ListModel
|
|||||||
$menuSymbol = $menu ? (string) $menu->getParams()->get('test_symbol', '') : '';
|
$menuSymbol = $menu ? (string) $menu->getParams()->get('test_symbol', '') : '';
|
||||||
$symbol = Factory::getApplication()->getInput()->getString('test_symbol', $menuSymbol);
|
$symbol = Factory::getApplication()->getInput()->getString('test_symbol', $menuSymbol);
|
||||||
$this->setState('filter.test_symbol', trim($symbol));
|
$this->setState('filter.test_symbol', trim($symbol));
|
||||||
|
$this->setState('list.limit', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getListQuery()
|
protected function getListQuery()
|
||||||
|
|||||||
@@ -40,10 +40,6 @@ use Joomla\CMS\HTML\HTMLHelper;
|
|||||||
<?php if ($item->image) : ?>
|
<?php if ($item->image) : ?>
|
||||||
<img src="<?php echo htmlspecialchars($item->image, ENT_QUOTES, 'UTF-8'); ?>" alt="" loading="lazy">
|
<img src="<?php echo htmlspecialchars($item->image, ENT_QUOTES, 'UTF-8'); ?>" alt="" loading="lazy">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p class="small text-muted">
|
|
||||||
<?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_TIME_LIMIT'); ?>: <?php echo (int) $item->time_limit; ?> s |
|
|
||||||
<?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_POINTS'); ?>: <?php echo (int) $item->points; ?>
|
|
||||||
</p>
|
|
||||||
<?php if ($item->question_type === 'open') : ?>
|
<?php if ($item->question_type === 'open') : ?>
|
||||||
<label for="answer-<?php echo (int) $number; ?>"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ENTER_ANSWER'); ?></label>
|
<label for="answer-<?php echo (int) $number; ?>"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ENTER_ANSWER'); ?></label>
|
||||||
<input type="text" id="answer-<?php echo (int) $number; ?>" name="answers[<?php echo (int) $item->id; ?>]" class="form-control" value="<?php echo $this->results ? htmlspecialchars($this->results['items'][$item->id]['selected'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
<input type="text" id="answer-<?php echo (int) $number; ?>" name="answers[<?php echo (int) $item->id; ?>]" class="form-control" value="<?php echo $this->results ? htmlspecialchars($this->results['items'][$item->id]['selected'], ENT_QUOTES, 'UTF-8') : ''; ?>">
|
||||||
|
|||||||
Reference in New Issue
Block a user