mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'wip-MDL-46147-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
da6ddbf8e6
1 changed files with 7 additions and 0 deletions
|
@ -1316,10 +1316,17 @@ class cm_info implements IteratorAggregate {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_formatted_name($options = array()) {
|
public function get_formatted_name($options = array()) {
|
||||||
|
global $CFG;
|
||||||
$options = (array)$options;
|
$options = (array)$options;
|
||||||
if (!isset($options['context'])) {
|
if (!isset($options['context'])) {
|
||||||
$options['context'] = $this->get_context();
|
$options['context'] = $this->get_context();
|
||||||
}
|
}
|
||||||
|
// Improve filter performance by preloading filter setttings for all
|
||||||
|
// activities on the course (this does nothing if called multiple
|
||||||
|
// times).
|
||||||
|
if (!empty($CFG->filterall)) {
|
||||||
|
filter_preload_activities($this->get_modinfo());
|
||||||
|
}
|
||||||
return format_string($this->get_name(), true, $options);
|
return format_string($this->get_name(), true, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue