From 3b0034cc91eeb7a041a1decdcd4d2b0f616d3dbc Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Mon, 6 Jan 2020 19:48:08 +1100 Subject: [PATCH] MDL-69166 enrol_fee: set a description for enrolment --- enrol/fee/classes/plugin.php | 3 ++- enrol/fee/lang/en/enrol_fee.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/enrol/fee/classes/plugin.php b/enrol/fee/classes/plugin.php index b1c5220ce53..0e01c4e7251 100644 --- a/enrol/fee/classes/plugin.php +++ b/enrol/fee/classes/plugin.php @@ -206,9 +206,10 @@ class enrol_fee_plugin extends enrol_plugin { echo '

'.get_string('loginsite').'

'; echo ''; } else { + $coursefullname = format_string($course->fullname, true, ['context' => $context]); \core_payment\helper::gateways_modal_requirejs(); $attributes = core_payment\helper::gateways_modal_link_params($cost, $instance->currency, 'enrol_fee', - $instance->id); + $instance->id, get_string('purchasedescription', 'enrol_fee', $coursefullname)); echo '
' . html_writer::tag('button', get_string("sendpaymentbutton", "enrol_paypal"), $attributes) . diff --git a/enrol/fee/lang/en/enrol_fee.php b/enrol/fee/lang/en/enrol_fee.php index a46e275b1ed..dc97e9964a0 100644 --- a/enrol/fee/lang/en/enrol_fee.php +++ b/enrol/fee/lang/en/enrol_fee.php @@ -45,6 +45,7 @@ $string['fee:unenrolself'] = 'Unenrol self from course'; $string['nocost'] = 'There is no cost to enrol in this course!'; $string['pluginname'] = 'Enrolment on payment'; $string['pluginname_desc'] = 'The enrolment on payment enrolment method allows you to set up courses requiring a payment. If the fee for any course is set to zero, then students are not asked to pay for entry. There is a site-wide fee 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 fee overrides the site fee.'; +$string['purchasedescription'] = 'Enrolment in course {$a}'; $string['sendpaymentbutton'] = 'Select payment type'; $string['status'] = 'Allow enrolment on payment enrolments'; $string['status_desc'] = 'Allow users to make a payment to enrol into a course by default.'; -- 2.43.0