mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Added 'right answer' feedback to true/false questions.
This commit is contained in:
parent
88c898f590
commit
cbc83a240e
@ -447,15 +447,20 @@ function writequestion( $question ) {
|
||||
case TRUEFALSE:
|
||||
if ($question->trueanswer->fraction==1) {
|
||||
$answertext = 'TRUE';
|
||||
$feedback = $question->falseanswer->feedback;
|
||||
$wrong_feedback = $question->falseanswer->feedback;
|
||||
$right_feedback = $question->trueanswer->feedback;
|
||||
}
|
||||
else {
|
||||
$answertext = 'FALSE';
|
||||
$feedback = $question->trueanswer->feedback;
|
||||
$wrong_feedback = $question->trueanswer->feedback;
|
||||
$right_feedback = $question->falseanswer->feedback;
|
||||
}
|
||||
$expout .= "::".$question->name."::".$question->questiontext."{".$answertext;
|
||||
if ($feedback!="") {
|
||||
$expout .= "#".$feedback;
|
||||
if ($wrong_feedback!="") {
|
||||
$expout .= "#".$wrong_feedback;
|
||||
}
|
||||
if ($right_feedback!="") {
|
||||
$expout .= "#".$right_feedback;
|
||||
}
|
||||
$expout .= "}\n";
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user