mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 09:56:38 +02:00
MDL-46147 modinfo: performance improvement for course page
This is a big win in a specific situation, ie filters enabled for content+headings, and no activity descriptions visible on the course page.
This commit is contained in:
parent
5c1049f72b
commit
30e2727e72
1 changed files with 4 additions and 0 deletions
|
@ -1323,6 +1323,10 @@ class cm_info implements IteratorAggregate {
|
|||
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).
|
||||
filter_preload_activities($this->get_modinfo());
|
||||
return format_string($this->get_name(), true, $options);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue