Merge branch 'wip-MDL-46147-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Sam Hemelryk 2014-07-02 09:31:34 +12:00
commit da6ddbf8e6

View file

@ -1316,10 +1316,17 @@ class cm_info implements IteratorAggregate {
* @return string
*/
public function get_formatted_name($options = array()) {
global $CFG;
$options = (array)$options;
if (!isset($options['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);
}