@mvanmatre
You're not the first person with these concerns. Normally, they end up in the developer's group. There are some good tutorials on getting started there. I would also recommend @robotcars excellent document Awesome CanvasLMS. Robert has gone through and compiled some of the really good resources all in one place.
None of them will likely solve your exact problem, though. Much of what is written there is akin to give a man a fish (solve the exact problem) and you feed him for a day, teach a man to fish (explain the how things work) and you feed him for a lifetime.
There's also a lot of in-depth discussion about very technical things that are not intuitively obvious (to a programmer who does this for a living). That means that straight-forward things don't get written about much.
API pushes aren't talked much because that's not Canvas specific. Using a REST API isn't Canvas specific. All of the popular programming languages support network requests (or they wouldn't be popular). You can even use batch jobs with windows or Linux that make cURL requests, but I would suggest using a programming language that you are familiar with already. Operating systems allow scheduling events (through cron jobs or Windows Task Scheduler). If you get a program written that does what you need it to do, then the push part is just to schedule that task.
As to the specifics of your situation, are you trying to get a report out of Dropout Detective or Canvas? I use Dropout Detective as an instructor and I heard through the grapevine that they have an API for getting some information in and out of their system, but I am not familiar with that. For Canvas, you would want to look at the submission data. There is no single report that I'm aware of that tells you all of the missing grades or zeros, you would need to iterate through every course within the subaccount and then get a list of the submissions.
I have script that I run each night that fetches all of the submission data for all of the students in the current courses. I do this for a different early alert system we use (personally, I find Dropout Detective a lot more useful as a teacher and on the back-end, they get all of this information for us rather than me having to maintain the code to fetch it.) We're a small school, but last night it took 11:50 minutes and 3801 API calls to fetch all of the information. I am fetching more than just the missing and 0 grades, though.
There are a couple of ways to approach this.
The first is using the REST API.
- Use the List active courses in an account endpoint of the Accounts API to get a list of all courses within your subaccount. You may be able narrow it down some by using of the parameters.
- For each course you just obtained, use the List submissions for multiple assignments endpoint of the Submissions API to get a list of all the grades for the current students for the course. Use the student_ids[]=all parameter. Another nice thing about this is, if you make a local copy of the data, you can use the submitted_since and graded_since parameters to greatly reduce the time it takes to fetch the information.
The second is to use GraphQL, although you will still need to invoke it through the REST API if you want to automate it. Once nice thing is that there is a graphical interface that you can play around with to get the query correct before you automate it using the GraphQL API within the REST API. That's good, because the GraphQL interface isn't as well documented as the REST API. You can get to it by adding /graphiql to the end of your main Canvas URL.
For example, paste this into the editor under /graphiql and replace the 12345 with your subaccount ID and this will fetch the missing and score fields for all students and all assignments within all courses within that account. The first:2 is to limit it to 2 courses. With this project, you will need to use pagination, there's just too much data to fetch it all in single API requests. How much you can download at one time depends on the sizes of your courses, number of courses, and amount of information fetched.
query allAccountSubmissions {
account(id: "12345") {
id
coursesConnection(first: 2) {
nodes {
submissionsConnection {
nodes {
assignment {
_id
name
}
_id
missing
score
user {
_id
sortableName
}
}
}
_id
courseCode
name
}
}
}
}
Regardless of the technique that you use, all of the data is going to come through in JSON format and you will need to filter it yourself to extract the missing grades and the 0's (use the missing and score fields).
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.