Skip to content

Commit

Permalink
MDL-29270 Fixed question bank backup converter (field rename)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Michel Vedrine authored and mudrd8mz committed Sep 25, 2011
1 parent e63ae06 commit 9107daa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backup/converter/moodle1/handlerlib.php
Expand Up @@ -1222,11 +1222,14 @@ public function process_question(array $data, array $raw) {
} }
unset($data['image']); 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 // write the common question data
$this->xmlwriter->begin_tag('question', array('id' => $data['id'])); $this->xmlwriter->begin_tag('question', array('id' => $data['id']));
foreach (array( foreach (array(
'parent', 'name', 'questiontext', 'questiontextformat', 'parent', 'name', 'questiontext', 'questiontextformat',
'generalfeedback', 'generalfeedbackformat', 'defaultgrade', 'generalfeedback', 'generalfeedbackformat', 'defaultmark',
'penalty', 'qtype', 'length', 'stamp', 'version', 'hidden', 'penalty', 'qtype', 'length', 'stamp', 'version', 'hidden',
'timecreated', 'timemodified', 'createdby', 'modifiedby' 'timecreated', 'timemodified', 'createdby', 'modifiedby'
) as $fieldname) { ) as $fieldname) {
Expand Down

0 comments on commit 9107daa

Please sign in to comment.