Navigation Menu

Skip to content

Commit

Permalink
MDL-37845 multichoice qtype: Fix some display issues.
Browse files Browse the repository at this point in the history
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 c6be138 commit 9a3d020
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
8 changes: 4 additions & 4 deletions question/type/multichoice/renderer.php
Expand Up @@ -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)));
}
}

Expand Down Expand Up @@ -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));
}
}

Expand Down
11 changes: 1 addition & 10 deletions question/type/multichoice/styles.css
@@ -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 9a3d020

Please sign in to comment.