Skip to content

Commit

Permalink
Merge branch 'MDL-27717_MOODLE_19_STABLE' into MOODLE_19_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 25, 2011
2 parents ba4dfc9 + 10fbf4d commit fdee5d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions enrol/authorize/enrol.php
Expand Up @@ -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>';
}
Expand Down Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions enrol/authorize/localfuncs.php
Expand Up @@ -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
);

Expand Down

0 comments on commit fdee5d9

Please sign in to comment.