Permalink
Browse files

Merge branch 'MDL-42533-24' of git://github.com/FMCorz/moodle into MO…

…ODLE_24_STABLE
  • Loading branch information...
2 parents dcb6e41 + c9bcb47 commit 8a7078b28baa98b1ba0bc0202cfa89be79ffdd67 @danpoltawski danpoltawski committed Nov 4, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/conditionlib.php
View
@@ -1035,8 +1035,14 @@ public function is_available(&$information, $grabthelot=false, $userid=0, $modin
if (!$this->is_field_condition_met($details->operator, $uservalue, $details->value)) {
// Set available to false
$available = false;
+ // Display the fieldname into current lang.
+ if (is_numeric($field)) {
+ $translatedfieldname = $details->fieldname;
+ } else {
+ $translatedfieldname = get_user_field_name($details->fieldname);
+ }
$a = new stdClass();
- $a->field = format_string($details->fieldname, true, array('context' => $context));
+ $a->field = format_string($translatedfieldname, true, array('context' => $context));
$a->value = s($details->value);
$information .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
}

0 comments on commit 8a7078b

Please sign in to comment.