Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-27717_MOODLE_19_STABLE' into MOODLE_19_STABLE

  • Loading branch information...
commit fdee5d95b732f625666eb6d3334afe4fb54ed936 2 parents ba4dfc9 + 10fbf4d
@skodak skodak authored
Showing with 5 additions and 4 deletions.
  1. +2 −2 enrol/authorize/enrol.php
  2. +3 −2 enrol/authorize/localfuncs.php
View
4 enrol/authorize/enrol.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;
View
5 enrol/authorize/localfuncs.php
@@ -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
);
Please sign in to comment.
Something went wrong with that request. Please try again.