MDL-77037 core_courseformat: Refresh course index
* Refresh course index when language change
This commit is contained in:
@@ -226,6 +226,18 @@ abstract class base {
|
||||
self::$instances = array();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Reset the current user for all courses.
|
||||
*
|
||||
* The course format cache resets every time the course cache resets but
|
||||
* also when the user changes their language, all course editors
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function session_cache_reset_all(): void {
|
||||
$statecache = cache::make('core', 'courseeditorstate');
|
||||
$statecache->purge();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the current user course format cache.
|
||||
|
||||
Reference in New Issue
Block a user