Remove temporary test data from installer
This commit is contained in:
@@ -12,6 +12,8 @@ COM_TESTQUESTIONS_FIELD_EXAM_YEAR="Rok egzaminu"
|
||||
COM_TESTQUESTIONS_FIELD_QUESTION_NUMBER="Numer pytania"
|
||||
COM_TESTQUESTIONS_MANAGE_CATEGORIES="Kategorie"
|
||||
COM_TESTQUESTIONS_FILTER_CATEGORY="Wszystkie kategorie"
|
||||
COM_TESTQUESTIONS_VIEW_QUESTIONS_ONLY="Same pytania"
|
||||
COM_TESTQUESTIONS_VIEW_WITH_ANSWERS="Pytania i odpowiedzi"
|
||||
COM_TESTQUESTIONS_CATEGORIES="Kategorie pytań"
|
||||
COM_TESTQUESTIONS_CATEGORY_TITLE="Nazwa kategorii"
|
||||
COM_TESTQUESTIONS_TYPE_CLOSED="Zamknięte — wybór odpowiedzi"
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
COM_TESTQUESTIONS="Pytania testowe"
|
||||
COM_TESTQUESTIONS_DESCRIPTION="Gromadzenie pytań testowych z czterema odpowiedziami i opcjonalnym zdjęciem."
|
||||
COM_TESTQUESTIONS_MENU_ITEM_TITLE="Arkusz egzaminacyjny"
|
||||
COM_TESTQUESTIONS_MENU_ITEM_DESCRIPTION="Wyświetla pytania z wybranego arkusza egzaminacyjnego."
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
-- Administrator list view switch for showing answers.
|
||||
@@ -0,0 +1 @@
|
||||
-- Frontend view for displaying questions from a selected exam sheet.
|
||||
@@ -0,0 +1 @@
|
||||
-- Add frontend menu item metadata for exam sheet view.
|
||||
@@ -0,0 +1 @@
|
||||
-- Ensure frontend menu item language metadata is available.
|
||||
@@ -0,0 +1 @@
|
||||
-- Use a selectable list of available exam sheet symbols on the frontend.
|
||||
@@ -0,0 +1 @@
|
||||
-- Remove temporary exam seed data from the installer. No data is imported by this release.
|
||||
@@ -21,6 +21,9 @@ class QuestionsModel extends ListModel
|
||||
$this->setState('filter.category_id', $this->getUserStateFromRequest(
|
||||
$this->context . '.filter.category_id', 'filter_category_id', '', 'int'
|
||||
));
|
||||
$this->setState('filter.show_answers', $this->getUserStateFromRequest(
|
||||
$this->context . '.filter.show_answers', 'filter_show_answers', '0', 'int'
|
||||
));
|
||||
}
|
||||
|
||||
protected function getListQuery()
|
||||
|
||||
@@ -29,6 +29,12 @@ HTMLHelper::_('behavior.multiselect');
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<select name="filter_show_answers" class="form-select" onchange="this.form.submit();">
|
||||
<option value="0" <?php echo (int) $this->state->get('filter.show_answers') === 0 ? 'selected' : ''; ?>><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_VIEW_QUESTIONS_ONLY'); ?></option>
|
||||
<option value="1" <?php echo (int) $this->state->get('filter.show_answers') === 1 ? 'selected' : ''; ?>><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_VIEW_WITH_ANSWERS'); ?></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-primary"><?php echo \Joomla\CMS\Language\Text::_('JSEARCH_FILTER_SUBMIT'); ?></button>
|
||||
<a href="<?php echo Route::_('index.php?option=com_testquestions&view=questions'); ?>" class="btn btn-secondary"><?php echo \Joomla\CMS\Language\Text::_('JSEARCH_FILTER_CLEAR'); ?></a>
|
||||
@@ -56,6 +62,18 @@ HTMLHelper::_('behavior.multiselect');
|
||||
<?php echo $this->escape(strip_tags($item->question)); ?>
|
||||
</a>
|
||||
<?php if ($item->image) : ?><span class="icon-image ms-2" title="<?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_HAS_IMAGE'); ?>"></span><?php endif; ?>
|
||||
<?php if ((int) $this->state->get('filter.show_answers') === 1) : ?>
|
||||
<div class="mt-2 ps-3 border-start">
|
||||
<?php if ($item->question_type === 'open') : ?>
|
||||
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_FIELD_OPEN_PATTERN'); ?>:</strong> <?php echo $item->answer_open; ?></div>
|
||||
<?php else : ?>
|
||||
<div><strong>A:</strong> <?php echo $item->answer_a; ?></div>
|
||||
<div><strong>B:</strong> <?php echo $item->answer_b; ?></div>
|
||||
<div><strong>C:</strong> <?php echo $item->answer_c; ?></div>
|
||||
<div><strong>D:</strong> <?php echo $item->answer_d; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
<td><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_TYPE_' . strtoupper($item->question_type)); ?></td>
|
||||
<td><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_' . chr(64 + (int) $item->correct_answer)); ?></td>
|
||||
|
||||
Reference in New Issue
Block a user