Connecting Pressbooks to Canvas
A Practical Guide
In my last post, I wrote a simple guide or introduction to publishing open textbooks using Pressbooks, a powerful open source publishing tool. In this post, I want to describe how we’ve built upon great work (done in the open by Pressbooks, Lumen Learning, and others) to connect integrate books and other learning objects that we’ve published in Pressbooks directly to a Learning Management System (in this case, Instructure’s Canvas, which my campus has recently adopted).
All of the software featured in the post is open source, which means that it has been developed and published under licenses which permit anyone in the world to download, use, and modify it free of charge. The solutions described here also make use of commonly accepted standards whenever possible (published by IMS Global, a nonprofit learning consortium), which means that they’re designed to be broadly interoperable. In other words, these approach described in this post, which specific to Canvas, is based on principles which should be applicable to any learning management system which supports the standards described in this post (Blackboard Learn, D2L Brightspace, Moodle, Sakai, etc.). For those of us who are serious about moving open education forward, it’s hard to overstate the importance of open licensing and conformance with community-developed, widely-accepted standards, but that’s a conversation for another time and place.
The two standards most relevant for importing content directly from Pressbooks into a Learning Management System are IMS Global’s Common Cartridge (the Thin CC spec in particular) and Learning Tools Interoperability [LTI]. Using freely available plugins developed for use with Pressbooks by Lumen Learning, I’ll show you how you can produce Thin CC exports of a Pressbook and load that content into a Canvas course using a self-hosted instance of Pressbooks as an LTI app.
Interoperable Content: The Thin Common Cartridge
Before I explain how to make a Thin Common Cartridge export for a Pressbook, it may be helpful to explain what Common Cartridges and Thin Common Cartridges are. If you already know, or don’t care about technical details, feel free to skip this section entirely and rejoin this tutorial when it gets back to the practical advice [“How to Make a Thin CC Export of a Pressbook”].
What’s a Common Cartridge?
A Common Cartridge is basically a bundle of package (a ‘cartridge’) of stuff that you want to hand over to a learning management system. Content makers who use the standard ensure that if they conform to the standard, any learning system that also adheres to the standard will be able to understand and interpret the contents of that package when it’s handed to them.
According to IMS Global, the entity who maintains the standard:
These standards, if followed by content developers and learning platforms, enable strict interoperability between content and systems. The standards support great flexibility in the type of digital content supported (content can actually be applications) and the location of the content (content and applications in a Common Cartridge can be distributed).
Common Cartridge solves two problems. The first is to provide a standard way to represent digital course materials for use in online learning systems so that content can be developed in one format and used across a wide variety of learning systems. … The second is to enable new publishing models for online course materials and digital books that are modular, web-distributed, interactive, and customizable. [source]
To put it very simply, a Common Cartridge is made up of at least two important components: 1) all the stuff in the package (content, quizzes, discussion forums, links, etc.) that you want to put inside of a learning management system and 2) a manifest which describes what that stuff is.
Consequently, the Common Cartridge specification includes a standard for the metadata used by this manifest to describe the contents of the cartridge, a standard for quiz questions, tests, and other assessments [called the Question and Test Interoperability standard or QTI], a standard for launching and exchanging information with external tools [LTI], a controlled vocabulary for the ‘intended use of web content in the cartridge,’ and schemas for populating online discussion forums and web links. What this means is that a single Common Cartridge could include nearly all of the resources which make up a typical blended or online course: quizzes, tests, assignments, discussion forums, web links, and links to third-party LTI tools, and that these would all be expected to work in similar ways no matter which LMS you were using, provided that the LMS supported the Common Cartridge specification.
What is a “Thin” Common Cartridge?
Common Cartridges, as you can see, are quite powerful. “Thin” Common Cartridges, as you might guess, are slimmed down version of the ordinary Common Cartridge. Like the full Common Cartridge, they are made up of 1) bundles of stuff you want to pass to an LMS and 2) a manifest file describing what’s in these bundles, but Thin Common Cartridges differ in that they restrict what you can include in this bundle to just two things: LTI enabled links and ordinary web links.
This means that a Thin Common Cartridge is just a collection of links — either to resources on the web or to LTI content. In the case of a Pressbooks, this is perfect — each chapter of a Pressbook has a unique URL, which means that it could be included as a weblink in a Thin Common Cartridge, or, if Pressbooks was made to act as an LTI provider, as an LTI link.
What is LTI?
LTI, short for Learning Tools Interoperability, is another IMS Global standard. LTI was developed to allow LMSes and other platforms to securely integrate other rich learning applications (including third party tools) into their system. IMS Global has also published a very helpful FAQ document giving answers to many common questions about LTI and what it does. Put very simply, an LTI integration “allows the student to move seamlessly from one tool to the other, with minimal effort from instructors or students.”
According to IMS Global:
The basic use of the LTI standard allows the seamless connection between a web-based tool that is outside of the learning platform. LTI provides the mechanism that allows users (such as a student) to navigate among various tools while maintaining a high-level of security for passing data about the user, the place they come from, and their role (e.g. faculty, student, TA, etc.). The tools can range from simple communication applications, such as chat, to domain-specific learning environments, such as publisher products. In other words, if you have an interactive assessment application or virtual chemistry lab, it can be securely connected to an LMS in a standard way without a tool having to develop and maintain custom integrations for each platform.
LTI allows a user to navigate between various learning tools without having to log into each tool. LTI carries information about the user, the platform from which they came, the role of the user and where they are going. [source]
What an LTI Connection Makes Possible
The main advantages of using LTI with Pressbooks seem to me to be twofold.
First, it allows content to be loaded securely in the LMS, and to display as though it were native. In the case of Canvas, this means content loaded via LTI link will display directly in an iFrame (without an awkward additional external link wrapper placed around it as is the case with content loaded via simple web links). It also means that you can load Pressbooks content that is not published to the open web, but published privately (meaning that a user needs a Pressbooks account in the book to access or read it). This is because when a learner launches an LTI link to Pressbooks content from within the LMS, the LTI tool allows for a user account to be automatically created for the student and gives them the permissions necessary to view the content pointed to by the LTI link.
Second, an LTI connection also allows for the exchange of information between the tool consumer (the LMS, or in this case Canvas) and the tool provider (in this case, Pressbooks). That information can simply be the identity of the learner (sent to Pressbooks by Canvas), but LTI (using version 1.1 and above) also allows a third-party application to pass back information about what that learner did while using that third-party tool (a grade value, say, passed back from Pressbooks to Canvas using something called the ‘Basic Outcomes’ service). This is where the possibilities become really exciting for open education, and for thinking about Pressbooks as a platform for publishing not just media-enhanced texts, but for publishing interactive learning activities, with personalized real-time feedback for learners as well as some formative assessment capabilities and simple grade reporting for the instructor. I plan to discuss some of our work with this exciting application of the LTI specification to Pressbooks in a future post.
How to Make a Thin CC Export of a Pressbook
In order to make a Thin Common Cartridge export of a Pressbook, you’ll need to download and install Lumen Learning’s Candela Thin CC Exports plugin on your instance of Pressbooks. If you use wp-cli you can simply enter this command:
wp plugin install https://github.com/lumenlearning/candela-thin-exports/archive/master.zip --activate-network
Step 1: Once it’s installed and network activated, you’ll see an ‘Export to ThinCC’ option appear in the ‘Tools’ menu on each of your book’s dashboards [shown at left].
Step 2: When you click on this link, you’ll see a slightly intimidating array of options. In the example seen at left, we’re telling the export routine to include only those pages which you’ve marked for export in the Pressbook ‘Organize Text’ interface [check box for option 1], to fill our Thin Common Cartridge with web links instead of LTI links [check box for option 3], include front and back matter [check boxes for options 4 and 5] and to make a Thin-CC which conforms with the 1.3 version of the spec [the ‘CC Version:’ dropdown].
Step 3: You can preview what the manifest file looks like by clicking the ‘preview’ button, or download the Thin Common Cartridge file as .zip file by clicking the red ‘Download’ button. If you want to bring your book into the LMS as a collection of simple web links, then you’ll just need to import this cartridge and you’re all set.
Importing a Thin Common Cartridge with Web Links Into Canvas
To import a Thin Common Cartridge with web links into Canvas, you’ll need to do the following:
Step 1: Log in to the course where you’d like to add your book and click ‘Settings’-> ‘Import Course Content’
Step 2: Select ‘Common Cartridge 1.x Package’ from the ‘Content Type’ drop down menu option. Select as ‘source’ the zip file you just downloaded from the Thin CC export routine in Pressbooks. Select ‘All Content’ and then click the red ‘Import’ button [shown at left].
That’s it! Once you’ve imported the course content, you’ll see that each of the chapters in your book has been imported as a separate link in the course ‘Modules’ section, with each of the book’s parts comprising its own module.
Clicking on a link will load the published chapter in an iFrame inside of the module content view [see the image at left]. You’ll notice that the iFrame has a grey border box around it that allows the user to launch the link in an external tab — that’s Canvas’ way of indicating that this is external content and that it’s not being brought into the LMS through the secure, LTI-approved method that is preferred for tightly integrating third-party tools and content inside of a LMS. It’s not ideal with all the duplicate navigation, etc., but it’s there, and it was pretty easy!
Next, let’s look at how to bring Pressbooks into Canvas via LTI.
How to Configure Pressbooks as an LTI Provider
In order to make this magic happen, we first need to set up Pressbooks to act as an LTI provider. Fortunately, as with the Thin Common Cartridge export, Lumen Learning has already published freely available plugins designed to do this very thing. To allow your instance of Pressbooks to function as an LTI Tool Provider, you’ll need to download two plugins:
- This LTI plugin for WordPress written by Jeff Graham. To install and network activate using wp-cli simply type
wp plugin install https://github.com/lumenlearning/lti/archive/master.zip --activate-network
- This LTI plugin which implements the LTI plugin for WordPress for use with a specific implementation of Pressbooks used by Lumen Learning, written largely by Lumen Learning’s Bracken Mosbacker and Brian Borgeson. To install and network activate using wp-cli simply type
wp plugin install https://github.com/lumenlearning/lti/archive/master.zip --activate-network. Erik Scull from Indiana University has also published a slightly modified version of this plugin,which you may want to review and use instead. We’re working on our own fork of this plugin, but it hasn’t yet been released for public consumption (soon, though, I hope!).
Once these two plugins are installed and network activated on your Pressbooks instance, you should have the ability to create LTI Consumer accounts, which contain all the information you need to connect your instance of Pressbooks (as an LTI provider) with various Learning Management Systems (or other LTI consumers).
Step 1: From the root network wp-admin page
https://[yournetwork.org]/wp-admin you should see a LTI Consumers link in the dashboard. You can access it directly at
https://[yournetwork.org]/wp-admin/edit.php?post_type=lti_consumer. Click ‘Add New’ to create a secret and key for a new LTI Consumer.
Step 2: From the ‘Add New LTI Consumer’ menu, give your tool consumer a title (perhaps something like
[Your school name's] Canvas Instance) and click the red ‘Publish’ button. Once you’ve done this, the plugin will automatically generate a Consumer Secret and Consumer Key which you can use when configuring Pressbooks to function as an ‘app’ in your Learning Management System.
Connecting a Pressbook to Canvas via LTI Link
Now that we’ve created an LTI Consumer post to use with our instance of Canvas, we’re ready to create a Thin Common Cartridge export for one of our books using LTI links instead of simple web links.
Exporting Your Book as a Thin Common Cartridge with LTI Links
This process is exactly identical to the process described earlier for web links, with one important difference (a setting described in step 2).
Step 1: The first thing we need to do is to go back to the dashboard of a book that we want to bring into a course in our LMS. Once you’re in this book’s admin menu and have checked to see that your book is ready for export, click on the ‘Tools’-> ‘ Export to Thin CC’ menu option to see your various options for making a Thin Common Cartridge [at left]
Step 2: Make your desired selections from the ‘Export to Thin CC’ option page. In this case, you’ll want to leave the ‘Use normal web links instead of LTI links’ option unchecked. [shown at left].
Once you have the settings as desired for your book, click the red ‘Download CC 1.1 .imscc’ to download your Thin Common Cartridge with LTI links.
Importing the Thin Common Cartridge to a Canvas Course
These steps will be very similar to the steps described above for a Thin Common Cartridge with web links, but with some additional configuration needed for the LTI app after the import is completed. Here they are:
Step 1: Log in to the course where you’d like to add your book and click ‘Settings’-> ‘Import Course Content’ [shown at left]
Step 2: Select ‘Common Cartridge 1.x Package’ from the ‘Content Type’ drop down menu option. For source, select the Thin CC file with LTI links you just created in Pressbooks. Select ‘All Content’ and then click the red ‘Import’ button [shown at left]. Once you’ve imported this package, you’ll likely see a yellow ‘Completed’ message and a notification that you have ‘1 issue.’ Click ‘show issues’ and you’ll see a message that looks like the one shown at left: “The security parameters for the external tool […] need to be set in Course Settings.” You’re seeing this message because you’ve just imported a bunch of LTI links but haven’t yet configured Pressbooks to act as an LTI provider in this course. This is where the LTI Consumer information you generated earlier will come in handy.
Step 3: Click on the course ‘Settings’ button. Click the ‘Apps’ tab and then click ‘View App Configurations’ [shown at left.]
Step 4: Find the entry for the ‘app’ created by your instance of Pressbooks. By default it should be the name of your Pressbooks server, but this can be changed in the plugin. Click the gear icon at the right and then click ‘Edit’ [shown at left].
Step 5: On this screen you’ll want to paste the values for the ‘Consumer Key’ and ‘Consumer Secret’ generated by the LTI Consumer tool on your Pressbooks network [step 2 of the previous section] into the ‘Consumer Key’ and ‘Shared Secret’ fields of the Edit App menu. You’ll also want to replace the Launch URL with the API URL generated by your LTI Consumer tool. In general that URL should be
https://[yournetwork.org]/api/lti/. If you’ll be adding several Pressbooks from your network to several courses in your LMS, it probably makes sense to work with your LMS administrator to configure your Pressbooks app as an LTI provider that’s accessible to all courses in the LMS, so that you don’t have to configure the app on a book by book basis.
Viewing the Book Inside of Canvas
Once you’ve imported the course content and configured Pressbooks as an LTI Provider ‘app,’you’ll see that each of the chapters in your book will be imported as separate links in the course ‘Modules’ section, with each of the book’s parts comprising a separate module [as seen at left]. You can rearrange these individual links and publish in Canvas as desired.
When an LTI link is launched, you’ll notice that the content loads directly in an iFrame within the Canvas content viewer pane, as though the content was native content to the LMS [sample chapter in Canvas shown at left]. Your books will likely look a bit different, as I’ve written a bit of custom CSS that left aligns the text wrapper and strips out extraneous navigation elements from a Pressbook when loaded in the Canvas pane, but the basic principle is pretty straightforward.
It’s worth noting also that what’s being loaded is the live published page in the actual Pressbook. This means that if a book is in active use in multiple courses and you need to correct errata during a semester, you can simple fix it one time (in the source Pressbook) and the changes will be instantly visible upon the next load to all of the courses where the book is linked. Canvas isn’t hosting any of this content or making local copies, it’s just pointing to the published Pressbook via LTI link.
This guide has already run on quite long, so I’ll leave it here for now, but in a future post I plan to describe some of our work adding annotation and interactive elements to our Pressbooks, and some experimental work we’ve done extending this basic LTI connection to send information about learner performance on those interactive elements back to the Canvas gradebook.