diff --git a/backup/moodle2/restore_activity_task.class.php b/backup/moodle2/restore_activity_task.class.php index 19a0d76e3b3..687a54508e9 100644 --- a/backup/moodle2/restore_activity_task.class.php +++ b/backup/moodle2/restore_activity_task.class.php @@ -246,16 +246,6 @@ abstract class restore_activity_task extends restore_task { } } - /** - * Given a commment area, return the itemname that contains the itemid mappings - * - * By default both are the same (commentarea = itemname), so return it. If some - * module uses a different approach, this method can be overriden in its taks - */ - public function get_comment_mapping_itemname($commentarea) { - return $commentarea; - } - /** * Define (add) particular steps that each activity can have */ diff --git a/backup/util/plan/restore_task.class.php b/backup/util/plan/restore_task.class.php index 5b22b4bd3d5..e5abaca396c 100644 --- a/backup/util/plan/restore_task.class.php +++ b/backup/util/plan/restore_task.class.php @@ -95,6 +95,19 @@ abstract class restore_task extends base_task { return $this->plan->get_info()->original_system_contextid; } + /** + * Given a commment area, return the itemname that contains the itemid mappings + * + * By default, both are the same (commentarea = itemname), so return it. If some + * plugins use a different approach, this method can be overriden in its task. + * + * @param string $commentarea area defined for this comment + * @return string itemname that contains the related itemid mapping + */ + public function get_comment_mapping_itemname($commentarea) { + return $commentarea; + } + /** * If the task has been executed, launch its after_restore() * method if available