Urgent: Canvas API Submissions grading and comments not working

604 views
Skip to first unread message

Bryan Holladay

unread,
Jul 6, 2015, 2:51:04 PM7/6/15
to canvas-lms...@googlegroups.com
We have noticed that our API submissions and comments integration is throwing a 404 error just recently. Was there a change in the API with the latest release [1]? We haven't changed anything on our side and it is following the API requirements [2]. For example:

PUT:

{
errors
[
1]
0:  
{
message: "The specified resource does not exist."
}
-
-
error_report_id49209055
}


I have verified that the course ID, assignment ID and user ID all exist and that the access token is correct (e.g. I can use that same access token to get roster information). The only thing I could think of is that I never technically submit anything to Canvas through the API for users. I simply just sync the grades and comments. In the past, this was never an issue, but seems to have just came up.

Thanks,
Bryan

Bryan Holladay

unread,
Jul 6, 2015, 7:37:33 PM7/6/15
to canvas-lms...@googlegroups.com
The user exists according to the canvas api:


while(1);{"id":4041918,"name":"Bryan Holladay","sortable_name":"Holladay, Bryan","short_name":"Bryan Holladay","login_id":"x...@111.com","avatar_url":"https://secure.gravatar.com/avatar/b01a19c1a206aaeee28574b31d642c65?s=50\u0026d=https%3A%2F%2Fcanvas.instructure.com%2Fimages%2Fmessages%2Favatar-50.png","locale":null,"permissions":{"can_update_name":true,"can_update_avatar":true}}

And that user is in the course roster:


while(1);[{"id":4247772,"name":"Derek","sortable_name":"Derek","short_name":"Derek","login_id":"11@11"},{"id":4491930,"name":"1...@11.com","sortable_name":"x...@11.com","short_name":"1...@11.com","login_id":"x...@11.com"},{"id":4041918,"name":"Bryan Holladay","sortable_name":"Holladay, Bryan","short_name":"Bryan Holladay","login_id":"1...@11.com"},{"id":4238388,"name":"Bryan Holladay","sortable_name":"Holladay, Bryan","short_name":"Bryan Holladay","login_id":"1...@11.com"},{"id":4247770,"name":"Derek Ramsey","sortable_name":"Ramsey, Derek","short_name":"Derek Ramsey","login_id":"1...@11.com"}]



I manually graded a different user and that shows up fine in the submissions list for that course/assignment/user:


while(1);[{"assignment_id":3649294,"attempt":null,"body":null,"excused":false,"grade":"1","grade_matches_current_submission":true,"graded_at":"2015-07-06T23:28:22Z","grader_id":4041918,"id":27798247,"score":1,"submission_type":null,"submitted_at":null,"url":null,"user_id":4491930,"workflow_state":"graded","late":false,"preview_url":"https://canvas.instructure.com/courses/903453/assignments/3649294/submissions/4491930?preview=1\u0026version=1"}]


The issue is with posting a new grade and or comment to a submission that hasn’t been created. This worked in the past and has just recently changed. 

PUT:

{
errors: [1]
0:  {
message: "The specified resource does not exist."
}
-
-
error_report_id: 49209055
}


If I do the exact command with the user ID of the student I manually entered a grade (e.g. a current grade exists), then it works fine:

PUT:

{
assignment_id: 3649294
attempt: null
body: null
excused: false
grade: "5"
grade_matches_current_submission: true
graded_at: "2015-07-06T23:33:44Z"
...
}

This shows that the PUT command to change the grade or comment only works if there is an existing submission. If not, then it throws a 404 error.

Thanks,
Bryan

Simon Williams

unread,
Jul 7, 2015, 9:45:04 AM7/7/15
to canvas-lms...@googlegroups.com
Looks like the user (id 4041918) is a teacher in that course, which is why he cannot be graded for a submission.

Simon

--
You received this message because you are subscribed to the Google Groups "Canvas LMS API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-api-u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages