MDL-56133 tool_langimport: Changes should be visible after import
Before this change if a language pack was updated by the \tool_langimport\task\update_langpacks_task scheduled task, changes would not be available to users until an admin manually cleared the strings cache. This change causes the cache to purged when a language pack it update, this will cause it to rebuild so users will start seeing updates automatically.
This commit is contained in:
@@ -184,6 +184,8 @@ class controller {
|
||||
|
||||
if ($updated) {
|
||||
$this->info[] = get_string('langupdatecomplete', 'tool_langimport');
|
||||
// The strings have been changed so we need to purge their cache to ensure users see the changes.
|
||||
get_string_manager()->reset_caches();
|
||||
} else {
|
||||
$this->info[] = get_string('nolangupdateneeded', 'tool_langimport');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user