cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vmiletic
Community Member

Automatically grading quizzes with an external tool

Suppose I want to have an quiz in Canvas, where each question (let's say Essay or File Upload type to start somewhere) is graded by an external software tool. I'm curious about two things for this scenario:

  1. Can I get Canvas to call the external software tool via some kind of API upon student's submission and get the response and use it for grading the question? If yes, can I do so without modifying the source code, i.e. by writing an extension of sorts?
  2. Should I instead get an external tool to use Canvas API to grade the submitted answers (this Quiz Submissions - Canvas LMS REST API Documentation  if I understand correctly)? Can I use this API on https://canvas.instructure.com/ , i.e. without self-hosting?

Thanks in advance.

Labels (1)
10 Replies
maguire
Community Champion

For 2, you need somewhere to run your program that uses the API to get the submissions. This could be in a local machine or the cloud.

The key question is when should your program fetch the submissions to grade them;? Alternatives: check periodically, user-triggered (either the user taking the quiz or the teacher triggering a check for new submissions to be graded), or try to use webhooks to get a notification that there has been a new submission. An external script can easily check for submitted but ungraded submissions. For an example of getting the ungraded submission information, see https://github.com/gqmaguirejr/Canvas-tools/blob/master/list_ungraded_submissions_in_your_courses_JS... 

A third approach is actually to do the grading in real-time via a LTI application that realizes the quiz - in this case, the user can get feedback on a per question basis. Additionally, you can have a dynamic path through the questions where you can ask different questions depending upon the user's answer to the previous question. For this approach, you need somewhere to run the LTI tool.

So a lot depends upon what time scale you want to operate on.