diff --git a/course/format/classes/output/local/content/cm/cmname.php b/course/format/classes/output/local/content/cm/cmname.php index 063768f7f66..e5e7e6924cb 100644 --- a/course/format/classes/output/local/content/cm/cmname.php +++ b/course/format/classes/output/local/content/cm/cmname.php @@ -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; diff --git a/course/format/upgrade.txt b/course/format/upgrade.txt index e284e13ba24..428258c4981 100644 --- a/course/format/upgrade.txt +++ b/course/format/upgrade.txt @@ -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.