mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +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
7a4832ecb9
commit
0d9805dc14
1 changed files with 4 additions and 0 deletions
|
@ -1320,6 +1320,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