cancel
Showing results for 
Search instead for 
Did you mean: 
Surveyor

Access Module Progress for Students Via API endpoint

Jump to solution

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

Accepted Solutions

tylerweldon@uab.edu,

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

5 Replies
Navigator

tylerweldon@uab.edu,

I'm pretty sure it's not through the API. I don't see it in the routes.rb file or the API documentation.

However, the information contained in it is available in JSON form with GET /courses/xxx/modules/progressions.json

The problem is that you would need to be inside the browser to get it. That's a trick I did with Obtaining and using Access Report data for an entire course‌. If you really need it through the API, you might be able to set up a headless browser and do it that way.

Thanks James, 

I am going to check that out. What I am trying to do is develop an LTI that would develop a badge like certificate once the user completes all the modules.  The reason I am developing it instead of using an existing one is because the certificate design is very specific and it needs to be emailed to several people once its complete.  Do you have any experience tracking users and determining when they have completed the course?

tylerweldon@uab.edu,

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

james@richland.edu‌ thanks so much for this! Yesterday, I had a similar thought of including a button that the user had to to click to generate their certificate. I could then use that same button to email those who need the notification. Also what language did you use to develop the LTI?  I am currently using the PHP and the BLTI libraries.  Just wondering if there were any other PHP libraries out there I should consider. 

tylerweldon@uab.edu, I'm using a customized version of the PHP BLTI library. I added a class for just our institution so I didn't have to keep writing the same code over and over and I think I also fixed the coding so it didn't throw warnings or errors to the Apache server.

Depending on the certificate, you may need one of the PHP PDF libraries.