Skip to content

Example demonstrating the Learning Tools Interoperability (LTI) library for Go

License

Notifications You must be signed in to change notification settings

macewan-cs/lti-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples demonstrating the Learning Tools Interoperability (LTI) library for Go

This repository's two applications demonstrate use of our lti library.

Table of Contents

General Information

The IMS Global Learning Consortium developed the Learning Tools Interoperability (LTI) specification to formalize communication between learning tools and learning platforms. The two applications in this repository, both minimal working examples of learning tools, demonstrate the use of our Go-based lti library. The library partially implements version 1.3 of the specification for developers for Go-based learning tools.

One of the example, cmd/lti-minimal/main.go, provides an absolute minimal working example of the library. It uses the library's internal nonpersistent datastore.

The other example, cmd/lti-sqlite3/main.go, provides a slightly more complicated example. It uses a persistent SQLite store for registrations.

While some code related to environment variables has been factored out, both of these examples share some code. We have intentionally duplicated that code in the source files to make the application code is as easy to understand as possible.

Technologies Used

  • Go - version 1.16

Installation

  1. Clone this repository.
  2. Create a private and public RSA keys.
openssl genrsa -out private.pem
openssl rsa -in private.pem -pubout -out public.pem
  1. Configure the learning platform for the learning tool.

    In Moodle, go to "Site administration", "Plugins", "External tool", "Manage tools", "Configure a tool manually". Enter the following settings:

    • Tool settings
    • Services
      • IMS LTI Assignment and Grade Services: Use this service for grade sync and column management
      • IMS LTI Names and Roles Provisioning: Use this service to retrieve members' information as per privacy settings
      • Tool Settings: Use this service
    • Privacy:
      • Share launcher's name with tool: Always
      • Share launcher's email with tool: Always
      • Accept grades from the tool: Always Save changes.
  2. In the list of external tools, display the tool configuration details.

    In Moodle, the point-form list icon within the tool's tile shows these settings. These settings are needed for the environment variables below. Use the following mappings from Moodle values to environment variable values:

    • "Platform ID" to REG_ISSUER
    • "Public keyset URL" to REG_KEYSETURI
    • "Access token URL" to REG_AUTHTOKENURI
    • "Authentication request URL" to REG_AUTHLOGINURI
  3. Define the following environment variables with values appropriate for your learning platform.

export REG_ISSUER=https://platform
export REG_CLIENTID=clientid
export REG_KEYSETURI=https://platform/mod/lti/certs.php
export REG_AUTHTOKENURI=https://platform/mod/lti/token.php
export REG_AUTHLOGINURI=https://platform/mod/lti/auth.php
export REG_TARGETLINKURI=http://tool/launch
export DEP_DEPLOYMENTID=1
export KEY_PRIVATE="$(cat private.pem)"
  1. Run the desired learning tool:
    • go run cmd/lti-minimal/main.go
    • go run cmd/lti-sqlite3/main.go
  2. Attempt to launch the learning tool from the learning platform.

Project Status

This project is under active development.

Acknowledgements

Funding for this project was provided by the MacEwan University Faculty of Arts and Science.

Contact

Created by Ron Dyck and Nicholas M. Boers at MacEwan University.

License

This project is licensed under the MIT License.

We are actively developing the library and these examples, and we welcome all pull requests.

About

Example demonstrating the Learning Tools Interoperability (LTI) library for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages