MDL-74608 activities: a new option to force the activity language

For a long time, Moodle has had the feature to force the language
for a whole course. This change adds the same feature at activity
level.

The course-level feature was controlled by a capability
moodle/course:setforcedlanguage, and I decided to use the same
capability to control this feature. I think a new capability would be
overkill.
This commit is contained in:
Tim Hunt
2022-08-15 22:15:52 +01:00
parent 896e126a66
commit 8babdbd396
44 changed files with 528 additions and 85 deletions
+1 -1
View File
@@ -526,7 +526,7 @@ class core_string_manager_standard implements core_string_manager {
$cachekey = 'list_'.$this->get_key_suffix();
$cachedlist = $this->menucache->get($cachekey);
if ($cachedlist !== false) {
// The cache content is invalid.
// The cache content is valid.
if ($returnall or empty($this->translist)) {
return $cachedlist;
}