$a->feedbackimg = '';
// Print the control
- $a->control = "<input $readonly id=\"$a->id\" $name $checked $type value=\"$aid\"" .
- " alt=\"" . s($answer->answer) . '" />';
+ $a->control = "<input $readonly id=\"$a->id\" $name $checked $type value=\"$aid\" />";
if ($options->correct_responses && $answer->fraction > 0) {
$a->class = question_get_feedback_class(1);
}
// Print the answer text
- $a->text = format_text($this->number_in_style($key, $question->options->answernumbering) . $answer->answer,
- FORMAT_MOODLE, $formatoptions, $cmoptions->course);
+ $a->text = $this->number_in_style($key, $question->options->answernumbering) .
+ format_text($answer->answer, FORMAT_MOODLE, $formatoptions, $cmoptions->course);
// Print feedback if feedback is on
if (($options->feedback || $options->correct_responses) && $checked) {
function get_numbering_styles() {
return array('abc', 'ABC', '123', 'none');
}
+
+ function number_html($qnum) {
+ return '<span class="anun">' . $qnum . '<span class="anumsep">.</span></span> ';
+ }
/**
* @param int $num The number, starting at 0.
function number_in_style($num, $style) {
switch($style) {
case 'abc':
- return chr(ord('a') + $num) . '. ';
+ return $this->number_html(chr(ord('a') + $num));
case 'ABC':
- return chr(ord('A') + $num) . '. ';
+ return $this->number_html(chr(ord('A') + $num));
case '123':
- return ($num + 1) . '. ';
+ return $this->number_html(($num + 1));
case 'none':
return '';
default: