From 379cd2d4e31b41348d6df5503509a6486bfebbce Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Wed, 17 Jul 2013 02:34:07 +0200 Subject: [PATCH] MDL-40604 Fix 2 uses causing unit test failures There are still a lot of deprecated uses in core that we should move to the new counterparts ASAP. This commit just fixes the 2 deprecated uses that are causing unit tests to fail. --- course/lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/course/lib.php b/course/lib.php index 28cc82af1be..0efc8db3d42 100644 --- a/course/lib.php +++ b/course/lib.php @@ -1427,9 +1427,11 @@ function set_coursemodule_visible($id, $visible) { if ($events = $DB->get_records('event', array('instance'=>$cm->instance, 'modulename'=>$modulename))) { foreach($events as $event) { if ($visible) { - show_event($event); + $event = new calendar_event($event); + $event->toggle_visibility(true); } else { - hide_event($event); + $event = new calendar_event($event); + $event->toggle_visibility(false); } } } -- 2.43.0