Answer letter styling

Answer letter styling

by Charles Johnson -
Number of replies: 1
I wonder if it might be possible to get a small change committed, permitting CSS styling of the multiple choice answer letters? This could be as simple as changing


$a->text = format_text("$qnumchar. $answer->answer", FORMAT_MOODLE, $formatoptions, $cmoptions->course);

to

$a->text = format_text("<span class=\"a_num\">$qnumchar</span><span class=\"a_num_sep\">.</span> $answer->answer", FORMAT_MOODLE, $formatoptions, $cmoptions->course);

in line 325 of /question/type/multichoice/questiontype.php

What would be the best way to get this done?
Average of ratings: -
In reply to Charles Johnson

Re: Answer letter styling

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ideally you produce a patch, then file an issue in tracker.moodle.org and attach the patch.

However, posting here where I (quiz maintainer) can see it often works. In the end I went for
 $a->text = '<span class="anun">' . $qnumchar .
 '<span class="anumsep">.</span></span> ' .
 format_text("$qnumchar. $answer->answer", FORMAT_MOODLE, $formatoptions, $cmoptions->course);
Oh, and I have to be convinced it is a good idea. I put this into Moodle 1.8 and HEAD. See MDL-10515.