pressbooks/pressbooks-lti-provider

A plugin which turns Pressbooks into an LTI provider.


README

Contributors: conner_bw, greatislander
Tags: pressbooks, lti, lms
Requires at least: 5.1.0
Tested up to: 5.1.0
Stable tag: 1.2.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

This plugin turns Pressbooks into an LTI provider.

Description

Packagist GitHub release Travis Codecov

A plugin that turn Pressbooks into an LTI Provider.

This plugin is built on top of a (forked and maintained) IMS Global Learning Consortium provided LTI-Tool-Provider-Library-PHP abstraction layer. It includes support for LTI 1.1 and the unofficial extensions to LTI 1.0, as well as the registration process and services of LTI 2.0.

Installation

composer require pressbooks/pressbooks-lti-provider

Or, download the latest version from the releases page and unzip it into your WordPress plugin directory): https://github.com/pressbooks/pressbooks-lti-provider/releases

Then, activate and configure the plugin at the Network level.

Read the integrations documentation for more info: https://docs.pressbooks.org/integrations/lti/

Troubleshooting

  • If the user's web browser does not allow 3rd Party Cookies, then logins will not work when Pressbooks is in an iframe.

  • If the web server has incorrect X-Frame-Options settings, then iframes will refuse to display. More info.

  • This plugin requires PDO for MySQL. These drivers are usually installed by default when installing MySQL packages for PHP. If you have Pressbooks running, then PDO should already be installed. If for some reason the PDO drivers are missing, install them.

Deep Linking

Connect URL (LTI 2 Registration URL)

https://site/book/format/lti

Book cover page

https://site/book/format/lti/launch

Post_id

https://site/book/format/lti/launch/123

Post_type + Post_name

https://site/book/format/lti/launch/front-matter/introduction

Root site compatibility:

https://site/format/lti/BOOK_ID?page_id=123

https://site/format/lti/BOOK_ID/launch/123

https://site/format/lti/BOOK_ID/launch/front-matter/introduction

ContentItemSelectionRequest

Pressbooks supports incoming content-item requests for media type values of application/vnd.ims.lti.v1.ltilink.

This feature allows course designers to select which chapter they want to display from inside their LMS.

When configuring, the Launch URL will be something like https://site/book/format/lti where https://site/book is the URL to your book. Setup instructions follow:

Note: Automatic configuration is a feature of the LTI 2.0 specification. Support, usefulness, varies between Learning Management Systems.

Moodle

First, whitelist the Tool Consumer domain in Pressbooks "LTI2 Registration Whitelist".

In Moodle go to: Site Administration -> Plugins -> Manage Tools -> Add tool. Paste in the Launch URL. Follow the configuration steps.

Once configured, you can pick a chapter when adding an external tool by clicking "Select Content".

Canvas

Settings -> Apps -> View App Configuration -> +App. Configure using the "Paste XML Configuration Type" with the following XML snippet, making sure to replace https://site/book/format/lti with your Launch URL:

<?xml version="1.0" encoding="UTF-8"?>
<cartridge_basiclti_link xmlns="http://www.imsglobal.org/xsd/imslticc_v1p0" xmlns:blti="http://www.imsglobal.org/xsd/imsbasiclti_v1p0" xmlns:lticm="http://www.imsglobal.org/xsd/imslticm_v1p0" xmlns:lticp="http://www.imsglobal.org/xsd/imslticp_v1p0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0p1.xsd http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">
  <blti:title>Pressbooks Book</blti:title>
  <blti:description>This is a Pressbooks Book</blti:description>
  <blti:launch_url>https://site/book/format/lti</blti:launch_url>
  <blti:extensions platform="canvas.instructure.com">
    <lticm:property name="privacy_level">email_only</lticm:property>
    <lticm:options name="link_selection">
      <lticm:property name="message_type">ContentItemSelectionRequest</lticm:property>
      <lticm:property name="url">https://site/book/format/lti</lticm:property>
    </lticm:options>
    <lticm:property name="selection_height">600</lticm:property>
    <lticm:property name="selection_width">800</lticm:property>
  </blti:extensions>
</cartridge_basiclti_link>

More info.

Sakai

Click on the Site Info tool in the left navigation area. Click on the External Tools tab. Click on Install LTI 1.1 link.

When entering the information, make sure to select: Allow the tool to be launched as a link, Allow external tool to configure itself, and Allow the tool to be used from the rich content editor to select content.

Once configured, use "Launch External Tool Configuration" when adding an External Tool.

Blackboard

System Admin -> LTI Tool Providers -> Register Provider Domain. Configure accordingly.

Next, from the options menu (little arrow next to the configured domain) select: Manage Placements, then Create Placement.

When entering the information make sure to select: Course content tool and Supports deep linking.

The placement will be available in your Course the under Build Content menu.

Common Cartridge

Allows users to export books as "Thin" Common Cartridge zip files. Supports CC 1.1, 1.2 and 1.3. Produces .imscc (zip) files with LTI links. Some notes:

  • Files passed the IMS Common Cartridge Validator.
  • Moodle was able to import CC 1.1 (because there's no code to import 1.2 or 1.3 ?!)
  • Canvas was able to import CC 1.1, 1.2, and 1.3.
  • Sakai imports but doesn't know what to do with the LTI links? Only empty Frontmatter, Main Body, Backmatter appear under Lessons. The rest of the content appears as unusable xml files under Resources. Fixed in 12.4 See this bug report.
  • Blackboard was able to import CC 1.2.

Thanks to Ed Beck, Bracken Mosbacker, Brad Payne, Steel Wagstaff and everyone in https://pressbooks.community/ who helped us get this working.

Screenshots

Pressbooks LTI Consumers. Pressbooks LTI Settings. ContentItemSelectionRequest in Moodle.

Changelog

1.2.0

  • Refactor code to respect Pressbooks coding standards 1.0.0
  • Fix an issue with GitHub updater not always working
  • Update Common Cartridge to work with Pressbooks 5.7 Exports page: #31
  • Update dependencies to latest versions

1.1.3

  • Update izumi-kun/lti to version 1.1.6 (fix properties of class ContentItemPlacement)
  • Update README

1.1.2

  • Adjust pb_integrations_multidomain_email filter logic: 0fd5280

1.1.1

  • Update izumi-kun/lti to version 1.1.5 (fix broken signature verification)
  • New pb_integrations_multidomain_email filter

1.1.0

  • Update izumi-kun/lti to version 1.1.4
  • Fix read_and_close session option for LTI endpoints
  • Bump minimum PHP to 7.1
  • Switch to Pressbooks Coding Standards
  • Switch to wp dist-archive for release build

1.0.0

  • Update izumi-kun/lti to version 1.1.3
  • Add network option to (dis)allow books overrides.
  • Add option to show all export versions.
  • Tweak CC files for Blackboard compatibility.
  • Use email prefix as login name, store LTI ID in user meta.
  • Fix GitHub Updater

0.4.3

  • Update izumi-kun/lti to version 1.1.2
  • Allow deep links with Candela style LTI launch URLs like root/format/lti/BOOK_ID?page_id=123

0.4.2

  • Update izumi-kun/lti to version 1.1.0
  • Fix relative url for Tool icon.
  • Update WP role when authenticating over LTI.
  • Fix build.

0.4.1

  • Fix Invalid OAuth Signature On Subdomain Installs.
  • Fix GUID and book title for Resource Handlers.
  • Add icons for Common Cartridge, LTI Links, and Resource Handlers.

0.4.0

  • Export "Thin" Common Cartridge files.

0.3.0

  • Prettier forms.
  • Bug fixes for Canvas.

0.2.0

  • Demo for Open source Slack channel.

0.1.0

  • Initial scaffold.

Upgrade Notice

1.2.0

Pressbooks LTI Provider requires Pressbooks >= 5.7.0