]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from 16stable.
authorethem <ethem>
Tue, 25 Jul 2006 17:38:32 +0000 (17:38 +0000)
committerethem <ethem>
Tue, 25 Jul 2006 17:38:32 +0000 (17:38 +0000)
enrol/authorize/authorizenetlib.php
enrol/authorize/config.html
enrol/authorize/enrol.php

index e6e01696d0a8e8d9ddb72087a20cb697d84075d6..fa9e55ae41f55399029c6957179b6e0f41ce9cbe 100644 (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
index 71b096b8e16214a5916d2441b15ac09a5e1bb09e..5774fec9d80e246240d9bd90489b9953c5731cf4 100755 (executable)
@@ -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">
index 57398cea78692dbbde4348cd2a26d41db8f0f4b7..266562b81c5cb45782849998ae7e16d9692b005d 100755 (executable)
@@ -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));