Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.3.3
-
MOODLE_23_STABLE
-
MOODLE_23_STABLE
-
wip-
MDL-36878-m24 -
- Log in as a admin/teacher
- Enter a course
- Turn on editing
- Add any activity.
- Make sure you don't get any errors and that the page takes no longer than it did before.
Description
This is not a functionality bug, but potentially a performance issue. In course/lib.php's get_module_metadata() function a static variable is initialized to cache module information and the information is stored in it, but cache never gets used because the check to see if module information has been stored is incorrect.
The check current looks like this:
if (isset($modlist[$modname])) {
|
// This module is already cached
|
$return[$modname] = $modlist[$course->id][$modname];
|
continue;
|
}
|
It should look like this:
if (isset($modlist[$course->id][$modname])) {
|
// This module is already cached
|
$return[$modname] = $modlist[$course->id][$modname];
|
continue;
|
}
|
Attachments
Issue Links
- has been marked as being related by
-
MDL-48928 $sectionreturn parameter effectively ignored in course/lib.php get_module_metadata()
-
- Closed
-