Skip to content
Browse files

MDL-41772 - mod_data: Fixed database_module comments not being restored.

  • Loading branch information...
1 parent e81fce9 commit 254bf485f1d9acbe351334ed0a9257a3dbb6b2c0 @abgreeve abgreeve committed
Showing with 15 additions and 0 deletions.
  1. +15 −0 mod/data/backup/moodle2/restore_data_activity_task.class.php
View
15 mod/data/backup/moodle2/restore_data_activity_task.class.php
@@ -120,4 +120,19 @@ static public function define_restore_log_rules_for_course() {
return $rules;
}
+
+ /**
+ * Given a commment area, return the itemname that contains the itemid mappings.
+ *
+ * @param string $commentarea Comment area name e.g. database_entry.
+ * @return string name of the mapping used to determine the itemid.
+ */
+ public function get_comment_mapping_itemname($commentarea) {
+ if ($commentarea == 'database_entry') {
+ $itemname = 'data_record';
+ } else {
+ $itemname = parent::get_comment_mapping_itemname($commentarea);
+ }
+ return $itemname;
+ }
}

0 comments on commit 254bf48

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