How to send grade data through my own External Tool?

Jump to solution
Community Novice


I've created an External Tool in Canvas and I want to use its result to pass back as a grade to a specific assignment.

I've found this official tutorial but I get stacked: Canvas LMS REST API Documentation .

I don't get how it works. I mean, in what moment will the xml be created containing the data with the 'ext_outcome_data_values_accepted'. It uses two parameters: url and text.

What I understand is: the url parameter is used as the place I have to send my text containing the grade. Am I right? In this case, the url must be somewhere Canvas will treat my data, but what is this specific url?

Somebody has made something like this already? I need some help with this because I'm tired of trying figure out how the tutorial means.



Labels (1)
1 Solution
Community Champion

I can see why you're frustrated. The documentation at EduApps is much better for understanding the process than the API docs you listed. Canvas also has information, some of it duplicated on EduApps, on their Canvas Dev & Friends site.

The second big piece is to find libraries for your particular programming language that will do OAUTH and LTI and not to worry about the XML code on the page you referred to. I found one for PHP, cleaned it up to remove the warnings, and stripped it down to do just the basics of returning a score to Canvas, rather than the full implementation. I removed the part about storing the OAuth to a database and just created a session instead. I then extended their basic LTI class to add specifics about our college and a function called postGrade() that populates the four parameters and makes the call from the library.

One thing that was crucial for me was dumping the data that comes from Canvas to the LTI so I could see what was available.

Once you find the right libraries, it's not nearly as complicated as the official docs make it out to be.

View solution in original post