mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-8563
$question->answer was swapped for $question->correctanswer in questiontype for some reason! Compensated for in format type.
This commit is contained in:
parent
474991a19d
commit
7939a4a0cb
@ -363,8 +363,8 @@ class qformat_gift extends qformat_default {
|
||||
$question->feedbacktrue = $feedback['wrong'];
|
||||
}
|
||||
|
||||
//$question->defaultgrade = 1;
|
||||
//$question->image = ""; // No images with this format
|
||||
$question->correctanswer = $question->answer;
|
||||
|
||||
return $question;
|
||||
break;
|
||||
|
||||
|
@ -232,9 +232,11 @@ class qformat_xml extends qformat_default {
|
||||
}
|
||||
if ($answertext == 'true') {
|
||||
$qo->answer = ($answer['@']['fraction'] == 100);
|
||||
$qo->correctanswer = $qo->answer;
|
||||
$qo->feedbacktrue = $feedback;
|
||||
} else {
|
||||
$qo->answer = ($answer['@']['fraction'] != 100);
|
||||
$qo->correctanswer = $qo->answer;
|
||||
$qo->feedbackfalse = $feedback;
|
||||
}
|
||||
$first = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user