MDL-72991 Course: Partial course cache rebuild with cache versioning

This commit is contained in:
Huong Nguyen
2022-03-17 15:34:26 +07:00
parent 457d10a49f
commit bfe14e2312
11 changed files with 243 additions and 230 deletions
+15
View File
@@ -3729,3 +3729,18 @@ function print_grade_plugin_selector($plugin_info, $active_type, $active_plugin,
course_modinfo::purge_course_module_cache($courseid, $cmid);
}
}
/**
* For a given course, returns an array of course activity objects
* Each item in the array contains he following properties:
*
* @param int $courseid course id
* @param bool $usecache get activities from cache if modinfo exists when $usecache is true
* @return array list of activities
* @deprecated since Moodle 4.0. Please use {@link course_modinfo::get_array_of_activities()} instead.
*/
function get_array_of_activities(int $courseid, bool $usecache = false): array {
debugging(__FUNCTION__ . '() is deprecated. ' . 'Please use course_modinfo::get_array_of_activities() instead.',
DEBUG_DEVELOPER);
return course_modinfo::get_array_of_activities(get_course($courseid), $usecache);
}