|
|
|
@@ -48,7 +48,9 @@ HTMLHelper::_('behavior.multiselect');
|
|
|
|
|
<th scope="col" class="w-1"><?php echo HTMLHelper::_('grid.checkall'); ?></th>
|
|
|
|
|
<th scope="col"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_COLUMN_QUESTION'); ?></th>
|
|
|
|
|
<th scope="col" class="w-10"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_COLUMN_TYPE'); ?></th>
|
|
|
|
|
<th scope="col" class="w-10"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_COLUMN_CORRECT'); ?></th>
|
|
|
|
|
<?php if ((int) $this->state->get('filter.show_answers') !== 1) : ?>
|
|
|
|
|
<th scope="col" class="w-10"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_COLUMN_CORRECT'); ?></th>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<th scope="col" class="w-10"><?php echo \Joomla\CMS\Language\Text::_('JSTATUS'); ?></th>
|
|
|
|
|
<th scope="col" class="w-10"><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_COLUMN_ID'); ?></th>
|
|
|
|
|
</tr>
|
|
|
|
@@ -67,16 +69,18 @@ HTMLHelper::_('behavior.multiselect');
|
|
|
|
|
<?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>
|
|
|
|
|
<div class="d-flex gap-2 align-items-start"><strong class="flex-shrink-0">A:</strong><span><?php echo $item->answer_a; ?></span><?php if ((int) $item->correct_answer === 1) : ?><span class="text-success flex-shrink-0">✓</span><?php endif; ?></div>
|
|
|
|
|
<div class="d-flex gap-2 align-items-start"><strong class="flex-shrink-0">B:</strong><span><?php echo $item->answer_b; ?></span><?php if ((int) $item->correct_answer === 2) : ?><span class="text-success flex-shrink-0">✓</span><?php endif; ?></div>
|
|
|
|
|
<div class="d-flex gap-2 align-items-start"><strong class="flex-shrink-0">C:</strong><span><?php echo $item->answer_c; ?></span><?php if ((int) $item->correct_answer === 3) : ?><span class="text-success flex-shrink-0">✓</span><?php endif; ?></div>
|
|
|
|
|
<div class="d-flex gap-2 align-items-start"><strong class="flex-shrink-0">D:</strong><span><?php echo $item->answer_d; ?></span><?php if ((int) $item->correct_answer === 4) : ?><span class="text-success flex-shrink-0">✓</span><?php endif; ?></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>
|
|
|
|
|
<?php if ((int) $this->state->get('filter.show_answers') !== 1) : ?>
|
|
|
|
|
<td><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_' . chr(64 + (int) $item->correct_answer)); ?></td>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<td><?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'questions.', true, 'cb'); ?></td>
|
|
|
|
|
<td><?php echo (int) $item->id; ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|