Skip to content

Commit

Permalink
New string: costdefaultdesc
Browse files Browse the repository at this point in the history
<strong>In course settings, enter -1</strong> to cost field to use this default cost.
  • Loading branch information
ethem committed Jul 25, 2006
1 parent d91f797 commit 8fd49aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enrol/authorize/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
4 changes: 3 additions & 1 deletion enrol/authorize/enrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 8fd49aa

Please sign in to comment.