Merge branch 'MDL-76938_restore_comments' of https://github.com/davosmith/moodle

This commit is contained in:
Jun Pataleta 2023-03-02 08:42:15 +08:00
commit 6802f6b7f4
2 changed files with 13 additions and 10 deletions

View File

@ -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
*/

View File

@ -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