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:
Eloy Lafuente (stronk7)
2013-07-17 02:34:07 +02:00
parent 6a30b48dff
commit 379cd2d4e3
+4 -2
View File
@@ -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);
}
}
}