mirror of
https://github.com/moodle/moodle.git
synced 2025-02-01 13:28:17 +01:00
Merged fixes for display of correctanswers from stable
This commit is contained in:
parent
106f3dfbe4
commit
20229ca246
@ -168,9 +168,10 @@ class quiz_match_qtype extends quiz_default_questiontype {
|
||||
$menuname = $nameprefix.$subquestion->id;
|
||||
$response = isset($question->response[$menuname])
|
||||
? $question->response[$menuname] : '0';
|
||||
if (isset($correctanswers[$menuname])
|
||||
&& $correctanswers[$menuname]->id
|
||||
== $response) {
|
||||
if ($readonly
|
||||
and $quiz->correctanswers
|
||||
and isset($correctanswers[$menuname])
|
||||
and ($correctanswers[$menuname]->id == $response)) {
|
||||
$class = ' class="highlight" ';
|
||||
} else {
|
||||
$class = '';
|
||||
|
@ -210,8 +210,7 @@ class quiz_multichoice_qtype extends quiz_default_questiontype {
|
||||
echo "<input $readonly $name $checked $type value=\"$answer->id\" />";
|
||||
|
||||
echo "</td>";
|
||||
if ($readonly and $quiz->correctanswers || $quiz->feedback
|
||||
and !empty($correctanswers[$nameprefix.$aid])) {
|
||||
if ($readonly and $quiz->correctanswers and !empty($correctanswers[$nameprefix.$aid])) {
|
||||
echo '<td valign="top" class="highlight">'.format_text("$qnumchar. $answer->answer").'</td>';
|
||||
} else {
|
||||
echo '<td valign="top">'.format_text("$qnumchar. $answer->answer").'</td>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user