mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-74925 core_course: initial deprecation of '_delete' methods
This commit is contained in:
parent
45dfb5ac84
commit
5294f81c27
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user