From d864c083c222c2bdf33dcff4f47269e32c5efb4e Mon Sep 17 00:00:00 2001 From: ethem Date: Tue, 13 Jun 2006 15:24:28 +0000 Subject: [PATCH] Predict the time of settlement at first time. Probably, admin user set up own country timezone and we can use this time as settlement time. Function used: get_user_timezone_offset() --- enrol/authorize/config.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/enrol/authorize/config.html b/enrol/authorize/config.html index 21065bc48b2..80ef1a1fdfe 100755 --- a/enrol/authorize/config.html +++ b/enrol/authorize/config.html @@ -18,11 +18,14 @@ if (!isset($frm->an_emailexpired)) $frm->an_emailexpired = '2'; if (!isset($frm->an_teachermanagepay)) $frm->an_teachermanagepay = ''; if (isset($CFG->an_cutoff)) { - $frm->an_cutoff_hour = intval($CFG->an_cutoff) / 60; - $frm->an_cutoff_min = intval($CFG->an_cutoff) % 60; + $cutoff = intval($CFG->an_cutoff); + $mins = $cutoff % 60; $hrs = ($cutoff - $mins) / 60; + $frm->an_cutoff_hour = $hrs; $frm->an_cutoff_min = $mins; +} +if (!isset($frm->an_cutoff_hour)) { + $frm->an_cutoff_hour = get_user_timezone_offset(); + $frm->an_cutoff_min = 5; } -if (!isset($frm->an_cutoff_hour)) $frm->an_cutoff_hour = '0'; -if (!isset($frm->an_cutoff_min)) $frm->an_cutoff_min = '5'; if (!isset($frm->acceptccs)) { $frm->acceptccs = array_keys(get_list_of_creditcards());