MDL-77037 core_courseformat: Refresh course index

* Refresh course index when language change
This commit is contained in:
Laurent David
2023-03-09 08:44:28 +01:00
committed by Laurent David
parent 62cfa26cb9
commit e5f40a62d4
4 changed files with 64 additions and 0 deletions
+1
View File
@@ -895,6 +895,7 @@ if (!isset($CFG->theme)) {
if (isset($_GET['lang']) and ($lang = optional_param('lang', '', PARAM_SAFEDIR))) {
if (get_string_manager()->translation_exists($lang, false)) {
$SESSION->lang = $lang;
\core_courseformat\base::session_cache_reset_all();
}
}
unset($lang);