qtype multichoice: MDL-17029 answernumbering option was not being backed up or restored.

This commit is contained in:
tjhunt
2008-10-27 04:23:23 +00:00
parent 3e0794ed04
commit 4b31ac5cd1
@@ -438,6 +438,9 @@ class question_multichoice_qtype extends default_questiontype {
fwrite ($bf,full_tag("CORRECTFEEDBACK",$level+1,false,$multichoice->correctfeedback));
fwrite ($bf,full_tag("PARTIALLYCORRECTFEEDBACK",$level+1,false,$multichoice->partiallycorrectfeedback));
fwrite ($bf,full_tag("INCORRECTFEEDBACK",$level+1,false,$multichoice->incorrectfeedback));
fwrite ($bf,full_tag("INCORRECTFEEDBACK",$level+1,false,$multichoice->incorrectfeedback));
fwrite ($bf,full_tag("INCORRECTFEEDBACK",$level+1,false,$multichoice->incorrectfeedback));
fwrite ($bf,full_tag("ANSWERNUMBERING",$level+1,false,$multichoice->answernumbering));
$status = fwrite ($bf,end_tag("MULTICHOICE",$level,true));
}
@@ -488,6 +491,11 @@ class question_multichoice_qtype extends default_questiontype {
} else {
$multichoice->incorrectfeedback = '';
}
if (array_key_exists("ANSWERNUMBERING", $mul_info['#'])) {
$multichoice->answernumbering = backup_todb($mul_info['#']['ANSWERNUMBERING']['0']['#']);
} else {
$multichoice->answernumbering = 'abc';
}
//We have to recode the answers field (a list of answers id)
//Extracts answer id from sequence