diff --git a/calendar/tests/privacy_test.php b/calendar/tests/privacy_test.php
index <HASH>..<HASH> 100644
--- a/calendar/tests/privacy_test.php
+++ b/calendar/tests/privacy_test.php
@@ -104,7 +104,7 @@ class core_calendar_privacy_testcase extends provider_testcase {
 
         // Add a Calendar Subscription and Group Calendar Event to Course 3.
         $this->create_test_calendar_subscription('course', 'https://calendar.google.com/', $user->id, 0, $course3->id);
-        $this->create_test_standard_calendar_event('group', $user->id, time(), '', 0, $course1->id, $course3group->id);
+        $this->create_test_standard_calendar_event('group', $user->id, time(), '', 0, $course3->id, $course3group->id);
 
         // The user will be in these contexts.
         $usercontextids = [
MDL-<I> core_calendar: Fix test_get_contexts_for_userid() test

This issue is part of the MDL-<I> Epic.