Posts Tagged ‘canvas tip’

Canvas Tip: Turn API Data into RSS Feeds with Yahoo Pipes

Feb 21, 2012 at 12:35 am, Jared Stein

This is really not a huge thing, but it’s always fun to play with Yahoo! Pipes, and since Instructure makes tons of Canvas data available via its open API, why not combine the two to pull awesome Canvas data out into a usable feed?

The first feed that I built with Pipes takes my Canvas To Do list–you know, the one that I see when I log in reminding me to grade all that amazing student work–and turns it into a RSS feed that I’ve stuck onto my Google Homepage. Here’s the Pipe:

Canvas To Do List as Feed Pipe

Yeah, because even though Canvas automatically sends me a notification, basically whenever I want, reminding me to grade new student submissions, I need all the guilt-inducing reminders I can get these days.

All you need to run this Pipe is the URL of your Canvas instance and an access key, which is a really long string that you can generate from your very own Canvas Profile:

You’ll copy and paste that Access Token into the Access Token field in the Pipe. This essentially enables the Pipe to access all your Canvas To Do list data that’s currently made available through the API. The Pipe then does just a little bit of parsing to create a new feed from that JSON data.

Now, as simple as this Pipe was to build, I have to say it’s still pretty beta, and the source is kind of a mess of different splits. For instance, I haven’t yet figured out how to loop in and concatenate the course name (that requires another Fetch Data source), nor to include the number of items you need to grade in the feed item headline.

But I’m hoping some wandering Yahoo! Pipes guru can suggest the right path. If that happens, I’ll be able to finish my Pipe That Aggregates All Discussion Posts For All Courses Into One Master Feed.

Canvas Tip: Use Browser Add-Ons to Play with the Canvas API

Nov 28, 2011 at 5:30 pm, Jared Stein

This post is for all of you who, like me, have been intrigued by Instructure Canvas’s open API but just haven’t had a big block of time to play with it. Because the Canvas API operates on HTTPS, you can actually run API actions directly from your normal web browser’s address bar. I like to use browser plug-ins to make the JSON responses more manageable, and to let me save and store actions that I’ve run. I’ll guide you through the steps of grabbing a browser plug-in that operates as a REST client and you can be up and running in no time. You’ll be surprised at what doors this might open.

1. Install a REST client extension.

Chrome has several great extensions to this end, but so far I like Advanced Rest Client. It lets you save requests and view your history.

For Firefox the most popular REST client is intuitively named RESTClient. Same basic functionality, but with nice tabs to view the output in different ways.

2. Create a Canvas Access Token in your account profile.

The access token will provide a secure key, if you will, to Canvas with all your own unique permissions and enrollments. Most modern web services help you create these to securely talk with other systems.

Login to Canvas, click on your name, and scroll down to Approved Integrations. If you don’t already have a token, click New Access Token.

Give your token a label (purpose) and expiration date (if you want).

Copy that really long string that Canvas generates and paste it into a text document for later reference–you’ll need it to talk to Canvas via your REST client.

3. Pick an API resource or action from the Canvas documentation

Start by going to the Canvas API documentation. Browse through the Authentication page as well as the Resources, which contain all the currently possible the API actions and outputs.

I don’t have a lot of time to get into API calls and REST, but you can think of it as simply a message sent to a server with an authorization method that tells the server how to respond based on the target and the access token. In this case we’re using the GET method. The API calls will simply be HTTPS URLs with the access token appended as a variable. The URL will change based on what data in Canvas you want to access.

For example, if I want to see all of my page view data, I start with the base Canvas HTTPS URL:

https://canvas.instructure.com

I then append the location of the API resource or action:

/api/v1/users/:user_id/page_views

Be sure to replace :user_id with the numeric value of the user id (or course or account id) you want to access. In this case I want my own. It’s easy to grab this from the end of the URL of my profile page (which happens to be https://canvas.instructure.com/users/123456, so my user id = 123456)

Finally, you’ll need to append your access token as the value of a variable:

?access_token=somereallylongsecurestringhere

So it looks something like this:

https://canvas.instructure.com/api/v1/users/123456/page_views?access_token=somereallylongsecurestringhere

This URL is what we’ll feed our REST client in the next step.

4. Run the API through the browser REST client

Open your REST client add-on/extension and paste in the URL customized for the API action you want to perform plus the course/account/user id plus your access token.

Be sure you’re using the right method (typically GET) before clicking send.

You’ll end up with output below. I recommend looking at the JSON formatted response. This data is organized in name/value pairs, but can also contain objects, so a whole lot of data in a very simple format is possible here.

This gives you a glimpse of the possible data exchanges that Canvas makes available via its open API. Your ability to get data will depend upon your role and permissions within Canvas. Obviously student and teacher users will have far less access than admins at any sub-account level.

In real-world practice, you’ll need to know a bit more than this. But the essence is that you’d use any number of scripting languages to request the data from the Canvas API, parse the JSON format response, then do wonderful, magical things–like calculate an individual user’s course progress in order to dynamically generate a badge. Or not.

Canvas Tip: Build Quizzes with Multimedia Answers

Nov 2, 2011 at 4:47 pm, Jared Stein

I discovered a nice way to create a Quiz in Canvas that associates images or really any multimedia with answer choices.

When creating a Canvas question choose either Fill in Multiple Blanks or Multiple Dropdowns. Multiple Blanks is similar to short answer, and the blanks may need to be manually assessed to provide latitude with spelling etc. Multiple Dropdowns works like matching or multiple choice.

In either of these cases you build the question and the answers in the rich text editor for the question field. Start by introducing the question, e.g. “Match the following constellation images to their names.”

Follow this by one or more images, videos–whatever.

For each of those media items type in the Canvas-standard markup for the blank/dropdown variable name, e.g. [fig1]. It looks something like this:

…where each [fig1] is for a single blank or dropdown choice. Don’t worry–this makes more sense when you’re in the editor!

Then simply use the area below the editor to show the correct answers with feedback.

Voila!

If this works for you, please share some examples.

Canvas Tip: Add News Feeds to a Canvas Page with iframe and Feedburner

Aug 10, 2011 at 10:51 am, Jared Stein

Instructure Canvas features a pretty powerful Pages tool that allows for rich text editing, quick linking to tools and activities, and embedding multimedia. It does not, unfortunately, support the embedding of RSS or Atom news feeds. Pages strips out your Javascript, too, so there’s no use trying to roll your own feed parser. But there is a work-around: use Feedburner and an IFRAME (more…)

Canvas Tip: Javascript to Open Quiz and External URL in Canvas

Jun 28, 2011 at 12:10 pm, Jared Stein

A question came up on the Canvas users list of how one might open an external web site at the same time that a quiz opens. This is possible with Javascript and use of the External URL option in the Canvas Modules (more…)

Instant Grade Notification as a Motivator

May 17, 2011 at 7:31 pm, Jared Stein

I’ve been teaching online courses in Instructure Canvas for a while, but stumbled upon a fascinating phenomenon today thanks to one of Canvas’s built in features. This plays out due to a number of system settings, so bear with me (more…)

Canvas Tip: Record Desktop Activity as Video in Instructure Canvas

Jan 19, 2011 at 11:53 am, Jared Stein

Instructure Canvas allows teachers to record video from a web cam directly into course pages, discussion posts or even as assignment feedback. It occurred to me that I can easily record my desktop activity instead of my web cam using a similar set-up to what I’ve used to live-stream conference presentations. A 3rd-party desktop app allows you to delineate video sources in place of the web cam, including the user’s desktop. While I still use the commercial software WebcamMax, this time I tested a free software called ManyCam (more…)