Merged from 16stable.

This commit is contained in:
ethem 2006-07-25 17:38:32 +00:00
parent b585dc5fcb
commit 36e5d9b7e1
3 changed files with 6 additions and 4 deletions

View File

@ -10,8 +10,8 @@ define('AN_ERROR', '3');
define('AN_DELIM', '|');
define('AN_ENCAP', '"');
require_once('const.php');
require_once('enrol.php');
require_once($CFG->dirroot.'/enrol/authorize/const.php');
require_once($CFG->dirroot.'/enrol/authorize/enrol.php');
/**
* Gets settlement date and time

View File

@ -48,7 +48,7 @@ if (!isset($frm->acceptccs)) {
<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 File

@ -466,7 +466,9 @@ class enrolment_plugin_authorize
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));