MDL-60944 tool_analytics: Adding create and delete features

Extra modifications to refine the preexisting patch.
This commit is contained in:
David Monllaó
2019-02-25 09:54:07 +01:00
parent 349c44128d
commit e4453adc55
18 changed files with 698 additions and 131 deletions
+12 -1
View File
@@ -1141,6 +1141,17 @@ $cache = '.var_export($cache, true).';
* @return string sha1 hash
*/
public static function get_all_versions_hash() {
return sha1(serialize(self::get_all_versions()));
}
/**
* Returns hash of all versions including core and all plugins.
*
* This is relatively slow and not fully cached, use with care!
*
* @return array as (string)plugintype_pluginname => (int)version
*/
public static function get_all_versions() : array {
global $CFG;
self::init();
@@ -1174,7 +1185,7 @@ $cache = '.var_export($cache, true).';
}
}
return sha1(serialize($versions));
return $versions;
}
/**