From d0be55e05f85093cc025500ff7db3a590c5be2cb Mon Sep 17 00:00:00 2001 From: Matt Davidson Date: Wed, 17 Oct 2018 16:33:23 -0400 Subject: [PATCH] Bug fix Fix optout --- classes/processor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/processor.php b/classes/processor.php index 8c5af7e..c0cc8f1 100644 --- a/classes/processor.php +++ b/classes/processor.php @@ -1171,6 +1171,8 @@ public function optout_course($courseid, $userid = false) { } if ($course = get_course($courseid)) { + $date = new DateTime("now", core_date::get_user_timezone_object()); + $optouttime = $date->getTimestamp(); $config = get_config('tool_coursearchiver'); $course->optoutmonths = $config->optoutmonthssetting; $record = new stdClass();