Permalink
Browse files

MDL-37516 Conditional activities: user field condition display fixes

  • Loading branch information...
1 parent a9155c2 commit a6683d327fbc37d586949802c60f902f0bb77b13 @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;
@@ -829,7 +829,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 .= html_writer::start_tag('li');
$information .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
$information .= html_writer::end_tag('li');
@@ -1061,7 +1061,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 .= html_writer::start_tag('li');
$information .= get_string('requires_user_field_'.$details->operator, 'condition', $a) . ' ';
$information .= html_writer::end_tag('li');

0 comments on commit a6683d3

Please sign in to comment.