MDL-40684 Fix conditional field name for custom user fields

This commit is contained in:
Shane Elliott 2013-07-16 16:55:12 +08:00 committed by Sam Hemelryk
parent f5472d1fd4
commit 0604e03bf9

View file

@ -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');