mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-40684 Fix conditional field name for custom user fields
This commit is contained in:
parent
f5472d1fd4
commit
0604e03bf9
1 changed files with 5 additions and 1 deletions
|
@ -829,7 +829,11 @@ abstract class condition_info_base {
|
|||
foreach ($this->item->conditionsfield as $field => $details) {
|
||||
$a = new stdclass;
|
||||
// Display the fieldname into current lang.
|
||||
$translatedfieldname = get_user_field_name($details->fieldname);
|
||||
if (is_numeric($field)) {
|
||||
$translatedfieldname = $details->fieldname;
|
||||
} else {
|
||||
$translatedfieldname = get_user_field_name($details->fieldname);
|
||||
}
|
||||
$a->field = format_string($translatedfieldname, true, array('context' => $context));
|
||||
$a->value = s($details->value);
|
||||
$information .= html_writer::start_tag('li');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue