Permalink
Browse files

MDL-37845 multichoice qtype: Fix some display issues.

1. Better handling of multi-line choices in the correct answer display.
2. Remove dangerous CSS that is no longer needed.
  • Loading branch information...
1 parent 5e00b9a commit 50590afe38e084b7f54c925112c218fe7ac7eb88 @timhunt timhunt committed Apr 25, 2013
Showing with 5 additions and 14 deletions.
  1. +4 −4 question/type/multichoice/renderer.php
  2. +1 −10 question/type/multichoice/styles.css
@@ -227,8 +227,8 @@ public function correct_response(question_attempt $qa) {
if (question_state::graded_state_for_fraction($ans->fraction) ==
question_state::$gradedright) {
return get_string('correctansweris', 'qtype_multichoice',
- $question->format_text($ans->answer, $ans->answerformat,
- $qa, 'question', 'answer', $ansid));
+ $question->make_html_inline($question->format_text($ans->answer, $ans->answerformat,
+ $qa, 'question', 'answer', $ansid)));
}
}
@@ -278,8 +278,8 @@ public function correct_response(question_attempt $qa) {
$right = array();
foreach ($question->answers as $ansid => $ans) {
if ($ans->fraction > 0) {
- $right[] = $question->format_text($ans->answer, $ans->answerformat,
- $qa, 'question', 'answer', $ansid);
+ $right[] = $question->make_html_inline($question->format_text($ans->answer, $ans->answerformat,
+ $qa, 'question', 'answer', $ansid));
}
}
@@ -1,18 +1,9 @@
.que.multichoice .answer .specificfeedback {
- padding: 0 0.7em;
- background: #FFF3BF;
-}
-.que.multichoice .answer .specificfeedback * {
display: inline;
+ padding: 0 0.7em;
background: #FFF3BF;
}
-.que.multichoice .answer .specificfeedback script {
- display: none;
-}
.que.multichoice .answer div.r0,
.que.multichoice .answer div.r1 {
padding: 0.3em;
}
-.que.multichoice .feedback .rightanswer * {
- display: inline;
-}

0 comments on commit 50590af

Please sign in to comment.