Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Predict the time of settlement at first time. Probably, admin user se…

…t up own country timezone and we can use this time as settlement time.

Function used: get_user_timezone_offset()
  • Loading branch information...
commit d864c083c222c2bdf33dcff4f47269e32c5efb4e 1 parent 80970e2
ethem authored

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. +7 4 enrol/authorize/config.html
11 enrol/authorize/config.html
@@ -18,11 +18,14 @@
18 18 if (!isset($frm->an_teachermanagepay)) $frm->an_teachermanagepay = '';
19 19
20 20 if (isset($CFG->an_cutoff)) {
21   - $frm->an_cutoff_hour = intval($CFG->an_cutoff) / 60;
22   - $frm->an_cutoff_min = intval($CFG->an_cutoff) % 60;
  21 + $cutoff = intval($CFG->an_cutoff);
  22 + $mins = $cutoff % 60; $hrs = ($cutoff - $mins) / 60;
  23 + $frm->an_cutoff_hour = $hrs; $frm->an_cutoff_min = $mins;
  24 +}
  25 +if (!isset($frm->an_cutoff_hour)) {
  26 + $frm->an_cutoff_hour = get_user_timezone_offset();
  27 + $frm->an_cutoff_min = 5;
23 28 }
24   -if (!isset($frm->an_cutoff_hour)) $frm->an_cutoff_hour = '0';
25   -if (!isset($frm->an_cutoff_min)) $frm->an_cutoff_min = '5';
26 29
27 30 if (!isset($frm->acceptccs)) {
28 31 $frm->acceptccs = array_keys(get_list_of_creditcards());

0 comments on commit d864c08

Please sign in to comment.
Something went wrong with that request. Please try again.