MDL-35668 filebrowser: perf improvements to coursecat
commit2d939622b802d4a9153dbed0892c3dc376817400
authorMarina Glancy <marina@moodle.com>
Thu, 17 Aug 2017 06:22:06 +0000 (17 14:22 +0800)
committerMarina Glancy <marina@moodle.com>
Wed, 30 Aug 2017 04:43:22 +0000 (30 12:43 +0800)
tree1a5bda49bfd5c7ffb10917eb3f00563a6caad3a5
parentc524a6dce0deeaf37ef5d18bea50c87209e4dd70
MDL-35668 filebrowser: perf improvements to coursecat

- Preload contexts of subcategories and courses when retrieving their lists
- When there are enrolled courses in hidden subcategories retrieve them together with direct children courses
- Do not call browser->get_file_info - it retrieves the coursecat/course again, instead initialise the instance
of file_info_context_coursecat or file_info_context_course
lib/filebrowser/file_info_context_coursecat.php