Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Researchers at the University of Michigan would like to perform AI analysis of the comments left by reviewers in Canvas' Peer Review feature. After browsing through the Canvas API documentation and exploring the Canvas live API, I've not been able to find an API function that will let us access those comments.
Does an API function exist for reading peer review comments?
I've found that the API will show me who has been assigned to review each author's submissions, but I can't find the review comments. The only comments I've been able to access are the submission comments, but those are made by the instructor/TA only, they don't include peer review comments.
Hello, I'm able to get the peer review comments using the following API call:
<instance>/api/v1/courses/course_id/assignments/assignment_id/peer_reviews?include[]=submission_comments&include[]=user&per_page=100
I have several test users, some of which did a peer review and others did not. The ones who did give a peer review had their comments display under submission_comments, snippet:
"submission_comments": [
{
"id": 39838916,
"comment": "Peer review comment from osp5",
"author_id": 5820048,
"author_name": "OSP Five",
"created_at": "2022-12-05T19:23:15Z",
"edited_at": null,
"avatar_path": "/images/users/5820048-0ae2d77379",
"author": {
"id": 5820048,
"anonymous_id": "3gqs0",
"display_name": "OSP Five",
Thank you for the response.
However, when I use that API function, the only comments returned are the submission comments, which are comments entered by the instructor/TA on the submission document(s).
The comments I need are the reviewer (apparently known as "assessor" in Canvas terminology) comments. I've been discussing this with a colleague and he's come across a possible solution: https://canvas.instructure.com/doc/api/rubrics.html#method.rubrics_api.show
That is, the rubrics function with very specific flags…
/api/v1/courses/:course_id/rubrics/:id?include[]=peer_assessments&style=full
The specific combination of `include[]` and `style` flags may be what I have been missing. I will investigate further and give an update soon.
If you try the call out, you will see it does show the assessor's comments. Here is the full json returned for that user (with some items removed):
osp2 is the student who submitted while osp5 is the student who did the peer review
Notice "comment": "Peer review comment from osp5",
You should be able top reproduce this with a test course and test users
{
"id": 952830,
"user_id": 4578824,
"asset_id": 315900095,
"asset_type": "Submission",
"workflow_state": "completed",
"assessor_id": 5820048,
"user": {
"id": 4578824,
"anonymous_id": "2q51k",
"display_name": "OSP Two",
"avatar_image_url": "REMOVED",
"html_url": "REMOVED",
"pronouns": null
},
"assessor": {
"id": 5820048,
"anonymous_id": "3gqs0",
"display_name": "OSP Five",
"avatar_image_url": "REMOVED",
"html_url": "REMOVED",
"pronouns": null
},
"submission_comments": [
{
"id": 39838916,
"comment": "Peer review comment from osp5",
"author_id": 5820048,
"author_name": "OSP Five",
"created_at": "2022-12-05T19:23:15Z",
"edited_at": null,
"avatar_path": "/images/users/5820048-0ae2d77379",
"author": {
"id": 5820048,
"anonymous_id": "3gqs0",
"display_name": "OSP Five",
"avatar_image_url": "REMOVED",
"html_url": "REMOVED",
"pronouns": null
}
}
]
}
I'm attempting to do the same thing so I can validate the submission time and run the peer review comments through AI detection. It would be helpful to see how the raw can get exposed. Maybe it's obvious to others or maybe the functionality does not yet exist through the API. Any tips?
To participate in the Instructure Community, you need to sign up or log in:
Sign In