Skip to content

Commit

Permalink
MDL-71378 core: Resolve module cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
safatshahin committed Oct 16, 2022
1 parent 8ccedd7 commit ce33b49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions course/modlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,10 @@ function edit_module_post_actions($moduleinfo, $course) {
$moduleinfo->showgradingmanagement = $showgradingmanagement;
}

\course_modinfo::purge_course_module_cache($course->id, $moduleinfo->coursemodule);
rebuild_course_cache($course->id, true, true);
if (!moodle_needs_upgrading()) {
\course_modinfo::purge_course_module_cache($course->id, $moduleinfo->coursemodule);
rebuild_course_cache($course->id, true, true);
}
if ($hasgrades) {
grade_regrade_final_grades($course->id);
}
Expand Down

0 comments on commit ce33b49

Please sign in to comment.