From 6bb88b0306af8691ae7e4f6545b9e9ebd0520acf Mon Sep 17 00:00:00 2001 From: Jean-Michel Vedrine Date: Sat, 27 Apr 2019 16:08:43 +0200 Subject: change ref field name in variable table --- backup/moodle1/lib.php | 2 +- backup/moodle2/backup_qtype_algebra_plugin.class.php | 2 +- backup/moodle2/restore_qtype_algebra_plugin.class.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'backup') diff --git a/backup/moodle1/lib.php b/backup/moodle1/lib.php index 9ffe528..31a544d 100644 --- a/backup/moodle1/lib.php +++ b/backup/moodle1/lib.php @@ -23,7 +23,7 @@ defined('MOODLE_INTERNAL') || die(); /** - * Multichoice question type conversion handler + * Algebra question type conversion handler. */ class moodle1_qtype_algebra_handler extends moodle1_qtype_handler { diff --git a/backup/moodle2/backup_qtype_algebra_plugin.class.php b/backup/moodle2/backup_qtype_algebra_plugin.class.php index 4f7708f..099a41c 100644 --- a/backup/moodle2/backup_qtype_algebra_plugin.class.php +++ b/backup/moodle2/backup_qtype_algebra_plugin.class.php @@ -63,7 +63,7 @@ class backup_qtype_algebra_plugin extends backup_qtype_plugin { // Set source to populate the data. $algebra->set_source_table('qtype_algebra_options', array('questionid' => backup::VAR_PARENTID)); - $algebravariable->set_source_table('qtype_algebra_variables', array('question' => backup::VAR_PARENTID)); + $algebravariable->set_source_table('qtype_algebra_variables', array('questionid' => backup::VAR_PARENTID)); // Don't need to annotate ids nor files. diff --git a/backup/moodle2/restore_qtype_algebra_plugin.class.php b/backup/moodle2/restore_qtype_algebra_plugin.class.php index 013b70c..a4b4c70 100644 --- a/backup/moodle2/restore_qtype_algebra_plugin.class.php +++ b/backup/moodle2/restore_qtype_algebra_plugin.class.php @@ -62,7 +62,7 @@ class restore_qtype_algebra_plugin extends restore_qtype_plugin { $newquestionid = $this->get_new_parentid('question'); $questioncreated = $this->get_mappingid('question_created', $oldquestionid) ? true : false; - // If the question has been created by restore, we need to create its qtype_algebra too. + // If the question has been created by restore, we need to create its qtype_algebra_options too. if ($questioncreated) { // Adjust some columns. $data->questionid = $newquestionid; @@ -91,7 +91,7 @@ class restore_qtype_algebra_plugin extends restore_qtype_plugin { // If the question has been created by restore, we need to create its qtype_algebra_variables too. if ($questioncreated) { // Adjust some columns. - $data->question = $newquestionid; + $data->questionid = $newquestionid; // Insert record. $newitemid = $DB->insert_record('qtype_algebra_variables', $data); // Create mapping. -- cgit v1.2.3