mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
Merge branch 'MDL-65243-master' of git://github.com/mihailges/moodle
This commit is contained in:
commit
4e202d91e7
@ -233,13 +233,16 @@ function badges_calculate_message_schedule($schedule) {
|
||||
|
||||
switch ($schedule) {
|
||||
case BADGE_MESSAGE_DAILY:
|
||||
$nextcron = time() + 60 * 60 * 24;
|
||||
$tomorrow = new DateTime("1 day", core_date::get_server_timezone_object());
|
||||
$nextcron = $tomorrow->getTimestamp();
|
||||
break;
|
||||
case BADGE_MESSAGE_WEEKLY:
|
||||
$nextcron = time() + 60 * 60 * 24 * 7;
|
||||
$nextweek = new DateTime("1 week", core_date::get_server_timezone_object());
|
||||
$nextcron = $nextweek->getTimestamp();
|
||||
break;
|
||||
case BADGE_MESSAGE_MONTHLY:
|
||||
$nextcron = time() + 60 * 60 * 24 * 7 * 30;
|
||||
$nextmonth = new DateTime("1 month", core_date::get_server_timezone_object());
|
||||
$nextcron = $nextmonth->getTimestamp();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user