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.
This commit is contained in:
+4
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user