From 66f05f2b9e07d17e6e1ff95cb7451a76b2f5d0cd Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 1 May 2025 11:19:39 +0100 Subject: [PATCH] MDL-85312 profilefield_menu: remove locked field option formatting. We shouldn't be formatting the option key when setting constant value, because that isn't formatted - only the option value is. --- public/user/profile/field/menu/field.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/user/profile/field/menu/field.class.php b/public/user/profile/field/menu/field.class.php index 061c791440c..16fb517cbfc 100644 --- a/public/user/profile/field/menu/field.class.php +++ b/public/user/profile/field/menu/field.class.php @@ -134,7 +134,7 @@ class profile_field_menu extends profile_field_base { } if ($this->is_locked() and !has_capability('moodle/user:update', context_system::instance())) { $mform->hardFreeze($this->inputname); - $mform->setConstant($this->inputname, format_string($this->datakey)); + $mform->setConstant($this->inputname, $this->datakey); } } /**