qtype multichoice: MDL-17029 answernumbering option was not being backed up or restored.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user