Commit 5294f81c authored by Simey Lameze's avatar Simey Lameze
Browse files

MDL-74925 core_course: initial deprecation of '_delete' methods

parent 45dfb5ac
......@@ -128,9 +128,12 @@ class stateupdates implements JsonSerializable {
/**
* Add track about a section deleted.
*
* @deprecated since Moodle 4.1 MDL-74925 - please call add_section_remove() instead.
* @param int $sectionid The affected section id.
*/
public function add_section_delete(int $sectionid): void {
debugging('add_section_delete() is deprecated. Please use add_section_remove() instead.', DEBUG_DEVELOPER);
$this->add_update('section', 'remove', (object)['id' => $sectionid]);
}
......@@ -187,9 +190,12 @@ class stateupdates implements JsonSerializable {
/**
* Add track about a course module deleted.
*
* @deprecated since Moodle 4.1 MDL-74925 - please call add_cm_remove() instead.
* @param int $cmid the affected course module id
*/
public function add_cm_delete(int $cmid): void {
debugging('add_cm_delete() is deprecated. Please use add_cm_remove() instead.', DEBUG_DEVELOPER);
$this->add_update('cm', 'remove', (object)['id' => $cmid]);
}
......
......@@ -2,6 +2,10 @@ This files describes API changes for course formats
Overview of this plugin type at http://docs.moodle.org/dev/Course_formats
=== 4.1 ===
* New \core_courseformat\stateupdates methods add_section_remove() and add_cm_remove() have been added to replace
the deprecated methods add_section_delete() and add_cm_delete().
=== 4.0 ===
* New core_courseformat\base::uses_course_index() to define whether the course format uses course index or not.
* New core_courseformat\base::supports_components() to specify if the format is compatible with reactive components.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment