Skip to content

Commit

Permalink
MDL-37516 Conditional activities: user field condition display fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarshallou authored and stronk7 committed Jul 2, 2013
1 parent a9155c2 commit a6683d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/conditionlib.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit a6683d3

Please sign in to comment.