From f25944220afa75df4198273c605d4c88dce22697 Mon Sep 17 00:00:00 2001 From: Gordon Bateson Date: Sat, 21 Feb 2015 06:36:14 +0900 Subject: [PATCH] MDL-79863 qtype_ordering: qtype/ordering fix restoring or options in ordering questions --- .../backup/moodle2/restore_qtype_ordering_plugin.class.php | 5 +++-- question/type/ordering/version.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/question/type/ordering/backup/moodle2/restore_qtype_ordering_plugin.class.php b/question/type/ordering/backup/moodle2/restore_qtype_ordering_plugin.class.php index e37af16689a..99068ceb8e4 100644 --- a/question/type/ordering/backup/moodle2/restore_qtype_ordering_plugin.class.php +++ b/question/type/ordering/backup/moodle2/restore_qtype_ordering_plugin.class.php @@ -60,8 +60,9 @@ class restore_qtype_ordering_plugin extends restore_qtype_plugin { $oldid = $data->id; // Detect if the question is created or mapped - $oldquestionid = $this->get_old_parentid('questionid'); - $newquestionid = $this->get_new_parentid('questionid'); + // "question" is the XML tag name, not the DB field name + $oldquestionid = $this->get_old_parentid('question'); + $newquestionid = $this->get_new_parentid('question'); // If the question has been created by restore, // we need to create a "qtype_ordering_options" record diff --git a/question/type/ordering/version.php b/question/type/ordering/version.php index ff983163a2d..d8a972e8147 100644 --- a/question/type/ordering/version.php +++ b/question/type/ordering/version.php @@ -30,6 +30,6 @@ defined('MOODLE_INTERNAL') || die(); $plugin->cron = 0; $plugin->component = 'qtype_ordering'; $plugin->maturity = MATURITY_STABLE; // ALPHA=50, BETA=100, RC=150, STABLE=200 -$plugin->release = '2015-02-21 (21)'; -$plugin->version = 2015022121; +$plugin->release = '2015-02-21 (22)'; +$plugin->version = 2015022122; $plugin->requires = 2010112400; // Moodle 2.0