mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-72873 core_grades: Create method that resets all static caches
Creates a new method reset_caches() in grade_helper which resets all static caches within this class. This is required for unit testing.
This commit is contained in:
parent
17bfe7e79f
commit
b4e8e0a50d
@ -3244,5 +3244,23 @@ abstract class grade_helper {
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets all static caches.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function reset_caches() {
|
||||
self::$managesetting = null;
|
||||
self::$gradereports = null;
|
||||
self::$gradereportpreferences = null;
|
||||
self::$scaleinfo = null;
|
||||
self::$outcomeinfo = null;
|
||||
self::$letterinfo = null;
|
||||
self::$importplugins = null;
|
||||
self::$exportplugins = null;
|
||||
self::$pluginstrings = null;
|
||||
self::$aggregationstrings = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user