Actions20
- User Actions
- Course Actions
- Enrollment Actions
- Grade Actions
- Message Actions
Overview
This node integrates with the Moodle Learning Management System (LMS) to perform various operations related to users, courses, enrollments, grades, messages, and system information. Specifically, for the Grade resource with the Get User Course Grades operation, it retrieves an overview of all course grades for a specified user.
This is useful in scenarios where you want to programmatically fetch a summary of a user's performance across their enrolled courses in Moodle. For example, an educational platform could use this node to pull grade data for reporting dashboards, automate notifications based on grades, or synchronize grade information with other systems.
Properties
Name | Meaning |
---|---|
User ID | The numeric ID of the user whose course grades you want to retrieve. |
Output
The output JSON contains an object with the following structure:
userid
: The ID of the user for whom grades were requested.grades
: An array of objects, each representing a course grade overview for one course. Each item typically includes course details and the user's grade information.message
(optional): A message string that appears if no grades are found or if there might be issues such as:- The user is not enrolled in any courses.
- No grades have been entered yet.
- Grades are hidden or permissions restrict access.
Example output snippet:
{
"userid": 123,
"grades": [
{
"courseid": 456,
"coursename": "Introduction to Biology",
"grade": "85%",
...
},
...
],
"message": "No course grades found. Make sure: 1) User is enrolled in courses, 2) Grades have been entered, 3) Grades are visible to students"
}
If no grades exist or cannot be retrieved, the grades
array will be empty, and a descriptive message will be provided.
Dependencies
- Requires a valid connection to a Moodle instance with API access enabled.
- Needs an API key credential configured in n8n for authenticating requests to Moodle's web services.
- The Moodle site must have the relevant web service functions enabled, specifically
gradereport_overview_get_course_grades
.
Troubleshooting
No grades returned / empty grades array:
This can happen if the user is not enrolled in any courses, no grades have been entered, grades are hidden from the user, or the API user lacks permission to view grades. Verify user enrollment, grade visibility settings, and API permissions.API errors or permission denied:
Ensure the API key has sufficient privileges and the Moodle web service functions required by this node are enabled.Invalid User ID:
If the provided User ID does not exist in Moodle, the response may be empty or contain an error. Confirm the User ID is correct.Moodle version compatibility:
Some features require certain Moodle versions. Check your Moodle version supports thegradereport_overview_get_course_grades
function.
Links and References
- Moodle Web Services API Documentation
- Grade Report Overview API (
gradereport_overview_get_course_grades
) - Moodle REST API Setup Guide
This summary focuses exclusively on the Grade resource's Get User Course Grades operation as requested.