MDL-40684 Fix conditional field name for custom user fields
This commit is contained in:
committed by
Sam Hemelryk
parent
f5472d1fd4
commit
0604e03bf9
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user