MDL-9577:
Fixing change of name (answer => correctanswer) for true/false questions.
This commit is contained in:
@@ -203,6 +203,7 @@ class qformat_examview extends qformat_default {
|
||||
$choices = array('T' => 1, 'Y' => 1, 'F' => 0, 'N' => 0 );
|
||||
$answer = trim($qrec['answer'][0]['#']);
|
||||
$question->answer = $choices[$answer];
|
||||
$question->correctanswer = $question->answer;
|
||||
if ($question->answer == 1) {
|
||||
$question->feedbacktrue = 'Correct';
|
||||
$question->feedbackfalse = 'Incorrect';
|
||||
|
||||
Reference in New Issue
Block a user