Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…layed from cost being charged at authorize.net
  • Loading branch information...
commit 10fbf4d8ca9fa9e674377dfb79e837c9e5301e52 1 parent 6bbf934
Aparup Banerjee authored July 25, 2011
4  enrol/authorize/enrol.php
@@ -71,7 +71,7 @@ function print_entry($course) {
71 71
             $curcost = get_course_cost($course);
72 72
             echo '<div class="mdl-align">';
73 73
             echo '<p>'.get_string('paymentrequired').'</p>';
74  
-            echo '<p><b>'.get_string('cost').": $curcost[currency] $curcost[cost]".'</b></p>';
  74
+            echo '<p><b>'.get_string('cost').': '. $curcost['currency'] . $curcost['localizedcost'] .'</b></p>';
75 75
             echo '<p><a href="'.$CFG->httpswwwroot.'/login/">'.get_string('loginsite').'</a></p>';
76 76
             echo '</div>';
77 77
         }
@@ -387,7 +387,7 @@ function get_access_icons($course) {
387 387
             }
388 388
 
389 389
             $str .= '<div class="cost" title="'.$strrequirespayment.'">'.$strcost.': ';
390  
-            $str .= $currency . ' ' . $curcost['cost'].'</div>';
  390
+            $str .= $currency . ' ' . $curcost['localizedcost'].'</div>';
391 391
         }
392 392
 
393 393
         return $str;
5  enrol/authorize/localfuncs.php
@@ -12,10 +12,11 @@ function get_course_cost($course)
12 12
     if (!empty($course->cost)) {
13 13
         $cost = (float)(((float)$course->cost) < 0) ? $CFG->enrol_cost : $course->cost;
14 14
     }
15  
-
16  
-    $cost = format_float($cost, 2);
  15
+    $costlocalizeddisplay = format_float($cost, 2);
  16
+    $cost = format_float($cost, 2, false);
17 17
     $ret = array(
18 18
         'cost' => $cost,
  19
+        'localizedcost' => $costlocalizeddisplay,
19 20
         'currency' => $currency
20 21
     );
21 22
 

0 notes on commit 10fbf4d

Please sign in to comment.
Something went wrong with that request. Please try again.