MDL-80079 core: Correct incorrect arg to format_string::$options

This commit is contained in:
Andrew Nicols
2023-11-14 22:28:55 +08:00
parent 935c2509f1
commit 136bd2c4c4
12 changed files with 166 additions and 18 deletions
+15 -3
View File
@@ -349,7 +349,11 @@ class core_course_list_element implements IteratorAggregate {
* @return string
*/
public function get_formatted_name() {
return format_string(get_course_display_name_for_list($this), true, $this->get_context());
return format_string(
get_course_display_name_for_list($this),
true,
['context' => $this->get_context()],
);
}
/**
@@ -357,7 +361,11 @@ class core_course_list_element implements IteratorAggregate {
* @return string
*/
public function get_formatted_fullname() {
return format_string($this->__get('fullname'), true, $this->get_context());
return format_string(
$this->__get('fullname'),
true,
['context' => $this->get_context()],
);
}
/**
@@ -365,7 +373,11 @@ class core_course_list_element implements IteratorAggregate {
* @return string
*/
public function get_formatted_shortname() {
return format_string($this->__get('shortname'), true, $this->get_context());
return format_string(
$this->__get('shortname'),
true,
['context' => $this->get_context()],
);
}
/**