Permalink
Browse files

MDL-27717 Enrolments - separated display of localized cost being disp…

…layed from cost being charged at authorize.net
  • Loading branch information...
1 parent 6bbf934 commit 10fbf4d8ca9fa9e674377dfb79e837c9e5301e52 @nebgor nebgor committed Jul 25, 2011
Showing with 5 additions and 4 deletions.
  1. +2 −2 enrol/authorize/enrol.php
  2. +3 −2 enrol/authorize/localfuncs.php
@@ -71,7 +71,7 @@ function print_entry($course) {
$curcost = get_course_cost($course);
echo '<div class="mdl-align">';
echo '<p>'.get_string('paymentrequired').'</p>';
- echo '<p><b>'.get_string('cost').": $curcost[currency] $curcost[cost]".'</b></p>';
+ echo '<p><b>'.get_string('cost').': '. $curcost['currency'] . $curcost['localizedcost'] .'</b></p>';
echo '<p><a href="'.$CFG->httpswwwroot.'/login/">'.get_string('loginsite').'</a></p>';
echo '</div>';
}
@@ -387,7 +387,7 @@ function get_access_icons($course) {
}
$str .= '<div class="cost" title="'.$strrequirespayment.'">'.$strcost.': ';
- $str .= $currency . ' ' . $curcost['cost'].'</div>';
+ $str .= $currency . ' ' . $curcost['localizedcost'].'</div>';
}
return $str;
@@ -12,10 +12,11 @@ function get_course_cost($course)
if (!empty($course->cost)) {
$cost = (float)(((float)$course->cost) < 0) ? $CFG->enrol_cost : $course->cost;
}
-
- $cost = format_float($cost, 2);
+ $costlocalizeddisplay = format_float($cost, 2);
+ $cost = format_float($cost, 2, false);
$ret = array(
'cost' => $cost,
+ 'localizedcost' => $costlocalizeddisplay,
'currency' => $currency
);

0 comments on commit 10fbf4d

Please sign in to comment.