blob: 5b767641cc9a0b9f8e367e7684ce76a7f0bd5032 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
/**
* @var ClozeTask $exercise
* @var array $optional_choice
*/
?>
<table class="description inline-content">
<? foreach ($exercise->task['answers'] as $key => $entry): ?>
<tr>
<td>
<?= formatReady($entry['text']) ?>
</td>
<td style="white-space: nowrap;">
<? foreach ($exercise->task['choices'] + $optional_choice as $val => $label): ?>
<label class="undecorated" style="padding: 1ex;">
<input type="radio" name="answer[<?= $key ?>]" value="<?= $val ?>"
<? if (!isset($response[$key]) && $val == -1 || isset($response[$key]) && $response[$key] === "$val"): ?>checked<? endif ?>>
<?= htmlReady($label) ?>
</label>
<? endforeach ?>
</td>
</tr>
<? endforeach ?>
</table>
<?= $this->render_partial('exercises/evaluation_mode_info') ?>
|