MDL-58916 user_profile: Pass site context when determining menu options

This commit is contained in:
John Okely 2017-05-12 15:52:37 +08:00
parent 17fb1d84a2
commit 40ca0bd914

View file

@ -59,7 +59,8 @@ class profile_field_menu extends profile_field_base {
$this->options[''] = get_string('choose').'...';
}
foreach ($options as $key => $option) {
$this->options[$option] = format_string($option); // Multilang formatting with filters.
// Multilang formatting with filters.
$this->options[$option] = format_string($option, true, ['context' => context_system::instance()]);
}
// Set the data key.