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 685ed22b13e1d3bb8bcbe528088ff55b10477986 1 parent 86ebf30
@ikawhero ikawhero authored samhemelryk committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/conditionlib.php
View
6 lib/conditionlib.php
@@ -824,7 +824,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 .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
Please sign in to comment.
Something went wrong with that request. Please try again.