Commit 50fdadff authored by jun's avatar jun

Merge branch 'MDL-70374' of https://github.com/timhunt/moodle

parents c59c8e79 add7ebab
......@@ -104,12 +104,16 @@ abstract class qtype_multichoice_renderer_base extends qtype_with_combined_feedb
));
}
$questionnumber = html_writer::span($this->number_in_style($value, $question->answernumbering), 'answernumber');
$answertext = $question->format_text($ans->answer, $ans->answerformat, $qa, 'question', 'answer', $ansid);
$questionanswer = html_writer::div($answertext, 'flex-fill ml-1');
$choicenumber = '';
if ($question->answernumbering !== 'none') {
$choicenumber = html_writer::span(
$this->number_in_style($value, $question->answernumbering), 'answernumber');
}
$choicetext = $question->format_text($ans->answer, $ans->answerformat, $qa, 'question', 'answer', $ansid);
$choice = html_writer::div($choicetext, 'flex-fill ml-1');
$radiobuttons[] = $hidden . html_writer::empty_tag('input', $inputattributes) .
html_writer::div($questionnumber . $questionanswer, 'd-flex w-100', [
html_writer::div($choicenumber . $choice, 'd-flex w-100', [
'id' => $inputattributes['id'] . '_label',
'data-region' => 'answer-label',
]);
......
.que.multichoice .answer .specificfeedback {
display: inline;
padding: 0 0.7em;
background: #fff3bf;
}
.que.multichoice .answer div.r0,
.que.multichoice .answer div.r1 {
display: flex;
......@@ -11,21 +5,22 @@
align-items: flex-start;
}
.que.multichoice .answer div.r0 label,
.que.multichoice .answer div.r1 label,
.que.multichoice .answer div.r0 div.specificfeedback,
.que.multichoice .answer div.r1 div.specificfeedback {
/* In Chrome and IE, the text-indent above is applied to any embedded table
cells or <li>s, which screws up the intended layout. This fixes it again. */
text-indent: 0;
}
.que.multichoice .answer div.r0 input,
.que.multichoice .answer div.r1 input {
margin: 0.3rem 0.5rem;
width: 14px;
}
.que.multichoice .answer .answernumber {
min-width: 1.5em;
}
.que.multichoice .answer .specificfeedback {
display: inline;
padding: 0 0.7em;
background: #fff3bf;
}
/* Editing form. */
body#page-question-type-multichoice div[id^=fitem_id_][id*=answer_] {
background: #eee;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment