From 71492cade6af1ae4bdfe866d2f0ce70ce0c2683d Mon Sep 17 00:00:00 2001 From: L_DA Date: Sun, 11 Oct 2020 19:42:53 +0200 Subject: [PATCH] show new week timetable on sunday --- block_timetable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block_timetable.php b/block_timetable.php index 40a4d90..4338613 100644 --- a/block_timetable.php +++ b/block_timetable.php @@ -89,9 +89,9 @@ class block_timetable extends block_base { $today = new \DateTime(); $week = $today->format("W"); $dayofweek = $today->format('w'); - if ($dayofweek > 5 + get_config('timetable', 'saturday')) { + if ($dayofweek > 5 + get_config('timetable', 'saturday') || ($dayofweek == 0)) { $week++; - } + } //$ttable = new \mod_timetable\timetable('teacher','Da'); $ttable->read_db($week);