mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
New profilefield_ lang files are now supported with
safe fallback to the "old" ones (stored in admin.php) Merged from MOODLE_19_STABLE
This commit is contained in:
parent
23610d6ff7
commit
b77bbd2f83
@ -372,9 +372,14 @@ function profile_list_datatypes() {
|
||||
|
||||
if ($dirlist = get_directory_list($CFG->dirroot.'/user/profile/field', '', false, true, false)) {
|
||||
foreach ($dirlist as $type) {
|
||||
$datatypes[$type] = get_string('profilefieldtype'.$type, 'admin');
|
||||
$datatypes[$type] = get_string('profilefieldtype'.$type, 'profilefield_'.$type);
|
||||
if (strpos($datatypes[$type], '[[') !== false) {
|
||||
$datatypes[$type] = get_string('profilefieldtype'.$type, 'admin');
|
||||
}
|
||||
}
|
||||
}
|
||||
asort($datatypes);
|
||||
|
||||
return $datatypes;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user