mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-55231 core_course: Partial course cache rebuild
This commit is contained in:
parent
e5894c0455
commit
9a900492bc
15 changed files with 406 additions and 177 deletions
|
@ -292,14 +292,15 @@ class condition extends \core_availability\condition {
|
|||
$updatesection->availability = json_encode($tree->save());
|
||||
$updatesection->timemodified = time();
|
||||
$DB->update_record('course_sections', $updatesection);
|
||||
course_purge_section_cache($section);
|
||||
|
||||
$anychanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure course cache is cleared if required.
|
||||
if ($anychanged) {
|
||||
rebuild_course_cache($courseid, true);
|
||||
// Partial rebuild the sections which have been invalidated.
|
||||
rebuild_course_cache($courseid, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue