MDL-69166 enrol_fee: set a description for enrolment

This commit is contained in:
Shamim Rezaie 2020-01-06 19:48:08 +11:00
parent 03f20edbd5
commit e88e3b87be
2 changed files with 3 additions and 1 deletions

View File

@ -206,9 +206,10 @@ class enrol_fee_plugin extends enrol_plugin {
echo '<p><a href="'.$wwwroot.'/login/">'.get_string('loginsite').'</a></p>';
echo '</div>';
} 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 '<div align="center">' .
html_writer::tag('button', get_string("sendpaymentbutton", "enrol_paypal"), $attributes) .

View File

@ -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.';