Permalink
Browse files

MDL-37516 Conditional activities: user field condition display fixes

  • Loading branch information...
1 parent cb4beb2 commit 122d59390fbb12b6a20cd074a52b90ac303354c7 @sammarshallou sammarshallou committed with stronk7 May 15, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/conditionlib.php
View
@@ -547,7 +547,7 @@ protected static function fill_availability_conditions_inner($item, $tableprefix
}
} else {
$field = $condition->userfield;
- $fieldname = $condition->userfield;
+ $fieldname = get_user_field_name($condition->userfield);
}
$details = new stdClass;
$details->fieldname = $fieldname;
@@ -824,7 +824,7 @@ public function get_full_information($modinfo=null) {
foreach ($this->item->conditionsfield as $field => $details) {
$a = new stdclass;
$a->field = format_string($details->fieldname, true, array('context' => $context));
- $a->value = $details->value;
+ $a->value = s($details->value);
$information .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
}
}
@@ -1031,7 +1031,7 @@ public function is_available(&$information, $grabthelot=false, $userid=0, $modin
$available = false;
$a = new stdClass();
$a->field = format_string($details->fieldname, true, array('context' => $context));
- $a->value = $details->value;
+ $a->value = s($details->value);
$information .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
}
}

0 comments on commit 122d593

Please sign in to comment.