From 1c9f4786fb4e6602ec7ebca08c544bc62345eea3 Mon Sep 17 00:00:00 2001 From: Sergey Date: Sat, 22 Feb 2020 20:44:23 +0100 Subject: [PATCH] Fix of showing names of custom user fields (#326) Show normal human-readable name of custom user profile fields instead of internal shortname --- element/userfield/classes/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element/userfield/classes/element.php b/element/userfield/classes/element.php index d054e92..0d209a0 100644 --- a/element/userfield/classes/element.php +++ b/element/userfield/classes/element.php @@ -65,7 +65,7 @@ class element extends \mod_customcert\element { $arrcustomfields = \availability_profile\condition::get_custom_profile_fields(); $customfields = array(); foreach ($arrcustomfields as $key => $customfield) { - $customfields[$customfield->id] = $key; + $customfields[$customfield->id] = $customfield->name; } // Combine the two. $fields = $userfields + $customfields;