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 user management, courses, enrollments, grades, messages, and system information. Specifically, for the Grade resource and the View Grade Report operation, the node marks that a user has viewed their grade report in Moodle. This action is primarily a logging event within Moodle and does not return actual grade data.
Practical Use Case
- When a student views their grade report on Moodle, this node can be used to log that event programmatically.
- Useful for tracking or auditing purposes to know when users have accessed their grade reports.
- Can be integrated into workflows that trigger notifications or further actions after a grade report view.
Properties
| Name | Meaning |
|---|---|
| User ID | The numeric ID of the user whose grade report view is being logged. This is required. |
Output
The output JSON object contains:
success: A boolean indicating if the grade report view was successfully logged.userid: The user ID for whom the grade report view was recorded.message: A confirmation message stating that the grade report was viewed successfully and clarifying that this function only logs the view without returning actual grades.warnings(optional): Any warnings returned by Moodle during the operation.
Example output JSON:
{
"success": true,
"userid": 123,
"message": "Grade report viewed successfully. Note: This function logs the view but does not return actual grades.",
"warnings": []
}
Dependencies
- Requires an active 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 support the
gradereport_overview_view_grade_reportweb service function. - Moodle version should be compatible with this API call (generally Moodle 3.6 or higher recommended).
Troubleshooting
Common Issues:
- If the node throws an error about the web service function being invalid, it likely means the Moodle version does not support the
gradereport_overview_view_grade_reportfunction or the function is not enabled in the Moodle web services configuration. - Permission issues may prevent the user from logging the grade report view.
- Network or authentication errors if the API key or endpoint is misconfigured.
- If the node throws an error about the web service function being invalid, it likely means the Moodle version does not support the
Error Messages:
"Invalid web service function": Check Moodle version and ensure the function is enabled.- Authentication errors: Verify API credentials and permissions.
- Unexpected response or empty results: Confirm the user ID exists and the user has access to grades.
Resolution Tips:
- Ensure the Moodle API user has permission to call the grade report view function.
- Verify the user ID parameter is correct and corresponds to a valid Moodle user.
- Test the API call directly via Moodle's REST interface or another client to confirm availability.
Links and References
- Moodle Web Services API Documentation
- Grade Report Overview API (Moodle)
- Moodle External Functions List (replace with your Moodle URL)
This summary focuses exclusively on the Grade resource and the View Grade Report operation as requested.