From 62dc7b2639e6807be145e0acfb297420f5aeb973 Mon Sep 17 00:00:00 2001 From: Henning Bostelmann Date: Fri, 25 Aug 2023 12:11:55 +0100 Subject: [PATCH] CONTRIB-9345 fix deprecated functions in cron --- classes/task/send_reminders.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/task/send_reminders.php b/classes/task/send_reminders.php index fdc48ec5..100a1b0e 100644 --- a/classes/task/send_reminders.php +++ b/classes/task/send_reminders.php @@ -74,12 +74,12 @@ public function execute() { // Send reminder to all students in the slot. foreach ($slotm->get_appointments() as $appointment) { - $student = $DB->get_record('user', array('id' => $appointment->studentid)); - cron_setup_user($student, $course); + $student = \core_user::get_user($appointment->studentid); + \core\cron::setup_user($student, $course); \scheduler_messenger::send_slot_notification($slotm, 'reminder', 'reminder', $teacher, $student, $teacher, $student, $course); } } - cron_setup_user(); + \core\cron::setup_user(); } }