This commit is contained in:
Andrew Nicols 2023-02-09 10:50:58 +08:00
commit c7a1f4c748
2 changed files with 11 additions and 6 deletions

View file

@ -6252,13 +6252,14 @@ class context_helper extends context {
}
/**
* Preloads context information from db record and strips the cached info.
* Preloads context cache with information from db record and strips the cached info.
*
* The db request has to contain all columns from context_helper::get_preload_record_columns().
*
* @static
* @param stdClass $rec
* @return void (modifies $rec)
* @return void This is intentional. See MDL-37115. You will need to get the context
* in the normal way, but it is now cached, so that will be fast.
*/
public static function preload_from_record(stdClass $rec) {
context::preload_from_record($rec);