Sync Your Moodle Calendar to Google Calendar
These steps are specifically for syncing to Google Calendar, but the process is very similar for other calendar apps. The Export file is an ICS file so it could be added to any calendar that supports them, like MacOS Calendar.app or Microsoft Outlook.
Instructions
1 Login to Moodle
Login to Moodle. Scroll down to the Calendar block in the center of your Dashboard. It may be at the very bottom of the page.
2 Export Your Calendar
At the bottom of your calendar, select the Import or export calendars link. Then select the blue Export calendar button.
3 Choose Your Settings
Select the export settings you want. We recommend choosing All events and Recent and next 60 days on this page, then selecting Get Calendar URL.
Events to export lets you export only certain types of events from Moodle. For instance, you may choose to export only Events related to courses (which will include assignment due dates) as opposed to everything. The other event categories are rarely used at CCA.
Time period determines how far into the future you want your calendar to sync events from Moodle. You could, for instance, only export events from this month or you could specify a custom range which includes the next two years.
Finally, the two buttons at the bottom are different types of exports. The Calendar URL lets you set up a persistent sync; your calendar will continually pull data from the URL, meaning that new and changed events will stay up to date. The Export button creates a file that is a snapshot of your calendar. The Export will not stay up to date and events added after the export will not be included.
If you do a URL export, Moodle provides a handy Copy URL button for you, because you will need the URL in the next step.

4 Add a new calendar to Google
Go to Google Calendar. Click the plus + icon next to Other Calendars to add a new calendar.
If you chose the URL export, select From URL and paste the URL.
If you chose an Export file, select Import and then upload the file.
Select Add Calendar when you're done. The new calendar will show up under your list of Other Calendars.

Additional Details & FAQs
Calendars take hours to reflects changes
If you choose a URL export, then your calendar application will need to periodically pull fresh events data from Moodle. This schedule depends on the app and it can take up to several hours for changes to appear. Some calendar apps may let you manually refresh their data.
You can rename the Google Calendar after it's made
Your new Google Calendar will be named after the URL or file that created it, but you can hover over it in your list of calendars, select the vertical ellipsis ⋮, then Settings where you can change the calendar's Name.
You cannot export a calendar for a single course
While Moodle lets you export only events related to courses, it does not let you choose a specific course or set of courses.
URL exports will continually update even if you choose "this week", "this month", etc.
It can be confusing, but by creating a URL calendar export for "this month", Moodle will keep providing the current month's events even as time passes. So, on the first of a new month, your Moodle calendar events for that month will appear (after the few hours lag mentioned above) but ones for the next month won't yet.