Connect Moodle and match courses and students
Connect your Moodle site with a web services token, match Moodle courses to Cohort course codes, test the link and pull grades in.
The written steps below are complete. Producing the video? Use the video script tab — it follows these steps one for one.
Once Moodle is connected, Cohort pulls each student's course grades into their transcript. Students are matched by email address, and Moodle courses are matched to Cohort courses by course code: set each Moodle course's ID number to the matching Cohort course code. After setup, grades come in every night for current students; this lesson covers the connection and the matching.
By the end you can
- Create a Moodle web services token
- Connect Moodle and test the connection
- Match Moodle courses and students to Cohort
- Pull every student's grades in on demand
Before you start
- An Owner or Admin login in Cohort
- A Moodle site administrator login
- Your Cohort course codes (Courses in the sidebar)
Step by step
- 1
Turn on web services in Moodle
In Moodle, go to Site administration → Advanced features and enable web services. Then go to Server → Web services → Manage protocols and enable REST.
You should see: Web services and the REST protocol are enabled in Moodle.
- 2
Create a token in Moodle
In Moodle, go to Site administration → Server → Web services → Manage tokens and create a token for a service that includes the grade functions.
You should see: Moodle shows a long token. Copy it.
The service needs core_webservice_get_site_info, core_user_get_users, core_enrol_get_users_courses and gradereport_user_get_grade_items.
- 3
Match course codes
In each Moodle course's settings, set Course ID number to the Cohort course code, for example PSW-01.
You should see: Each Moodle course carries the same code as its Cohort course.
Small differences such as PSW001 and PSW-01 still match.
- 4
Open Moodle settings in Cohort
/settingsIn Settings, click Connect Moodle in the Moodle integration card.
You should see: A page titled Moodle integration with a Connection card and a Sync all grades card.
- 5
Enter the URL and token
/settings/moodleType your Moodle site URL (for example https://moodle.lakeshorecollege.ca), paste the Web Services token, and tick Enable Moodle grade sync.
You should see: The URL and token boxes are filled in and the box is ticked.
- 6
Save
/settings/moodleClick Save.
You should see: The token box now shows •••••••• (saved — leave blank to keep).
- 7
Test the connection
/settings/moodleClick Test connection.
You should see: Connected to followed by your Moodle site's name.
- 8
Pull grades in now
/settings/moodleClick Sync all students' grades now.
You should see: A message such as Synced 120 grades across 30 students. and, if some couldn't be matched, a list under No grades pulled for: with the reason.
Tips
- Each student's email in Cohort must be the same as their Moodle email. That is how Cohort finds them.
- Each click covers 250 students. With more than that, a Continue with the next batch button appears — click it until it disappears.
- The last result stays on the page as Last sync:.
- To change the token later, paste a new one and Save. Leave the box blank to keep the saved token.
Troubleshooting
- It says Enter the Moodle URL and token, then Save first.
- Fill in both boxes and click Save before Test connection.
- It says Moodle refused the request (HTTP …).
- In Moodle check that web services and REST are enabled, the token is valid, its service includes the grade functions, and no firewall is blocking Cohort.
- A student is listed as no Moodle account for their email.
- Their email in Cohort doesn't match any Moodle user. Correct the email on the student's record or in Moodle, then sync again.
- A student is listed as no email on file.
- Add the student's email to their Cohort record.
- A course's grades never come through.
- The Moodle course's ID number doesn't match a Cohort course the student is enrolled in. Set it to the Cohort course code.
- The sync button is greyed out with Connect and enable Moodle above first.
- Tick Enable Moodle grade sync, click Save, and try again.
Shot list for recording this lesson — about 2:32 long. Record in a sample college with made-up students only, and follow the recording standards.
- 0:00Title card
- Show
- Title Connect Moodle and match courses and students over the Cohort logo, then the first screen with sample data.
- Say
- Connect your Moodle site with a web services token, match Moodle courses to Cohort course codes, test the link and pull grades in. By the end you'll be able to create a Moodle web services token, connect Moodle and test the connection, match Moodle courses and students to Cohort, pull every student's grades in on demand.
- Cut
- When the narration ends.
- 0:26Step 1: Turn on web services in Moodle
- Show
- Do: In Moodle, go to Site administration → Advanced features and enable web services. Then go to Server → Web services → Manage protocols and enable REST.
- Say
- In Moodle, go to Site administration → Advanced features and enable web services. Then go to Server → Web services → Manage protocols and enable REST. Web services and the REST protocol are enabled in Moodle.
- Cut
- Hold on the result until it is clearly visible: Web services and the REST protocol are enabled in Moodle.
- 0:44Step 2: Create a token in Moodle
- Show
- Do: In Moodle, go to Site administration → Server → Web services → Manage tokens and create a token for a service that includes the grade functions.
- Say
- In Moodle, go to Site administration → Server → Web services → Manage tokens and create a token for a service that includes the grade functions. Moodle shows a long token. Copy it.
- Cut
- Hold on the result until it is clearly visible: Moodle shows a long token. Copy it.
- 1:01Step 3: Match course codes
- Show
- Do: In each Moodle course's settings, set Course ID number to the Cohort course code, for example PSW-01.
- Say
- In each Moodle course's settings, set Course ID number to the Cohort course code, for example PSW-01. Each Moodle course carries the same code as its Cohort course.
- Cut
- Hold on the result until it is clearly visible: Each Moodle course carries the same code as its Cohort course.
- 1:16Step 4: Open Moodle settings in Cohort
- Show
- Screen /settings. Do: In Settings, click Connect Moodle in the Moodle integration card.
- Say
- In Settings, click Connect Moodle in the Moodle integration card. A page titled Moodle integration with a Connection card and a Sync all grades card.
- Cut
- Hold on the result until it is clearly visible: A page titled Moodle integration with a Connection card and a Sync all grades card.
- 1:30Step 5: Enter the URL and token
- Show
- Screen /settings/moodle. Do: Type your Moodle site URL (for example https://moodle.lakeshorecollege.ca), paste the Web Services token, and tick Enable Moodle grade sync.
- Say
- Type your Moodle site URL (for example https://moodle.lakeshorecollege.ca), paste the Web Services token, and tick Enable Moodle grade sync. The URL and token boxes are filled in and the box is ticked.
- Cut
- Hold on the result until it is clearly visible: The URL and token boxes are filled in and the box is ticked.
- 1:47Step 6: Save
- Show
- Screen /settings/moodle. Do: Click Save.
- Say
- Click Save. The token box now shows •••••••• (saved — leave blank to keep).
- Cut
- Hold on the result until it is clearly visible: The token box now shows •••••••• (saved — leave blank to keep).
- 1:57Step 7: Test the connection
- Show
- Screen /settings/moodle. Do: Click Test connection.
- Say
- Click Test connection. Connected to followed by your Moodle site's name.
- Cut
- Hold on the result until it is clearly visible: Connected to followed by your Moodle site's name.
- 2:05Step 8: Pull grades in now
- Show
- Screen /settings/moodle. Do: Click Sync all students' grades now.
- Say
- Click Sync all students' grades now. A message such as Synced 120 grades across 30 students. and, if some couldn't be matched, a list under No grades pulled for: with the reason.
- Cut
- Hold on the result until it is clearly visible: A message such as Synced 120 grades across 30 students. and, if some couldn't be matched, a list under No grades pulled for: with the reason.
- 2:22Outro
- Show
- End card: mycohort.org/help/connect-moodle and Start your free 30-day trial — mycohort.org.
- Say
- That's it. The written steps for this lesson are on mycohort.org/help/connect-moodle. To try it on your own college, start your free 30-day trial at mycohort.org.
- Cut
- Hold the end card for 5 seconds.
YouTube chapters: use each shot's time and title. First line of the description: mycohort.org/help/connect-moodle
Related lessons
Connect Moodle once and Cohort pulls each current student's course totals every night. Learn what's matched, what's skipped and how to sync right now.
Print an unofficial transcript from the student's page, or issue the official PDF transcript. Cohort pulls the latest Moodle grades first.
Give your LMS Cohort's LTI 1.3 addresses, register the platform's details in Cohort, and map resource links to Cohort pages.