Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-40684 Fix conditional field name for custom user fields

  • Loading branch information...
commit 0604e03bf95fe4d33a33e1e2d8a6398107407043 1 parent f5472d1
@ikawhero ikawhero authored samhemelryk committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/conditionlib.php
View
6 lib/conditionlib.php
@@ -829,7 +829,11 @@ public function get_full_information($modinfo=null) {
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');
Please sign in to comment.
Something went wrong with that request. Please try again.