diff --git a/course/format/classes/base.php b/course/format/classes/base.php index 426045e2d87..30ff931c9e9 100644 --- a/course/format/classes/base.php +++ b/course/format/classes/base.php @@ -841,16 +841,15 @@ abstract class base { * core_courseformat will be user as the component. * * @param string $key the string key - * @param string|object|array $data extra data that can be used within translation strings - * @param string|null $lang moodle translation language, null means use current + * @param string|object|array|int $data extra data that can be used within translation strings * @return string the get_string result */ - public function get_format_string(string $key, $data = null, $lang = null): string { + public function get_format_string(string $key, $data = null): string { $component = 'format_' . $this->get_format(); if (!get_string_manager()->string_exists($key, $component)) { $component = 'core_courseformat'; } - return get_string($key, $component, $data, $lang); + return get_string($key, $component, $data); } /** diff --git a/course/format/upgrade.txt b/course/format/upgrade.txt index bd9249216ec..aec45425d04 100644 --- a/course/format/upgrade.txt +++ b/course/format/upgrade.txt @@ -2,6 +2,9 @@ This files describes API changes for course formats Overview of this plugin type at https://moodledev.io/docs/apis/plugintypes/format +=== 4.2.7 === +* The core_courseformat\base::get_format_string last parameter has been removed because it was erroneous. + === 4.2 === * New core_courseformat\base::get_context() to get the course context directly from the format instance. * New core_courseformat\base::delete_module() method. Now format plugins can extend the activity deletion logic