MDL-55231 core_course: Partial course cache rebuild

This commit is contained in:
Dongsheng Cai 2021-07-16 13:49:35 +10:00
parent e5894c0455
commit 9a900492bc
15 changed files with 406 additions and 177 deletions

View file

@ -614,8 +614,10 @@ class dndupload_ajax_processor {
$visible = get_fast_modinfo($this->course)->get_section_info($this->section)->visible;
$DB->set_field('course_modules', 'instance', $instanceid, array('id' => $this->cm->id));
course_purge_module_cache($this->cm);
// Rebuild the course cache after update action
rebuild_course_cache($this->course->id, true);
rebuild_course_cache($this->course->id, true, true);
$sectionid = course_add_cm_to_section($this->course, $this->cm->id, $this->section);