Permalink
Browse files

*** empty log message ***

  • Loading branch information...
1 parent 4e90287 commit 682811e048f629580ccf3763a759d1d1a0c3c383 ethem committed Aug 24, 2005
Showing with 37 additions and 1 deletion.
  1. +20 −0 enrol/authorize/config.html
  2. +17 −1 enrol/authorize/enrol.php
@@ -94,6 +94,26 @@
</td>
</tr>
+<tr valign="top">
+ <td align="right">an_review:</td>
+ <td>
+ <input type="checkbox" value="1" name="an_review" <?php if (!empty($frm->an_review)) echo "checked=\"true\"" ?> />
+ </td>
+ <td>
+ <?php print_string("adminreview", "enrol_authorize") ?>
+ </td>
+</tr>
+<tr valign="top">
+ <td align="right">an_review_day:</td>
+ <td>
+ <input type="text" name="an_review_day" size="1" maxlength="1" value="<?php p($frm->an_review_day) ?>" />
+ </td>
+ <td>
+ <?php
+ print_string("reviewday", "enrol_authorize", $frm->an_review_day) ?>
+ </td>
+</tr>
+
<tr valign="top"><td colspan="3"><hr noshade="noshade" size="1"></td></tr>
<tr valign="top">
@@ -318,7 +318,7 @@ function get_access_icons($course) {
function config_form($frm) {
global $CFG;
- $vars = array('an_login', 'an_tran_key', 'an_password', 'an_referer', 'an_test',
+ $vars = array('an_login', 'an_tran_key', 'an_password', 'an_referer', 'an_test', 'an_review', 'an_review_day',
'enrol_cost', 'enrol_currency', 'enrol_mailstudents', 'enrol_mailteachers', 'enrol_mailadmins');
foreach ($vars as $var) {
@@ -381,6 +381,13 @@ function process_config($config) {
$test_val = optional_param('an_test', '');
set_config('an_test', $test_val);
+ $review_val = optional_param('an_review', '');
+ set_config('an_review', $review_val);
+
+ $review_day_val = optional_param('an_review_day', 5, PARAM_INT);
+ if ($review_day_val > 7) $review_day_val = 7;
+ set_config('an_review_day', $review_day_val);
+
$referer_val = optional_param('an_referer', 'http://', PARAM_URL);
set_config('an_referer', $referer_val);
@@ -423,5 +430,14 @@ function check_openssl_loaded() {
return extension_loaded('openssl');
}
+function cron() {
+ global $CFG;
+ parent::cron();
+
+ if ( empty($CFG->an_review) || empty($CFG->an_review_day) || $CFG->an_review_day==0 )
+ return;
+
+}
+
} // end of class definition
?>

0 comments on commit 682811e

Please sign in to comment.