Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Publish as LTI tool.

Publish as LTI tool: Difference between revisions

From MoodleDocs
m (Add info about force_embed MDL-56339)
m (Text replacement - "class="nicetable"" to "class="wikitable"")
 
(11 intermediate revisions by 5 users not shown)
Line 4: Line 4:
The 'Publish as LTI tool' enrolment plugin, together with the LTI authentication plugin, allows remote users on a different site (known as an LTI consumer)  to access selected courses and activities. In other words, Moodle functions as an LTI tool provider.  Grades are sent back to the remote system. See the screencast [https://www.youtube.com/watch?v=cMQiKjXdm3A Publish as LTI tool] for a demonstration.
The 'Publish as LTI tool' enrolment plugin, together with the LTI authentication plugin, allows remote users on a different site (known as an LTI consumer)  to access selected courses and activities. In other words, Moodle functions as an LTI tool provider.  Grades are sent back to the remote system. See the screencast [https://www.youtube.com/watch?v=cMQiKjXdm3A Publish as LTI tool] for a demonstration.


{{New features}}Note: LTI 2 is supported in Moodle 3.2, making it easier for others to access your shared content.
If your moodle instance is using HTTP (and not HTTPS)  you will only be able to use the tool on sites that are also using HTTP (and not HTTPS). It's recommended that you use HTTPS on your moodle instance. See [[Transitioning to HTTPS]]
 
Note: LTI 2 is supported in Moodle 3.2, making it easier for others to access your shared content.


==Enabling 'Publish as LTI tool' at site level==
==Enabling 'Publish as LTI tool' at site level==
Line 20: Line 22:
# In 'Tool to be published' select the course or activity to be shared
# In 'Tool to be published' select the course or activity to be shared
# Click the 'Add method' button
# Click the 'Add method' button
# Go to the 'Published as LTI tools' page and make a note of thelaunch details (cartridge URL and secret) or just the registration URL for the LTI consumer site (see below for info on which to choose). The URL will be of the form: .../enrol/lti/...
# Go to ''Course Administration > Published as LTI tools'' page (/enrol/lti/index.php?courseid=''n'') and make a note of the launch details or the registration URL for the LTI consumer site (see below for info on which to choose). The URL will be of the form: .../enrol/lti/...
# You will also need to give the LTI consumer site a consumer key - this can be anything you want.
# You will also need to give the LTI consumer site a consumer key - this can be anything you want.


The LTI consumer can be another Moodle site or any other LTI-consumer-compliant LMS, such as Sakai.
The LTI consumer can be another Moodle site or any other LTI-consumer-compliant LMS, such as Sakai. Depending on the requirements of the LTI consumer, you can provide either a cartridge URL (also called configuration URL) plus secret OR a launch URL (new in Moodle 3.5.2) OR a registration URL.


Grade and user synchronisation (if required) are done via the 'Publish as LTI tool grade sync' and 'Publish as LTI tool users sync' [[Scheduled tasks|scheduled tasks]], which run by default every 30 minutes.
Grade and user synchronisation (if required) are done via the 'Publish as LTI tool grade sync' and 'Publish as LTI tool users sync' [[Scheduled tasks|scheduled tasks]], which run by default every 30 minutes.
Line 33: Line 35:
LTI 1 actually means a launch URL (which is compatible with LTI 1 or LTI 2 compliant consumers). LTI 2 actually means a proxy (which is compatible with LTI 2 compliant consumers).
LTI 1 actually means a launch URL (which is compatible with LTI 1 or LTI 2 compliant consumers). LTI 2 actually means a proxy (which is compatible with LTI 2 compliant consumers).


{| class="nicetable"
{| class="wikitable"
|-
|-
!IMS Spec
!IMS Spec
Line 42: Line 44:
!Blackboard
!Blackboard
!Sakai
!Sakai
!Chamilo
|-
|-
|Tool consumer
|Tool consumer
Line 50: Line 53:
|LTI Tool provider*
|LTI Tool provider*
|Sakai Basic LTI portlet
|Sakai Basic LTI portlet
|IMS/LTI Plugin
|-
|-
|Launch URL
|Launch URL
Line 58: Line 62:
|Provider Domain
|Provider Domain
|Remote Tool URL
|Remote Tool URL
|Launch URL
|-
|-
|Secret
|Secret
Line 66: Line 71:
|Tool Provider Secret
|Tool Provider Secret
|Remote tool secret
|Remote tool secret
|Secret
|-
|-
|Cartridge URL
|Cartridge URL
Line 74: Line 80:
|n/a
|n/a
|Tool registration file?
|Tool registration file?
|n/a
|-
|-
|Proxy URL
|Proxy URL
Line 82: Line 89:
|n/a
|n/a
| -
| -
|n/a
|}
|}


Line 92: Line 100:
# Visit the course and click on the LTI activity.
# Visit the course and click on the LTI activity.
# Check the activity displays as expected.
# Check the activity displays as expected.
==Common issues==
The setup of LTI can be tricky, these are some of the most frequently reported issues by Moodle users. As always, enabling debug information can help trace the roots of a problem.
=== A required parameter (oauth_consumer_key) was missing ===
This exception occurs when the Tool Consumer is missing a Consumer Key parameter. As mentioned above, the consumer key can be anything you want so long as the field isn't left empty. Best keep it simple and without special characters, however.
=== User has free access to the entire site, isn't contained to the course ===
This can happen when the course content isn't embedded. Enable ''Allow frame embedding'' in ''Site Administration > Security > HTTP Security'' and, on the consumer site LTI tool settings, add ''force_embed=1'' in the ''custom parameters'' settings.
=== This XML file does not appear to have any style information associated with it. ===
Some tool consumers do not support cartridge URLs such as Sakai and Chamilo, in that case, it's better to use the launch URL.
=== Invalid request ===
This exception can happen for various reasons, so it can be difficult to trace the root of the problem. One of the possibilities is that ''deep linking'' is enabled in the tool consumer. Disabling it can help in LMS that have it like Chamilo and Canvas.


==See also==
==See also==
Line 97: Line 120:
* [[LTI and Moodle]]
* [[LTI and Moodle]]
* [https://moodle.org/mod/forum/discuss.php?d=345828 LTI authentication not working] forum discussion
* [https://moodle.org/mod/forum/discuss.php?d=345828 LTI authentication not working] forum discussion
* [http://lti.tools/saltire/ saLTIre - a testing system for LTI]


==Any further questions?==
==Any further questions?==


Please post in the [http://moodle.org/mod/forum/view.php?id=7978 LTI and Moodle forum] on moodle.org
Please post in the [http://moodle.org/mod/forum/view.php?id=7978 LTI and Moodle forum] on moodle.org
[[Category:LTI]]


[[es:Herramienta publicar como LTI]]
[[es:Herramienta publicar como LTI]]
[[de:Als LTI-Tool bereitstellen]]
[[de:Als LTI-Tool bereitstellen]]
[[fr:Publier comme outil LTI]]

Latest revision as of 15:13, 10 August 2021

Moodle as an LTI provider

The 'Publish as LTI tool' enrolment plugin, together with the LTI authentication plugin, allows remote users on a different site (known as an LTI consumer) to access selected courses and activities. In other words, Moodle functions as an LTI tool provider. Grades are sent back to the remote system. See the screencast Publish as LTI tool for a demonstration.

If your moodle instance is using HTTP (and not HTTPS) you will only be able to use the tool on sites that are also using HTTP (and not HTTPS). It's recommended that you use HTTPS on your moodle instance. See Transitioning to HTTPS

Note: LTI 2 is supported in Moodle 3.2, making it easier for others to access your shared content.

Enabling 'Publish as LTI tool' at site level

An administrator can enable the 'Publish as LTI tool' for use across the site:

  1. Go to Site administration > Plugins > Authentication > Manage authentication and enable LTI
  2. Go to Site administration > Plugins > Enrolments > Manage enrol plugins and enable 'Publish as LTI tool'

It is recommended that the site administration setting 'Allow frame embedding' is enabled (in "Site Administration > Security > HTTP security") so that tools are displayed within a frame rather than in a new window.

Sharing access to a course or activity

Published tools
  1. Go to the 'Enrolment methods' page and add 'Publish as LTI tool' as an enrolment method
  2. In 'Tool to be published' select the course or activity to be shared
  3. Click the 'Add method' button
  4. Go to Course Administration > Published as LTI tools page (/enrol/lti/index.php?courseid=n) and make a note of the launch details or the registration URL for the LTI consumer site (see below for info on which to choose). The URL will be of the form: .../enrol/lti/...
  5. You will also need to give the LTI consumer site a consumer key - this can be anything you want.

The LTI consumer can be another Moodle site or any other LTI-consumer-compliant LMS, such as Sakai. Depending on the requirements of the LTI consumer, you can provide either a cartridge URL (also called configuration URL) plus secret OR a launch URL (new in Moodle 3.5.2) OR a registration URL.

Grade and user synchronisation (if required) are done via the 'Publish as LTI tool grade sync' and 'Publish as LTI tool users sync' scheduled tasks, which run by default every 30 minutes.

If user synchronisation is set to yes, enrolled users in the remote system are synchronised with enrolments in the course, with an account created for each remote user as necessary, and the user enrolled or unenrolled as required. If set to no, at the moment when a remote user accesses the tool, an account will be created for them and they will be automatically enrolled.

LTI 1 or LTI 2?

LTI 1 actually means a launch URL (which is compatible with LTI 1 or LTI 2 compliant consumers). LTI 2 actually means a proxy (which is compatible with LTI 2 compliant consumers).

IMS Spec Moodle Canvas Edu app center (Canvas) Desire2Learn Blackboard Sakai Chamilo
Tool consumer External Tool External App App Link LTI Tool provider* Sakai Basic LTI portlet IMS/LTI Plugin
Launch URL Tool URL Launch URL n/a URL Provider Domain Remote Tool URL Launch URL
Secret Secret Secret Secret Secret Tool Provider Secret Remote tool secret Secret
Cartridge URL Tool URL Paste XML Configuration URL n/a n/a Tool registration file? n/a
Proxy URL Registration URL/Tool URL LTI 2 Registration URL n/a n/a n/a - n/a

On the LTI consumer site

  1. Visit a course.
  2. Add a LTI activity and use the URL and secret from the LTI provider site and enter any consumer key you want.
  3. If you would like to not show blocks for teachers, you can pass the custom parameter "force_embed = 1". This may limit the functionality available to teachers and admins. To get blocks back, simply remove the parameter.
  4. Log in as a student.
  5. Visit the course and click on the LTI activity.
  6. Check the activity displays as expected.

Common issues

The setup of LTI can be tricky, these are some of the most frequently reported issues by Moodle users. As always, enabling debug information can help trace the roots of a problem.

A required parameter (oauth_consumer_key) was missing

This exception occurs when the Tool Consumer is missing a Consumer Key parameter. As mentioned above, the consumer key can be anything you want so long as the field isn't left empty. Best keep it simple and without special characters, however.

User has free access to the entire site, isn't contained to the course

This can happen when the course content isn't embedded. Enable Allow frame embedding in Site Administration > Security > HTTP Security and, on the consumer site LTI tool settings, add force_embed=1 in the custom parameters settings.

This XML file does not appear to have any style information associated with it.

Some tool consumers do not support cartridge URLs such as Sakai and Chamilo, in that case, it's better to use the launch URL.

Invalid request

This exception can happen for various reasons, so it can be difficult to trace the root of the problem. One of the possibilities is that deep linking is enabled in the tool consumer. Disabling it can help in LMS that have it like Chamilo and Canvas.

See also

Any further questions?

Please post in the LTI and Moodle forum on moodle.org