Skip to content
Cristina Alonso edited this page Oct 8, 2018 · 8 revisions

Contents

Introduction

Learning Tools Interoperability (LTI) is a standard specification developed by IMS Global Learning Consortium. The principal concept of LTI is to establish a way of integrating rich learning applications with platforms like learning management systems, portals, learning object repositories, or other educational environments.

In LTI the learning applications are called Tools (delivered by Tool Providers) and the LMS, or platforms, are called Tool Consumers.

User Guide

Create or select the class

The teacher's first step is to create a new class or select a previously-created class (which will have a game associated to it) to allow the LTI access:

2true

Figure 1.: class selection or creation in RAGE Analytics front-end.

Configure LTI

Once in the class is selected, an option to configure LTI is available. To configure it, it is needed to type a secret (that could be any key) and then press the button Configure LTI.

4true

Figure 2.: to configure LTI, after choosing a class to be used, a key must be entered.

This operation will return three values ​​that are necessary to configure the LMS or "Tool Consumer", in this case the Learning Management System Moodle. These values ​​are:

  • Secret, previously entered by the teacher
  • Key, together with the secret is used to validate the communication between the ToolProvider (rage-analytics in this case) and the ToolConsumer
  • Launch URL, to tell the ToolProvider where to make the request to login the user

5true

Figure 3.: values returned after LTI configuration are secret (entered by user), key and launch URL.

Configure the ToolConsumer

With the previous values, we can configure the tool consumer. In our example, the ToolConsumer is Moodle where we need to first create an external tool activity. For this, in Moodle, the user needs to go to the option to add a new activity or resource, and select External resource.

5-1

Figure 4.: to configure LTI with Moodle as tool consumer, we first need to create an external tool activity in Moodle.

The new external resource needs to be configure. For this, the user needs to enter in the tool settings the key, the secret and the launch URL previously obtained in the RAGE Analytics front-end:

6

Figure 5.: to configure the tool consumer (Moodle) we need to enter the previously obtained key, secret and launch URL.

After saving the configuration, the tool will appear in the list of preconfigured tools available. With it, we can enter the activity in our tool consumer (Moodle). We will be able to verify how the user is logged in the activity automatically even if the student does not have an account in RAGE Analytics.

8

Figure 6.: integration of the RAGE Analytics activity in the tool consumer (Moodle), where we can verify users logged in automatically.

How LTI works

Currently we use the library for node js LTI-Passport for the authentication by LTI.

The ToolProvider sends a request to the base URL specified in its configuration, this request is of type POST and has the following structure in the request body:

{
      user_id: '2',
      oauth_consumer_key: '35134tgerqg4364'
      lis_person_sourcedid: '',
      roles: [ 'Instructor' ],
      context_id: '2',
      context_label: 't1',
      context_title: 'test1',
      resource_link_title: 'Rage',
      resource_link_description: '',
      resource_link_id: '2',
      context_type: 'CourseSection',
      lis_course_section_sourcedid: '',
      lis_result_sourcedid: '{"data":{"instanceid":"2","userid":"2","typeid":null,"launchid":605290586}, "hash":"a7267de5cef1e823e96b129ceed1237613g218cb67353b1dd39714ea8e47eadf"}',
      lis_outcome_service_url: 'http://localhost/mod/lti/service.php',
      lis_person_name_given: 'Luis',
      lis_person_name_family: 'Hernandez',
      lis_person_name_full: 'Luis Hernandez',
      ext_user_username: 'lnandez',
      lis_person_contact_email_primary: 'lnandez@email.es',
      launch_presentation_locale: 'en',
      ext_lms: 'moodle-2',
      tool_consumer_info_product_family_code: 'moodle',
      tool_consumer_info_version: '2016092900',
      lti_version: 'LTI-1p0',
      lti_message_type: 'basic-lti-launch-request',
      tool_consumer_instance_guid: 'localhost',
      tool_consumer_instance_name: '',
      tool_consumer_instance_description: '',
      launch_presentation_document_target: 'iframe',
      launch_presentation_return_url: 'http://localhost/mod/lti/return.php?course=2&launch_container=3&instanceid=2&sesskey=XnhopytJPw' 
}

The different generated pairs of key and secret are stored in a database. When the request of the tool consumer arrives at the tool provider it is verified that the key exists in the database, then the secret is recovered and the provider is created through the passport library with the key-secret values. This secret serves to encrypt the communication between consumer and provider through Oauth.

Once the application has verified that the key-secret configuration is correct, the user is authenticated using the lis_person_contact_email_primary field, if the user with that email exists in the user database of the application, the user is then logged in by generating an authentication token. If it does not exist, the user is created in the database and the authentication token is also generated.

Once the token is generated, the user can navigate already authenticated through the application and will be redirected to the interface of the class in which the key was generated.

You can read more info in the official site of IMS LTI implementation guide.

Complete implementation of the LTI plugin can be found here.

Clone this wiki locally