gradereport_overview_get_course_grades
This function retrieves an overview of all final course grades for a specific user.
Let's review the POST parameters for this function:
- Optional Parameter:
userid
= int (Optional: The numeric ID of the user. If omitted, it returns grades for the user associated with the API token.)
cURL Command Example (Getting a User's Course Grades):
core_grades_update_grades
This function updates the grade for a specific activity (like an assignment or quiz) for one or more students.
Let's review the POST parameters for this function:
- Required Parameters:
source
= string (Required: A string identifying the source of the grade update, e.g., 'externalimporter'.)courseid
= int (Required: The numeric ID of the course.)component
= string (Required: The component type, e.g., 'mod_assign' for an assignment.)activityid
= int (Required: The numeric ID of the specific activity instance.)itemnumber
= int (Required: The grade item index, which is typically 0.)grades[0][studentid]
= int (Required: The numeric ID of the student being graded.)grades[0][grade]
= double (Required: The numeric grade to be assigned.)
- Optional Parameter:
grades[0][str_feedback]
= string (Optional: Text-based feedback for the student.)
cURL Command Example (Updating a Student's Grade):
mod_assign_get_grades
This function retrieves all student grades for one or more specific assignments.
Let's review the POST parameters for this function:
- Required Parameter:
assignmentids[0]
= int (Required: The numeric ID of an assignment. Pass multiple to get grades for several assignments.)
- Optional Parameter:
since
= int (Optional: A Unix timestamp to filter for grades that were modified after this time.)
cURL Command Example (Getting Assignment Grades):
mod_quiz_get_user_best_grade
This function retrieves the highest grade a user has achieved on a specific quiz.
Let's review the POST parameters for this function:
- Required Parameter:
quizid
= int (Required: The numeric ID of the quiz instance.)
- Optional Parameter:
userid
= int (Optional: The numeric ID of the user. If omitted, it checks the user associated with the API token.)
cURL Command Example (Getting a User's Best Quiz Grade):