MDL-75398 core_courseformat: deprecate 4th cmname construct param

This commit is contained in:
Ferran Recio 2022-08-08 15:31:19 +02:00 committed by Jun Pataleta
parent c6211a68b4
commit f69b48865a
2 changed files with 9 additions and 2 deletions

View File

@ -64,16 +64,20 @@ class cmname implements named_templatable, renderable {
* @param course_format $format the course format
* @param section_info $section the section info
* @param cm_info $mod the course module ionfo
* @param bool|null $editable if it is editable (not used)
* @param null $unused This parameter has been deprecated since 4.1 and should not be used anymore.
* @param array $displayoptions optional extra display options
*/
public function __construct(
course_format $format,
section_info $section,
cm_info $mod,
?bool $editable = null,
?bool $unused = null,
array $displayoptions = []
) {
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
$this->format = $format;
$this->section = $section;
$this->mod = $mod;

View File

@ -5,6 +5,9 @@ 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().
* The 4th param of the core_courseformat\output\local\content\cm\cmname construct is now deprecated.
The page edition is now detected using the course_format\base:show_editor method as the rest of the
core_courseformat outputs.
=== 4.0 ===
* New core_courseformat\base::uses_course_index() to define whether the course format uses course index or not.