Access Module Progress for Students Via API endpoint

Jump to solution
tylerweldon
Community Contributor

In the canvas module page, there is a button that displays progress of modules for each students.  Does anyone know if I can access that via an API endpoint? 

1 Solution

 @tylerweldon ,

No and yes. I don't track them, but I do know when they complete the course.

Our mandatory student Canvas orientation is set up this way. They must complete the modules and then take a final quiz. Passage of that final quiz signifies completion of the course. I've got an external tool setup using LTI that they can click on that immediately writes completion to our database. For those who don't click on the link, they've still technically completed the course because they passed the quiz, so I go through and query submissions on the ID for that final quiz and then mark anyone with a high enough submission score as completing the course in our database. Every 20 minutes, a script runs that checks for submissions and then updates the SIS imports to move people who have passed the orientation into their real course (previously they only course they could access was the orientation course).

Either one of those (LTI or API-calling script) could be setup to email people if it was needed, but it's not in our case.

Even though we use a quiz, it doesn't have to be. Anything that generates a submission would work, but you could decide to just make the LTI thing the end of course and not have to mess with submissions. We just didn't want people to have to click on the link and since our LTI is housed on a local server, I didn't want people to suffer if Canvas was up but the server or our institution was without Internet.

I will mention that I scoured the API documentation and found something -- even though it sounds like it's not what you're after now that you've explained more.I thought you were looking for the contents of the entire page.

There is a course_progress option that can be returned with a course list for a user. But it's for a single user, so you'd need to call it for every student you wanted to check, it returns all of the user's courses, and doesn't have as much information as the page within Canvas. However, the information it contains could be used for checking to see if they have completed all of the requirements by checking to see if requirement_count == requirement_completed_count or probably checking completed_at for a non-null value.

229137_2017-04-20_19-29-04.png

Another possibility coming down the line at some point is the Canvas Live Event data. It's in Beta and documentation was created March 17 and then mysteriously pulled around April 14 (or at least someone decided I shouldn't be authorized for it). It's kind of like triggers and it writes data to an Amazon SQS queue that you can then access and one of the events that is written is whenever someone submits an assignment. You would have to monitor the queue, but Canvas sends the notification right away.

Of those, the LTI is the best way to provide an instantaneous solution.

View solution in original post