Merge branch 'MDL-58497-master' of git://github.com/ankitagarwal/moodle
[moodle.git] / mod / forum / lib.php
index 1ed8ef2..9a07d66 100644 (file)
@@ -8214,9 +8214,7 @@ function mod_forum_core_calendar_provide_event_action(calendar_event $event,
         return null;
     }
 
-    $course = new stdClass();
-    $course->id = $event->courseid;
-    $completion = new \completion_info($course);
+    $completion = new \completion_info($cm->get_course());
 
     $completiondata = $completion->get_data($cm, false);