|
|
@@ -18,6 +18,7 @@
|
|
|
|
</dl>
|
|
|
|
</dl>
|
|
|
|
<form action="<?php echo Route::_('index.php?option=com_testquestions&view=result&id=' . (int) $this->item->id); ?>" method="post" name="resultForm" id="result-form">
|
|
|
|
<form action="<?php echo Route::_('index.php?option=com_testquestions&view=result&id=' . (int) $this->item->id); ?>" method="post" name="resultForm" id="result-form">
|
|
|
|
<h2><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_RESULT_ANSWERS'); ?></h2>
|
|
|
|
<h2><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_RESULT_ANSWERS'); ?></h2>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary mb-3"><?php echo \Joomla\CMS\Language\Text::_('JSAVE'); ?></button>
|
|
|
|
<?php foreach ($this->item->answers as $questionId => $answer) : ?>
|
|
|
|
<?php foreach ($this->item->answers as $questionId => $answer) : ?>
|
|
|
|
<?php $question = $this->item->questions[(int) $questionId] ?? null; if (!$question) continue; ?>
|
|
|
|
<?php $question = $this->item->questions[(int) $questionId] ?? null; if (!$question) continue; ?>
|
|
|
|
<article class="mb-4 border rounded p-3">
|
|
|
|
<article class="mb-4 border rounded p-3">
|
|
|
@@ -27,7 +28,6 @@
|
|
|
|
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_CORRECT_PATTERN'); ?>:</strong> <?php echo htmlspecialchars($question->answer_open, ENT_QUOTES, 'UTF-8'); ?></div>
|
|
|
|
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_CORRECT_PATTERN'); ?>:</strong> <?php echo htmlspecialchars($question->answer_open, ENT_QUOTES, 'UTF-8'); ?></div>
|
|
|
|
<?php else : ?>
|
|
|
|
<?php else : ?>
|
|
|
|
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_SELECTED_ANSWER'); ?>:</strong> <?php echo $answer['selected'] ? chr(64 + (int) $answer['selected']) : '—'; ?></div>
|
|
|
|
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_SELECTED_ANSWER'); ?>:</strong> <?php echo $answer['selected'] ? chr(64 + (int) $answer['selected']) : '—'; ?></div>
|
|
|
|
<div><strong><?php echo \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_CORRECT_ANSWER'); ?>:</strong> <?php echo chr(64 + (int) $question->correct_answer); ?></div>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="mt-2 <?php echo !empty($answer['correct']) ? 'text-success' : 'text-danger'; ?>"><?php echo !empty($answer['correct']) ? '✓ ' . \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_CORRECT') : '✗ ' . \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_INCORRECT'); ?></div>
|
|
|
|
<div class="mt-2 <?php echo !empty($answer['correct']) ? 'text-success' : 'text-danger'; ?>"><?php echo !empty($answer['correct']) ? '✓ ' . \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_CORRECT') : '✗ ' . \Joomla\CMS\Language\Text::_('COM_TESTQUESTIONS_ANSWER_INCORRECT'); ?></div>
|
|
|
|
<?php if (empty($answer['correct'])) : ?>
|
|
|
|
<?php if (empty($answer['correct'])) : ?>
|
|
|
@@ -44,7 +44,6 @@
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</article>
|
|
|
|
</article>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<button type="submit" class="btn btn-primary"><?php echo \Joomla\CMS\Language\Text::_('JSAVE'); ?></button>
|
|
|
|
|
|
|
|
<input type="hidden" name="task" value="result.save">
|
|
|
|
<input type="hidden" name="task" value="result.save">
|
|
|
|
<input type="hidden" name="id" value="<?php echo (int) $this->item->id; ?>">
|
|
|
|
<input type="hidden" name="id" value="<?php echo (int) $this->item->id; ?>">
|
|
|
|
<?php echo HTMLHelper::_('form.token'); ?>
|
|
|
|
<?php echo HTMLHelper::_('form.token'); ?>
|
|
|
|