When using the Paypal module, you can now also use enrolment keys

Thanks, Chardelle!     bug 2418
This commit is contained in:
moodler
2005-05-04 07:31:25 +00:00
parent f64c1ef666
commit 19fa71e8fb
2 changed files with 17 additions and 7 deletions
+14 -3
View File
@@ -37,6 +37,11 @@ function print_entry($course) {
print_header($strloginto, $course->fullname,
"<a href=\"$CFG->wwwroot/course/\">$strcourses</a> -> $strloginto");
print_course($course, "80%");
if ($course->password) { // Presenting two options
print_simple_box(get_string('costorkey', 'enrol_paypal'), 'center');
}
print_simple_box_start("center");
//Sanitise some fields before building the PayPal form
@@ -48,9 +53,15 @@ function print_entry($course) {
$useraddress = $this->sanitise_for_paypal($USER->address);
$usercity = $this->sanitise_for_paypal($USER->city);
include("$CFG->dirroot/enrol/paypal/enrol.html");
include($CFG->dirroot.'/enrol/paypal/enrol.html');
print_simple_box_end();
if ($course->password) { // Second option
$password = '';
include($CFG->dirroot.'/enrol/internal/enrol.html');
}
print_footer();
}
@@ -92,8 +103,8 @@ function get_access_icons($course) {
default: $currency = '$'; break;
}
$str .= '<span class="courseboxcost" title="'.$strrequirespayment.'">'.$strcost.': ';
$str .= $currency.format_float($cost,2).'</span>';
$str .= '<div class="cost" title="'.$strrequirespayment.'">'.$strcost.': ';
$str .= $currency.format_float($cost,2).'</div>';
}
+3 -4
View File
@@ -1,10 +1,9 @@
<?php // $Id$
$string['enrolname'] = 'Paypal';
$string['description'] = 'The Paypal module allows you to set up paid courses. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.';
$string['business'] = 'The email address of your business Paypal account';
$string['description'] = 'The Paypal module allows you to set up paid courses. If the cost for any course is zero, then students are not asked to pay for entry. There is a site-wide cost that you set here as a default for the whole site and then a course setting that you can set for each course individually. The course cost overrides the site cost.';
$string['enrolname'] = 'Paypal';
$string['sendpaymentbutton'] = 'Send payment via Paypal';
$string['costorkey'] = 'Please choose one of the following methods of enrolment.';
?>