]> git.mjollnir.org Git - moodle.git/commitdiff
enrol/paypall MDL-16782 - Default cost is not used
authorDan Poltawski <dan.poltawski@lancaster.ac.uk>
Fri, 30 Oct 2009 22:10:45 +0000 (22:10 +0000)
committerDan Poltawski <dan.poltawski@lancaster.ac.uk>
Fri, 30 Oct 2009 22:10:45 +0000 (22:10 +0000)
When a course level cost is not set, the global setting is not used.

enrol/paypal/enrol.php

index e4de832e2a3ee4688d15a0943f1691af7f411aad..f08de8eeb9b2dce5e2bdde48de7b0bdfcb355030 100644 (file)
@@ -25,7 +25,7 @@ function print_entry($course) {
         $teacher = false;
     }
 
-    if ( (float) $course->cost < 0 ) {
+    if ( (float) $course->cost <= 0 ) {
         $cost = (float) $CFG->enrol_cost;
     } else {
         $cost = (float) $course->cost;