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...
timhunt committed Apr 25, 2013
1 parent cf5a329 commit 9994233477a406a08318991cc12927138bd05523
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,21 +1,12 @@
.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;
-}
/* Editing form. */
body#page-question-type-multichoice div[id^=fitem_id_][id*=answer_] {

0 comments on commit 9994233

Please sign in to comment.