Skip to content
Browse files

New string: costdefaultdesc

<strong>In course settings, enter -1</strong> to cost field to use this default cost.
  • Loading branch information...
1 parent d91f797 commit 8fd49aa444358cc70206006565db0e27b526c974 ethem committed
Showing with 4 additions and 2 deletions.
  1. +1 −1 enrol/authorize/config.html
  2. +3 −1 enrol/authorize/enrol.php
View
2 enrol/authorize/config.html
@@ -48,7 +48,7 @@
<tr valign="top">
<td align="right">enrol_cost:</td>
<td><input type="text" size="5" name="enrol_cost" value="<?php p($frm->enrol_cost) ?>" /></td>
- <td><?php print_string("costdefault") ?></td>
+ <td><?php print_string("costdefault") ?>. <?php print_string("costdefaultdesc", "enrol_authorize") ?></td>
</tr>
<tr valign="top">
View
4 enrol/authorize/enrol.php
@@ -466,7 +466,9 @@ function process_config($config)
global $CFG;
// site settings
- set_config('enrol_cost', optional_param('enrol_cost', 5, PARAM_INT));
+ if (($cost = optional_param('enrol_cost', 5, PARAM_INT)) > 0) {
+ set_config('enrol_cost', $cost);
+ }
set_config('enrol_currency', optional_param('enrol_currency', 'USD', PARAM_ALPHA));
set_config('enrol_mailstudents', optional_param('enrol_mailstudents', 0, PARAM_BOOL));
set_config('enrol_mailteachers', optional_param('enrol_mailteachers', 0, PARAM_BOOL));

0 comments on commit 8fd49aa

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