MDL-29270 Fixed question bank backup converter (field rename)

This commit is contained in:
Jean-Michel Vedrine 2011-09-25 23:30:40 +02:00 committed by David Mudrak
parent e63ae067f4
commit 9107daa0f5

View File

@ -1222,11 +1222,14 @@ class moodle1_question_bank_handler extends moodle1_xml_handler {
}
unset($data['image']);
// replay the upgrade step 2011060301 - Rename field defaultgrade on table question to defaultmark
$data['defaultmark'] = $data['defaultgrade'];
// write the common question data
$this->xmlwriter->begin_tag('question', array('id' => $data['id']));
foreach (array(
'parent', 'name', 'questiontext', 'questiontextformat',
'generalfeedback', 'generalfeedbackformat', 'defaultgrade',
'generalfeedback', 'generalfeedbackformat', 'defaultmark',
'penalty', 'qtype', 'length', 'stamp', 'version', 'hidden',
'timecreated', 'timemodified', 'createdby', 'modifiedby'
) as $fieldname) {