Publish as LTI tool: Difference between revisions

From MoodleDocs
m (Text replacement - "class="nicetable"" to "class="wikitable"")
No edit summary
Line 2: Line 2:
==Moodle as an LTI provider==
==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.  
The 'Publish as LTI tool' enrolment plugin, together with the LTI authentication plugin, allows remote users on a different platform to access selected courses and activities. In other words, Moodle functions as an LTI tool. Courses and activities can be completed by accessing them from the remote platform. When grades are recorded, these will also be sent back to the remote platform.


{{MediaPlayer | url = https://youtu.be/cMQiKjXdm3A}}
==LTI 1.3 and LTI Advantage==
 
   
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]].
LTI 1.3 describes the core specification needed for securely launching a Tool resource from within a Platform. When the core LTI 1.3 functionality is packaged alongside the three essential services (Assignment and Grade Services v2.0, Names and Role Provisioning Services v2.0 and Deep Linking v2.0), it's called LTI Advantage. More information about LTI Advantage and its services can be found on the IMSGlobal website. See https://www.imsglobal.org/activity/learning-tools-interoperability.
   
With LTI Advantage, the term 'Tool' is used to refer to the external service providing functionality, while 'Platform' is used to refer to the application wanting to use the functionality provided by the tool. The terms 'Platform' and 'Tool' can be thought of as replacements for the legacy terms 'Consumer' and 'Provider' respectively.


Note: LTI 2 is supported in Moodle 3.2 onwards, making it easier for others to access your shared content.
==Enabling the 'Publish as LTI tool' feature==
 
==Enabling 'Publish as LTI tool' at site level==


An administrator can enable the 'Publish as LTI tool' for use across the site:
An administrator can enable the 'Publish as LTI tool' for use across the site:
Line 17: Line 17:
# Go to ''Site administration > Plugins > Enrolments > Manage enrol plugins'' and enable 'Publish as LTI tool'
# 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.
 
It is recommended that the site administration setting 'Allow frame embedding' is enabled (in "Site Administration > Security > HTTP security") so that tools can be displayed within a frame rather than in a new window, if desired.
 
==Register Moodle with the platform==
 
The security model for LTI 1.3 and LTI Advantage services is based on OAuth 2.0 and OpenID Connect. This differs from previous versions of the LTI standard, which used OAuth 1.0. Practically, this means the Tool and Platform must register with one another ahead of time, before activities and courses can be accessed from the platform. This also means that the use of 'consumer key' and 'consumer secret' to secure access to resource is no longer required. Registration happens only once, when setting up a link between the tool and a platform, and is essentially a security contract between those two respective systems.
 
Registration can be completed one of several ways:
* Manual registration - A manual exchange of URLs and IDs between the platform and tool performed by an admin user.
* Dynamic registration - Exchange of the relevant URLs and IDs is automated. The platform uses the tool's registration URL to begin this process.
 
 
Dynamic registration simplifies the configuration process for administrators significantly and should be preferred, provided it is supported by the platform. Manual registration will work on any LTI Advantage compliant platforms, so is the natural choice when the platform doesn't yet support dynamic registration.
 
===Dynamic Registration===
   
In the Moodle tool:
# As an admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
# Under the "Dynamic registration" tab, click "Generate registration URL"
# Copy the resulting URL to the clipboard using the copy to clipboard icon
   
 
In the platform:
The exact method of using a registration URL is platform-dependent.
   
In Moodle (for Moodle-to-Moodle LTI):
# As an admin user, go to "Site administration > Plugins > Activity modules > External tool > Manage tools"
# Paste the registration URL into the "Tool URL" field
# Click "Add LTI Advantage"
# When the page reloads and the tool card is visible, click "Activate".
       
 
Once complete, a platform registration and associated deployment will have been automatically configured in the Moodle tool. To see this, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration". The "Registered platforms" table contains the relevant information, however, no changes to this information are required.
   
===Manual registration:===
   
There are two parts to the manual registration process. Firstly, it requires information be copied from the Moodle tool into the platform, as part of configuring the tool there. Finally it requires information about the tool configuration in the platform be copied into the tool site to complete the process.
 
 
Starting in the Moodle tool:
# As an admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
# Select the "Manual registration" tab and leave this browser window open
   
 
Now, in the platform (the exact setup is platform dependant but this guide assumes another Moodle site is being used as the platform):
# As an admin user, go to "Site administration > Plugins > Activity modules > External tool > Manage tools"
# Click "Configure a tool manually"
# Change the field "LTI version" to "LTI 1.3"
# Change "Public key type" to "Keyset URL"
# Enable "Supports Deep Linking (Content-Item Message)"
# Copy the following URLs from the tool site into the respective form fields on the platform site:
#* Copy "Tool URL" into both the "Tool URL" field and the "Redirection URI(s)" field
#* Copy "Initiate login URL" into the "Initiate login URL" field
#* Copy "JWKS URL" into the "Public keyset" field
#* Copy "Deep linking URL" into both the "Content selection URL" field and the "Redirection URI(s)" field (on a new line)
# Set a tool name and save the configuration.
# On the resulting tool card, click "View configuration details" and leave this browser window open
 
 
Now, back in the Moodle tool again:
# As the admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
# Under "Registered platforms" click "Register a platform"
# Copy the following values from the platform site's tool configuration into the respective form fields:
#* Copy "Platform ID" into the "Platform ID (issuer)" field
#* Copy "Client ID" into the "Client ID" field
#* Copy "Public keyset URL" into the "Public keyset URL" field
#* Copy "Access token URL" into the "Access token URL" field
#* Copy "Authentication request URL" into the "Authentication request URL" field
# Enter a name for the platform and save
# For the registration you just created, click "Manage deployments"
# Click "Add a deployment"
# Copy the "Deployment ID" from the platform site's tool configuration into the "Deployment ID" field
# Enter a deployment name and save.
 
 
The registration process is now complete.


==Sharing access to a course or activity==
==Sharing access to a course or activity==
# From the course navigation, select "Published as LTI tools"
# Under the "LTI Advantage" tab (this is selected by default) click the "Add" button
# In "Tool to be published" select the course or activity to be shared
# Enable grade and user sync for the resource, if required
# Click the "Add method" button
The published activity or course is now ready for use in platforms via the content selection flow.
   
'''Note:''' The fields "Launch URL" and "Custom properties" are only relevant when sharing the content with instructors who don't have an account in the Moodle tool. If you're using Content selection, you can ignore these values.
   
Grade and user synchronisation (if configured) is handled asynchronously 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.
===User account provisioning===
When users access a shared activity or course for the first time, Moodle will need to either find an existing account or create an account for them. Historically, all first launches resulted in the creation of new user accounts in Moodle, meaning users with existing accounts had no way to reuse those accounts. Account provisioning modes solve this problem by providing control over how accounts are created or linked on first launch. Additionally, in the case of teachers, they permit a richer experience via Content Selection, a process allowing the teacher to launch into Moodle using their existing Moodle account and select from any shared course or activity they have access to. More on this in the next section.
There are two relevant settings in the published resource settings; "Student first launch provisioning mode" and "Teacher first launch provisioning mode". Each setting controls how Moodle will handle the first launch for a user of that particular role (the role assigned to the user in the platform from which they launch the tool). Currently, several modes are supported:
* New accounts only (automatic) - A new account will automatically be created for the user during first launch. This account will then be reused on subsequent launches.
* Existing and new accounts (prompt) - The user will be prompted to either link an existing account they have in Moodle, or have a new account created for them. Subsequent launches will use whichever account is the result of this choice.
* Existing accounts only (prompt) - Only existing accounts may be used. If the user does not have an existing Moodle account to use, they will be unable to access the shared resources.
   
By default, "Teacher first launch provisioning mode" is set to "Existing and new accounts (prompt)", granting teachers flexibility in how they access the tool resources. Those having accounts can choose to use their existing account, while those not having an account can opt for the latter.
The default for "Student first launch provisioning mode" is "New accounts only (automatic)". Students will have accounts created for them automatically during first launch.
Each setting can be changed for each published resource, however, with a caveat. Once a user account is linked to a platform user, subsequent launches by that platform user will use that linked account. If a user accesses one resource using 'automatic' provisioning mode, and then later launches another resource which permits the use of existing accounts, the user will not be prompted to sign in because an account is already associated with them (the account which was automatically created for them during the first launch). The same is not true for the reverse situation. If the user accesses a resource permitting the use of existing accounts first, their existing account can be linked. Subsequently accessing a resource using 'automatic' provisioning mode, will only result in the reuse of their existing (now linked) account, and not the creation of a new account.
==On the LTI platform site==
Different platforms have different means of configuring and using LTI tools. The preferred means of configuring a course or activity link is by using Deep Linking (Content Selection), however, this requires that instructors have an existing account on the Moodle tool site. In instances where this isn't the case, course or activity links can be manually configured in the platform. Both methods are described below.
=== Link creation via content selection===
The following describes the recommended process for teachers when using another Moodle site as the platform and assumes the tool-platform registration process has already been completed. More information on the Moodle external tool setup can be found at [[External tool]].
# Make sure you're signed in to the Moodle tool site in another browser tab (if not, you will be prompted to do so later)
# In the platform site, visit a course
# Add an External Tool activity, or select a pre-configured tool from the activity chooser.
# Click the "Select content" button
# When prompted, link your account
# Select from a list of activities and courses to which you have access (optionally adding line items to the platform gradebook, where applicable - see note below), clicking "Add content" when done
# Save and launch the activity
'''Note:''' For platforms supporting coupled line items, Moodle can send information about the activity's grade to the platform during content selection. This allows the platform to create the respective line item in its grade book at the time of link creation. Whether this information is returned to the platform or not depends on two things: whether the published course or activity supports grades, and whether the 'Add to gradebook' checkbox is ticked during content selection.
===Manual link creation===
For users who don't have an account on the Moodle tool site, content selection isn't possible. These users can manually configure the activity link in the platform via the following process. Again, this assumes the tool-platform registration process has already been completed.
# In the platform site, visit a course
# Add an External Tool activity, or select a pre-configured tool from the activity chooser.
# Click "Show more"
# Enter the published course or activity's "Launch URL" into the "Tool URL" field
# Enter the published course or activity's "Custom properties" into the "Custom parameters" field
# Save and launch the activity
===Custom launch parameters===
'''Note:''' If you would prefer 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.
==LTI Advantage, LTI 1.1 or LTI 2.0?==
   
Moodle supports publication of content over several IMS LTI standards; LTI Advantage, LTI 1.1 and LTI 2.0. LTI Advantage is the current standard; LTI 1.1 and 2.0 have been deprecated. Courses and activities should be published using LTI Advantage. The legacy publication methods will continue to function in their current state to allow organisations to progressively move to LTI Advantage and will be removed in the future. More information about legacy methods can be found in the "Legacy resources" section below.
==Legacy resources==
{{MediaPlayer | url = https://youtu.be/cMQiKjXdm3A}}
===Sharing access to a course or activity (LTI 1.1 and 2.0)===
[[File:published tools.png|thumb|Published tools]]
[[File:published tools.png|thumb|Published tools]]
# Go to the 'Enrolment methods' page and add 'Publish as LTI tool' as an enrolment method
# Go to the 'Enrolment methods' page and add 'Publish as LTI tool' as an enrolment method
Line 27: Line 173:
# 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. 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.
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?==
The LTI consumer can be another Moodle site or any other LTI-consumer-compliant LMS. 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.


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).
Grade and user synchronisation follow the same rules as with LTI 1.3 and LTI Advantage publishing.


===Comparison of LTI 1.1 and 2.0 terms across platforms===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 94: Line 236:
|}
|}


==On the LTI consumer site==
==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.


# Visit a course.
===LTI 1.1 and 2.0 Common issues===
# Add a LTI activity and use the URL and secret from the LTI provider site and enter any consumer key you want.
# 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.
# Log in as a student.
# Visit the course and click on the LTI activity.
# Check the activity displays as expected.


==Common issues==
====Mixed protocol limitations====
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.
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]].


=== A required parameter (oauth_consumer_key) was missing ===
==== 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.
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 ===
==== 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 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. ===
==== 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.
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 ===
==== 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.
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.



Revision as of 05:59, 21 February 2022

Moodle as an LTI provider

The 'Publish as LTI tool' enrolment plugin, together with the LTI authentication plugin, allows remote users on a different platform to access selected courses and activities. In other words, Moodle functions as an LTI tool. Courses and activities can be completed by accessing them from the remote platform. When grades are recorded, these will also be sent back to the remote platform.

LTI 1.3 and LTI Advantage

LTI 1.3 describes the core specification needed for securely launching a Tool resource from within a Platform. When the core LTI 1.3 functionality is packaged alongside the three essential services (Assignment and Grade Services v2.0, Names and Role Provisioning Services v2.0 and Deep Linking v2.0), it's called LTI Advantage. More information about LTI Advantage and its services can be found on the IMSGlobal website. See https://www.imsglobal.org/activity/learning-tools-interoperability.

With LTI Advantage, the term 'Tool' is used to refer to the external service providing functionality, while 'Platform' is used to refer to the application wanting to use the functionality provided by the tool. The terms 'Platform' and 'Tool' can be thought of as replacements for the legacy terms 'Consumer' and 'Provider' respectively.

Enabling the 'Publish as LTI tool' feature

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 can be displayed within a frame rather than in a new window, if desired.

Register Moodle with the platform

The security model for LTI 1.3 and LTI Advantage services is based on OAuth 2.0 and OpenID Connect. This differs from previous versions of the LTI standard, which used OAuth 1.0. Practically, this means the Tool and Platform must register with one another ahead of time, before activities and courses can be accessed from the platform. This also means that the use of 'consumer key' and 'consumer secret' to secure access to resource is no longer required. Registration happens only once, when setting up a link between the tool and a platform, and is essentially a security contract between those two respective systems.

Registration can be completed one of several ways:

  • Manual registration - A manual exchange of URLs and IDs between the platform and tool performed by an admin user.
  • Dynamic registration - Exchange of the relevant URLs and IDs is automated. The platform uses the tool's registration URL to begin this process.


Dynamic registration simplifies the configuration process for administrators significantly and should be preferred, provided it is supported by the platform. Manual registration will work on any LTI Advantage compliant platforms, so is the natural choice when the platform doesn't yet support dynamic registration.

Dynamic Registration

In the Moodle tool:

  1. As an admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
  2. Under the "Dynamic registration" tab, click "Generate registration URL"
  3. Copy the resulting URL to the clipboard using the copy to clipboard icon


In the platform: The exact method of using a registration URL is platform-dependent.

In Moodle (for Moodle-to-Moodle LTI):

  1. As an admin user, go to "Site administration > Plugins > Activity modules > External tool > Manage tools"
  2. Paste the registration URL into the "Tool URL" field
  3. Click "Add LTI Advantage"
  4. When the page reloads and the tool card is visible, click "Activate".


Once complete, a platform registration and associated deployment will have been automatically configured in the Moodle tool. To see this, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration". The "Registered platforms" table contains the relevant information, however, no changes to this information are required.

Manual registration:

There are two parts to the manual registration process. Firstly, it requires information be copied from the Moodle tool into the platform, as part of configuring the tool there. Finally it requires information about the tool configuration in the platform be copied into the tool site to complete the process.


Starting in the Moodle tool:

  1. As an admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
  2. Select the "Manual registration" tab and leave this browser window open


Now, in the platform (the exact setup is platform dependant but this guide assumes another Moodle site is being used as the platform):

  1. As an admin user, go to "Site administration > Plugins > Activity modules > External tool > Manage tools"
  2. Click "Configure a tool manually"
  3. Change the field "LTI version" to "LTI 1.3"
  4. Change "Public key type" to "Keyset URL"
  5. Enable "Supports Deep Linking (Content-Item Message)"
  6. Copy the following URLs from the tool site into the respective form fields on the platform site:
    • Copy "Tool URL" into both the "Tool URL" field and the "Redirection URI(s)" field
    • Copy "Initiate login URL" into the "Initiate login URL" field
    • Copy "JWKS URL" into the "Public keyset" field
    • Copy "Deep linking URL" into both the "Content selection URL" field and the "Redirection URI(s)" field (on a new line)
  7. Set a tool name and save the configuration.
  8. On the resulting tool card, click "View configuration details" and leave this browser window open


Now, back in the Moodle tool again:

  1. As the admin user, go to "Site administration > Plugins > Enrolments > Publish as LTI tool > Tool registration"
  2. Under "Registered platforms" click "Register a platform"
  3. Copy the following values from the platform site's tool configuration into the respective form fields:
    • Copy "Platform ID" into the "Platform ID (issuer)" field
    • Copy "Client ID" into the "Client ID" field
    • Copy "Public keyset URL" into the "Public keyset URL" field
    • Copy "Access token URL" into the "Access token URL" field
    • Copy "Authentication request URL" into the "Authentication request URL" field
  4. Enter a name for the platform and save
  5. For the registration you just created, click "Manage deployments"
  6. Click "Add a deployment"
  7. Copy the "Deployment ID" from the platform site's tool configuration into the "Deployment ID" field
  8. Enter a deployment name and save.


The registration process is now complete.

Sharing access to a course or activity

  1. From the course navigation, select "Published as LTI tools"
  2. Under the "LTI Advantage" tab (this is selected by default) click the "Add" button
  3. In "Tool to be published" select the course or activity to be shared
  4. Enable grade and user sync for the resource, if required
  5. Click the "Add method" button


The published activity or course is now ready for use in platforms via the content selection flow.

Note: The fields "Launch URL" and "Custom properties" are only relevant when sharing the content with instructors who don't have an account in the Moodle tool. If you're using Content selection, you can ignore these values.

Grade and user synchronisation (if configured) is handled asynchronously 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.

User account provisioning

When users access a shared activity or course for the first time, Moodle will need to either find an existing account or create an account for them. Historically, all first launches resulted in the creation of new user accounts in Moodle, meaning users with existing accounts had no way to reuse those accounts. Account provisioning modes solve this problem by providing control over how accounts are created or linked on first launch. Additionally, in the case of teachers, they permit a richer experience via Content Selection, a process allowing the teacher to launch into Moodle using their existing Moodle account and select from any shared course or activity they have access to. More on this in the next section.

There are two relevant settings in the published resource settings; "Student first launch provisioning mode" and "Teacher first launch provisioning mode". Each setting controls how Moodle will handle the first launch for a user of that particular role (the role assigned to the user in the platform from which they launch the tool). Currently, several modes are supported:

  • New accounts only (automatic) - A new account will automatically be created for the user during first launch. This account will then be reused on subsequent launches.
  • Existing and new accounts (prompt) - The user will be prompted to either link an existing account they have in Moodle, or have a new account created for them. Subsequent launches will use whichever account is the result of this choice.
  • Existing accounts only (prompt) - Only existing accounts may be used. If the user does not have an existing Moodle account to use, they will be unable to access the shared resources.


By default, "Teacher first launch provisioning mode" is set to "Existing and new accounts (prompt)", granting teachers flexibility in how they access the tool resources. Those having accounts can choose to use their existing account, while those not having an account can opt for the latter.

The default for "Student first launch provisioning mode" is "New accounts only (automatic)". Students will have accounts created for them automatically during first launch.

Each setting can be changed for each published resource, however, with a caveat. Once a user account is linked to a platform user, subsequent launches by that platform user will use that linked account. If a user accesses one resource using 'automatic' provisioning mode, and then later launches another resource which permits the use of existing accounts, the user will not be prompted to sign in because an account is already associated with them (the account which was automatically created for them during the first launch). The same is not true for the reverse situation. If the user accesses a resource permitting the use of existing accounts first, their existing account can be linked. Subsequently accessing a resource using 'automatic' provisioning mode, will only result in the reuse of their existing (now linked) account, and not the creation of a new account.

On the LTI platform site

Different platforms have different means of configuring and using LTI tools. The preferred means of configuring a course or activity link is by using Deep Linking (Content Selection), however, this requires that instructors have an existing account on the Moodle tool site. In instances where this isn't the case, course or activity links can be manually configured in the platform. Both methods are described below.

Link creation via content selection

The following describes the recommended process for teachers when using another Moodle site as the platform and assumes the tool-platform registration process has already been completed. More information on the Moodle external tool setup can be found at External tool.

  1. Make sure you're signed in to the Moodle tool site in another browser tab (if not, you will be prompted to do so later)
  2. In the platform site, visit a course
  3. Add an External Tool activity, or select a pre-configured tool from the activity chooser.
  4. Click the "Select content" button
  5. When prompted, link your account
  6. Select from a list of activities and courses to which you have access (optionally adding line items to the platform gradebook, where applicable - see note below), clicking "Add content" when done
  7. Save and launch the activity


Note: For platforms supporting coupled line items, Moodle can send information about the activity's grade to the platform during content selection. This allows the platform to create the respective line item in its grade book at the time of link creation. Whether this information is returned to the platform or not depends on two things: whether the published course or activity supports grades, and whether the 'Add to gradebook' checkbox is ticked during content selection.

Manual link creation

For users who don't have an account on the Moodle tool site, content selection isn't possible. These users can manually configure the activity link in the platform via the following process. Again, this assumes the tool-platform registration process has already been completed.

  1. In the platform site, visit a course
  2. Add an External Tool activity, or select a pre-configured tool from the activity chooser.
  3. Click "Show more"
  4. Enter the published course or activity's "Launch URL" into the "Tool URL" field
  5. Enter the published course or activity's "Custom properties" into the "Custom parameters" field
  6. Save and launch the activity

Custom launch parameters

Note: If you would prefer 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.

LTI Advantage, LTI 1.1 or LTI 2.0?

Moodle supports publication of content over several IMS LTI standards; LTI Advantage, LTI 1.1 and LTI 2.0. LTI Advantage is the current standard; LTI 1.1 and 2.0 have been deprecated. Courses and activities should be published using LTI Advantage. The legacy publication methods will continue to function in their current state to allow organisations to progressively move to LTI Advantage and will be removed in the future. More information about legacy methods can be found in the "Legacy resources" section below.

Legacy resources

Sharing access to a course or activity (LTI 1.1 and 2.0)

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. 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 follow the same rules as with LTI 1.3 and LTI Advantage publishing.

Comparison of LTI 1.1 and 2.0 terms across platforms

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

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.

LTI 1.1 and 2.0 Common issues

Mixed protocol limitations

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.

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