This commit is contained in:
Huong Nguyen
2024-03-21 15:12:01 +07:00
2 changed files with 4 additions and 4 deletions
+3 -4
View File
@@ -972,16 +972,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);
}
/**
+1
View File
@@ -54,6 +54,7 @@ value when all the sections must be displayed (instead of 0). That way, section
plugins can now include the string 'plugin_description' to provide a description of the course format.
* A new item, initsections, has been added to the testing_data_generator::create_course() function, to let the generator rename
the sections to "Section X".
* The core_courseformat\base::get_format_string last parameter has been removed because it was erroneous.
=== 4.3 ===
* New core_courseformat\output\activitybadge class that can be extended by any module to display content near the activity name.