Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
We are looking for the simplest method to reproduce the information on the student's own view of the gradebook using an API tool. The best we could come up with so far is using this to list all of the assignments for a user in a course.
And then using this to loop through each assignment id from the above list and get the grade from the submissions.
Can anyone think of a better method to generate this exact information with the fewest API calls -- including the weight calculations as seen in Canvas without having to manually recalculate?
Solved! Go to Solution.
A grades object is wrapped within an enrollment object. So if you retrieve an enrollment of that student, look at the grades object, which lists both current and final score of that student: grades, ie:
[{"id": 23, ......
"grades": { "html_url": "https://<canvas-instance>/courses/354/grades/1225", "current_score": 99.02, "current_grade": null, "final_score": 99.02, "final_grade": null },
....}]
method: /v1/users/{user_id}/enrollments
API: Enrollments - Canvas LMS REST API Documentation
Hope that helps.
FWIW, we found the following which gives us the assignments, dates, and points.
Analytics - Canvas LMS REST API Documentation
However, this still doesn't give us the weights and totals. Anybody have a good solution for that?
You may find "weights" here (Canvas LMS REST API Documentation ) :smileylaugh:
Thanks for this lead, Mu. I should clarify, that I'm actually looking for the calculated weights as students see at the bottom of their view of the gradebook. This information is incredibly helpful, but it would require that we do our own offline calculations which opens too many doors for errors. I wish Canvas API would just give us a list of results just like the students get in the GUI. Maybe someday.
A grades object is wrapped within an enrollment object. So if you retrieve an enrollment of that student, look at the grades object, which lists both current and final score of that student: grades, ie:
[{"id": 23, ......
"grades": { "html_url": "https://<canvas-instance>/courses/354/grades/1225", "current_score": 99.02, "current_grade": null, "final_score": 99.02, "final_grade": null },
....}]
method: /v1/users/{user_id}/enrollments
API: Enrollments - Canvas LMS REST API Documentation
Hope that helps.
Can i get grades updated at date with this.
To participate in the Instructure Community, you need to sign up or log in:
Sign In