MDL-83542 core_course: Add hook for course content update
* Add hooks for course events that lead to session_cache_reset
This commit is contained in:
+5
-2
@@ -127,8 +127,11 @@ class create_module extends external_api {
|
||||
// Execute the action.
|
||||
$actions->$action($updates, $course, $modname, $targetsectionnum, $targetcmid);
|
||||
|
||||
// Any state action mark the state cache as dirty.
|
||||
course_format::session_cache_reset($course);
|
||||
// Dispatch the hook for post course content update.
|
||||
$hook = new \core_courseformat\hook\after_course_content_updated(
|
||||
course: $course
|
||||
);
|
||||
\core\di::get(\core\hook\manager::class)->dispatch($hook);
|
||||
|
||||
return json_encode($updates);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user