Skip to content
Browse files

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

  • Loading branch information...
1 parent e63ae06 commit 9107daa0f57e7f0165ef44ca20d44be0930bb539 Jean-Michel Vedrine committed with mudrd8mz Sep 25, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 backup/converter/moodle1/handlerlib.php
View
5 backup/converter/moodle1/handlerlib.php
@@ -1222,11 +1222,14 @@ public function process_question(array $data, array $raw) {
}
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) {

0 comments on commit 9107daa

Please sign in to comment.
Something went wrong with that request. Please try again.