<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Svickers</id>
	<title>MoodleDocs - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.moodle.org/dev/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Svickers"/>
	<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/Special:Contributions/Svickers"/>
	<updated>2026-11-30T03:40:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_1.3_support&amp;diff=55553</id>
		<title>LTI 1.3 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_1.3_support&amp;diff=55553"/>
		<updated>2019-02-05T12:23:06Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Created page with &amp;quot;{{Infobox Project |name = LTI 1.3 for Moodle Tool Provider |state = Planning |tracker = MDL-64780 |discussion = [https://moodle.org/mod/forum/discuss.php?d=382042 LTI 1.3 for...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI 1.3 for Moodle Tool Provider&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-64780&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=382042 LTI 1.3 for Moodle Tool Provider]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goals==&lt;br /&gt;
Work is underway to add LTI 1.3 support for Moodle as a Tool Consumer (see MDL-62599).  This project seeks to make similar updates for the LTI Tool Provider functionality in Moodle.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
LTI 1.3 introduces a new security framework to LTI messages and service requests.  Rather than using the OAuth 1.0A message signing specification, it uses JWTs signed with asymmetric keys and OAuth 2 bearer tokens to provide access to services.  It also uses an OpenID Connect flow to initiate messages.  This means that any integration between a tool consumer (now referred to as a platform) and a tool provider (now referred to as a tool) requires different configuration data to be agreed between the two parties (a launch URL, consumer key and secret are no longer sufficient).&lt;br /&gt;
&lt;br /&gt;
IMS uses the term &amp;quot;LTI Advantage&amp;quot; to refer to systems which implement LTI 1.3 alongside the Deep Linking message (fka Content-Item message), the Names and Role Provisioning services (fka Membership service) and the Assignment and Grade services.  These need to be considered in addition to merely supporting the new security model.&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
A new LTI tool is created with &amp;lt;code php&amp;gt;&lt;br /&gt;
/enrol/editinstance.php&amp;lt;/code&amp;gt;.  This page must be updated to:&lt;br /&gt;
* allow the LTI version to be selected (1.0/1.1, 1.3 or 2.0)&lt;br /&gt;
* when LTI 1.3 is selected the secret field is hidden and additional input fields revealed for entering data provided by the Platform:&lt;br /&gt;
** client ID&lt;br /&gt;
** platform ID&lt;br /&gt;
** Authentication request URL&lt;br /&gt;
** Access Token service URL&lt;br /&gt;
** Tool Consumer Public keys URL&lt;br /&gt;
* when LTI 2.0 is selected the secret field is hidden&lt;br /&gt;
&lt;br /&gt;
Details of existing tool definitions are viewed with &amp;lt;code php&amp;gt;&lt;br /&gt;
/enrol/lti/index.php?courseid=x&amp;lt;/code&amp;gt;.  This page must be updated to:&lt;br /&gt;
* display the details according to the LTI version selected&lt;br /&gt;
** for LTI 1.0/1.1 these details would be:&lt;br /&gt;
*** Launch URL&lt;br /&gt;
*** Secret&lt;br /&gt;
*** Cartridge XML URL&lt;br /&gt;
** for LTI 1.3 these details would be:&lt;br /&gt;
*** initiate login URL&lt;br /&gt;
*** redirection URL&lt;br /&gt;
*** public key&lt;br /&gt;
** for LTI 2.0 these details would be:&lt;br /&gt;
*** Registration URL&lt;br /&gt;
&lt;br /&gt;
==Code changes==&lt;br /&gt;
* The third-party LTI Tool Provider library needs to be updated to one which supports LTI 1.3 and all references to the classes updated accordingly.&lt;br /&gt;
* New code to support the OpenID Connect workflow&lt;br /&gt;
* The changes introduced with the new security model should be handled by the LTI class library&lt;br /&gt;
&lt;br /&gt;
==Issues with existing implementation==&lt;br /&gt;
The present implementation offers a relaxed approach to connecting a tool with a Platform:&lt;br /&gt;
* each tool can be connected using either LTI 1.0/1.1 or LTI 2.0 at the choice of the platform&lt;br /&gt;
* for LTI 1.0/1.1 connections the Platform is left to select the consumer key&lt;br /&gt;
* each tool can be accessed from multiple Platforms provided each uses a different consumer key&lt;br /&gt;
* all LTI 1.0/1.1 connections to a tool will use the same secret&lt;br /&gt;
&lt;br /&gt;
The issues I see with this are:&lt;br /&gt;
* all Platforms using the same secret is not very secure&lt;br /&gt;
* allowing Platforms to select the consumer key could lead to clashes - the database requires all consumer keys to be unique&lt;br /&gt;
* allowing multiple Platforms to use the same tool definition makes it difficult to manage access (e.g. disable) for a single Platform without impacting the others&lt;br /&gt;
&lt;br /&gt;
A proposed change would be for Moodle to generate the LTI 1.0/1.1 consumer key and to limit access to only this key/secret combination - to allow access by other Platforms would require additional tools to be defined (one tool definition per Platform).  This would make it consistent with the LTI 1.3 approach which expects the Platform to supply the Client ID etc. to the Tool out-of-band.  (LTI 2.0 registrations would also be limited to one per tool.)&lt;br /&gt;
&lt;br /&gt;
In atddition, the list of activities/resources which can be made available as LTI tools includes LTI links themselves - such chaining of LTI connections is not (yet) supported in the spec.  A proposed change is that this list should exclude LTI links and only include native Moodle activities/resources.&lt;br /&gt;
&lt;br /&gt;
==New functionality==&lt;br /&gt;
The Assignment and Grade services allow a Tool to manage line-items in a Platform&#039;s gradebook.  This means that a Tool can pass back to a Platform more than one grade per user per resource link.  If such functionality is desired then some mechanism will be needed to allow a teacher to select which gradebook columns should be passed back to the Platform (I don&#039;t think leaving a Tool to pass back all the gradebook columns is appropriate, there should be some way of limiting them).&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52751</id>
		<title>LTI ContentItem Enhancements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52751"/>
		<updated>2017-07-24T19:38:37Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Minor edits&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item Enhancements&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-59402&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=354590 Enhancing support for IMS Content-Item message]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enhance the existing IMS Content-Item Message implementation in Moodle. IMS Content-Item Message is an extension of the IMS Learning Tool Interoperability (LTI) specification that allows for sharing of content, typically LTI links, between two systems. The enhancements developed as part of this project will provide a more streamlined link creation process and an improved user experience.&lt;br /&gt;
&lt;br /&gt;
Specifically, these enhancements will:&lt;br /&gt;
&lt;br /&gt;
* Allow instructors and course designers to add multiple LTI links at once; eliminating the need to access a content selector each time a link is to be added&lt;br /&gt;
* Support a more streamlined workflow where content items can optionally be added automatically without any manual intervention&lt;br /&gt;
* Enhance the user experience of using a content selector within Moodle by increasing the size of the lightbox where the content selector is rendered&lt;br /&gt;
&lt;br /&gt;
The work is not intended for now to support other content item type (like static content) although it could be extended in the future to allow for it.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [http://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
==Support for thumbnail and icon==&lt;br /&gt;
&lt;br /&gt;
Content items returned to Moodle in a Content-Item Message response optionally contain an Icon and Thumbnail (i.e., images to be displayed along with link text) data. Currently Moodle does not support display of icons/thumbnails received as part of a content item. This project would add support for both the icon and thumbnail.&lt;br /&gt;
&lt;br /&gt;
== Support for a larger lightbox for display of a content selector in External Tool==&lt;br /&gt;
&lt;br /&gt;
The current lightbox displayed by Moodle on a Content-Item Message request when initiated from the External Tool Page is rather small and often results in the need for the user to scroll vertically and horizontally. This project would update the lightbox to be larger based on screen dimensions. Outside of the wider modal, there will be no other changes in current flow of the External Tool page.&lt;br /&gt;
&lt;br /&gt;
== Direct Content Item flow from Activity Chooser ==&lt;br /&gt;
&lt;br /&gt;
This is the most significant change being proposed: a new flow is added to skip the External Tool page when launching directly from the Activity Chooser (i.e. not using the External Tool option). The goal is to make the external tool feel more integrated and behave more like an Activity Module by diving directly into the tool&#039;s User Interface and not showing any Moodle configuration page. It also allows for the creation of &#039;&#039;&#039;multiple&#039;&#039;&#039; items in a single interaction.&lt;br /&gt;
&lt;br /&gt;
=== Changes to the Tool Configuration ===&lt;br /&gt;
&lt;br /&gt;
The new behavior will be an opt-in flow, thus not impacting current deployments. The new option in the tool settings is to skip the External Tool page when adding an activity from the activity chooser. This option is only available if the tool supports the Content Item flow; it also requires the tool to be listed in the activity chooser. This setting does not change the flow when the link is added using the External Tool option.&lt;br /&gt;
&lt;br /&gt;
Here is an early mockup of how this option could be proposed:&lt;br /&gt;
&lt;br /&gt;
[[image:mdl_mock_settings.png]]&lt;br /&gt;
&lt;br /&gt;
=== Streamlined add flow ===&lt;br /&gt;
&lt;br /&gt;
Once the tool is configured to skip the External Tool page, when a user selects the tool directly in the activity chooser, the user is sent directly to the Tool Provider using the ContentItemSelectionRequest launch. The parameters in the launch now include:&lt;br /&gt;
&lt;br /&gt;
- &#039;&#039;&#039;auto_create: true&#039;&#039;&#039; indicating the links will be created directly on return &lt;br /&gt;
- &#039;&#039;&#039;accept_multiple: true&#039;&#039;&#039; indicating it is ok to return more than one Content Item&lt;br /&gt;
&lt;br /&gt;
The actual Tool UI will be in an IFrame, and the return URL would handle the Items, add them directly to the course and create the grade item if the content item defines a line item. Then it would redirect the user to the course page with those links added in (similar to a regular Activity Module flow). An empty content item return would act as a Cancel, no item would be added and the user would be returned to the course page.&lt;br /&gt;
&lt;br /&gt;
[[Image:mdl_mock_add_cisr.png]]&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52650</id>
		<title>LTI Gradebook Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52650"/>
		<updated>2017-06-27T16:06:45Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Gradebook Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-59403&lt;br /&gt;
|discussion =[https://moodle.org/mod/forum/discuss.php?d=354378 Support for Gradebook services]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to add support for the LTI Gradebook Services as per the specification available from the IMS website.  LTI Gradebook Services allow Tool Providers more control over gradebook columns and scores than currently possible with Basic Outcome. LTI Gradebook Services are in candidate final draft at the time of writing.&lt;br /&gt;
&lt;br /&gt;
Given the importance of the gradebook feature within Moodle and the sensitive nature of gradebook data the guiding principles of this project will be to minimize the impact on the existing gradebook and to ensure best practices with regard to security.&lt;br /&gt;
&lt;br /&gt;
The Gradebook Services allow much more versatility around Grades reporting allowing use cases not achievable under the Basic Outcome model; for example:&lt;br /&gt;
&lt;br /&gt;
* Posting a score for a student no longer requires the student to actually launch the activity; &lt;br /&gt;
* There is no longer a requirement to have a Resource Link for each gradebook column; for example, a single link could launch a complex piece of content containing many different assignments, and the instructor can decide which one of those would be reported in the gradebook, without having to also create distinct Resource Links for those. &lt;br /&gt;
* On course copy, the resource_id attached to each line item allows the Tool Provider to re-bind to the copied Line Items.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [https://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LTI Gradebook Services defines three services: LineItem, Result and Score. At a high level, these services provide CRUD operations on gradebook columns (line items) and cells (scores). The specification also defines an API that allows for management of collections of line items within a given context (e.g., a course section), collections of scores for a given line item, as well as for managing individual line items, results and scores (the distinction between results and scores is that scores represent the value as received from the tool provider and are considered immutable by the tool consumer).&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages. All web service payloads use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LineItem service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows line items (gradebook columns) in the Moodle gradebook to be managed by an LTI Tool Provider. Only line items created by (or for) the Tool Provider can be read/updated/deleted by it. Each line item will be owned by the Tool Provider and associated with a specific context (e.g., course section). The specification does not impose any limits on the number of line items which can be created by a Tool Provider. Of course, a Moodle administrator does not have to make these services available to a Tool Provider. The LineItem service specification defines an API for CRUD operations on a single line item as well as collections of line items.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Score service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows scores (gradebook cells) in the Moodle gradebook to be managed by an LTI Tool Provider. In addition to the literal score the score service also allows for the passing of a comment about the grade. The Score service is conceptually similar to the Result service. However, as mentioned above, Score resources should be considered immutable by the tool consumer. The Score service specification defines an API for CRUD operations on a single score as well as the retrieval of the collection of scores for a given item. There is a only a single current Score for a given (user, lineItem) tuple.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Result service&#039;&#039;&#039;&lt;br /&gt;
The Result service specification defines an API for the retrieval of a single result. Contrarily to the Score, the Result is to represent the actual value shown in the gradebook, which might vary from the score provided by the tool provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The various services are complemented by variables to inject the resource end points in messages; LineItems.url allows access to the collections of line items for the current context and tool provider. It is the main entry point in the gradebook service.&lt;br /&gt;
&lt;br /&gt;
In the case there is a &#039;&#039;direct&#039;&#039; association between a resource link and a gradebook column, the Score.url, Scores.url, LineItems.url can also be passed as parameters. The Score.url allows CRUD operation on the score, acting as a direct replacement for the (lis_outcome_service_url, lis_result_sourcedid) tuple from Basic Outcome, while LineItem.url allows access to the associated LineItem and Scores.url is the container for all the scores of the associated line item.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52649</id>
		<title>LTI ContentItem Enhancements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52649"/>
		<updated>2017-06-27T16:03:18Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item Enhancements&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-59402&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=354590 Enhancing support for IMS Content-Item message]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enhance the existing IMS Content-Item Message implementation in Moodle. IMS Content-Item Message is an extension of the IMS Learning Tool Interoperability (LTI) specification that allows for sharing of content, typically LTI links, between two systems. The enhancements developed as part of this project will provide a more streamlined link creation process and an improved user experience.&lt;br /&gt;
&lt;br /&gt;
Specifically, these enhancements will:&lt;br /&gt;
&lt;br /&gt;
* Allow instructors and course designers to add multiple content items at once; eliminating the need to access a content selector each time a link is to be added&lt;br /&gt;
* Support a more streamlined workflow where content items can optionally be added automatically without any manual intervention&lt;br /&gt;
* Enhance the user experience of using a content selector within Moodle by increasing the size of the lightbox where the content selector is rendered&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [http://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As mentioned above the focus of this project will be improve the user experience and streamline the link creation process of the IMS Content-Item Message implementation within Moodle. To that end the following enhancements will be undertaken as part of this effort:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for thumbnail&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Content items returned to Moodle in a Content-Item Message response optionally contain a thumbnail (i.e., images to be displayed along with link text) data. Currently Moodle does not support display of the thumbnails received as part of a content item. This project would add support for both the thumbnail.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for a larger lightbox for display of a content selector&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current lightbox displayed by Moodle on a Content-Item Message request is rather small and often results in the need for the user to scroll vertically and horizontally. This project would update the lightbox to be larger based on screen dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for multiple content items and automatic creation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current Moodle Content-Item implementation only allows for receipt of a single content item per request. The project will update the implementation to support receipt of multiple content-items. Additionally, this project will add support for the auto_create flag which will allow for creation of content items in Moodle without the need for manual review and acceptance (i.e., the user will not be presented with the screen prompting them to accept the content items). Both multiple content-item and auto_create are part of the IMS Content-Item Message specification so the implementation will still be in alignment with the standard. The auto_create option will be configurable.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52641</id>
		<title>LTI Gradebook Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52641"/>
		<updated>2017-06-22T14:51:21Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Gradebook Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion =[https://moodle.org/mod/forum/discuss.php?d=354378 Support for Gradebook services]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to add support for the LTI Gradebook Services as per the specification available from the IMS website.  LTI Gradebook Services allow Tool Providers more control over gradebook columns and scores than currently possible with Basic Outcome. LTI Gradebook Services are in candidate final draft at the time of writing.&lt;br /&gt;
&lt;br /&gt;
Given the importance of the gradebook feature within Moodle and the sensitive nature of gradebook data the guiding principles of this project will be to minimize the impact on the existing gradebook and to ensure best practices with regard to security.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [https://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LTI Gradebook Services defines three services: LineItem, Result and Score. At a high level, these services provide CRUD operations on gradebook columns (line items) and cells (scores). The specification also defines an API that allows for management of collections of line items within a given context (e.g., a course section), collections of scores for a given line item, as well as for managing individual line items, results and scores (the distinction between results and scores is that scores represent the value as received from the tool provider and are considered immutable by the tool consumer).&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages. All web service payloads use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LineItem service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows line items (gradebook columns) in the Moodle gradebook to be managed by an LTI Tool Provider. Only line items created by (or for) the Tool Provider can be read/updated/deleted by it. Each line item will be owned by the Tool Provider and associated with a specific context (e.g., course section). The specification does not impose any limits on the number of line items which can be created by a Tool Provider. Of course, a Moodle administrator does not have to make these services available to a Tool Provider. The LineItem service specification defines an API for CRUD operations on a single line item as well as collections of line items.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Score service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows scores (gradebook cells) in the Moodle gradebook to be managed by an LTI Tool Provider. In addition to the literal score the score service also allows for the passing of a comment about the grade. The Score service is conceptually similar to the Result service. However, as mentioned above, Score resources should be considered immutable by the tool consumer. The Score service specification defines an API for CRUD operations on a single score as well as the retrieval of the collection of scores for a given item. There is a only a single current Score for a given (user, lineItem) tuple.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Result service&#039;&#039;&#039;&lt;br /&gt;
The Result service specification defines an API for the retrieval of a single result. Contrarily to the Score, the Result is to represent the actual value shown in the gradebook, which might vary from the score provided by the tool provider.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Variables&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The various services are complemented by variables to inject the resource end points in messages; LineItems.url allows access to the collections of line items for the current context and tool provider. It is the main entry point in the gradebook service.&lt;br /&gt;
&lt;br /&gt;
In the case there is a &#039;&#039;direct&#039;&#039; association between a resource link and a gradebook column, the Score.url, Scores.url, LineItems.url can also be passed as parameters. The Score.url allows CRUD operation on the score, acting as a direct replacement for the (lis_outcome_service_url, lis_result_sourcedid) tuple from Basic Outcome, while LineItem.url allows access to the associated LineItem and Scores.url is the container for all the scores of the associated line item.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52636</id>
		<title>LTI ContentItem Enhancements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52636"/>
		<updated>2017-06-22T08:41:38Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item Enhancements&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to enhance the existing IMS Content-Item Message implementation in Moodle. IMS Content-Item Message is an extension of the IMS Learning Tool Interoperability (LTI) specification that allows for sharing of content, typically LTI links, between two systems. The enhancements developed as part of this project will provide a more streamlined link creation process and an improved user experience.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [http://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As mentioned above the focus of this project will be improve the user experience and streamline the link creation process of the IMS Content-Item Message implementation within Moodle. To that end the following enhancements will be undertaken as part of this effort:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for thumbnail&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Content items returned to Moodle in a Content-Item Message response optionally contain a thumbnail (i.e., images to be displayed along with link text) data. Currently Moodle does not support display of the thumbnails received as part of a content item. This project would add support for both the thumbnail.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for a larger lightbox for display of a content selector&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current lightbox displayed by Moodle on a Content-Item Message request is rather small and often results in the need for the user to scroll vertically and horizontally. This project would update the lightbox to be larger based on screen dimensions.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Support for multiple content items and automatic creation&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The current Moodle Content-Item implementation only allows for receipt of a single content item per request. The project will update the implementation to support receipt of multiple content-items. Additionally, this project will add support for the auto_create flag which will allow for creation of content items in Moodle without the need for manual review and acceptance (i.e., the user will not be presented with the screen prompting them to accept the content items). Both multiple content-item and auto_create are part of the IMS Content-Item Message specification so the implementation will still be in alignment with the standard. The auto_create option will be configurable.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52635</id>
		<title>LTI Gradebook Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52635"/>
		<updated>2017-06-22T08:38:47Z</updated>

		<summary type="html">&lt;p&gt;Svickers: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Gradebook Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion =TBA&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Project goal ==&lt;br /&gt;
&lt;br /&gt;
The goal of this project is to add support for the LTI Gradebook 2 services as per the specification available from the IMS website.  LTI Gradebook 2 services extend the Basic Outcomes to allow Tool Providers more control over gradebook columns and scores. LTI Gradebook 2 services are in candidate final draft at the time of writing.&lt;br /&gt;
&lt;br /&gt;
Given the importance of the gradebook feature within Moodle and the sensitive nature of gradebook data the guiding principles of this project will be to minimize the impact on the existing gradebook and to ensure best practices with regard to security.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the support of [https://www.cengage.com/ Cengage].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LTI Gradebook 2 defines three services: LineItem, Result and Score. At a high level, these services provide CRUD operations on gradebook columns (line items) and cells (scores). The specification also defines an API that allows for management of collections of line items within a given context (e.g., a course section), collections of scores for a given line item, as well as for managing individual line items, results and scores (the distinction between results and scores is that scores represent the value as received from the tool provider and are considered immutable by the tool consumer).&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages. All web service payloads use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;LineItem service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows line items (gradebook columns) in the Moodle gradebook to be managed by an LTI Tool Provider. Only line items created by (or for) the Tool Provider can be read/updated/deleted by it. Each line item will be owned by the Tool Provider and associated with a specific context (e.g., course section). The specification does not impose any limits on the number of line items which can be created by a Tool Provider. Of course, a Moodle administrator does not have to make these services available to a Tool Provider. The LineItem service specification defines an API for CRUD operations on a single line item as well as collections of line items.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Score service&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Allows scores (gradebook cells) in the Moodle gradebook to be managed by an LTI Tool Provider. In addition to the literal score the score service also allows for the passing of a comment about the grade. The Score service is conceptually similar to the Result service. However, as mentioned above, Score resources should be considered immutable by the tool consumer. The Score service specification defines an API for CRUD operations on a single score as well as a collection of scores.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Result service&#039;&#039;&#039;&lt;br /&gt;
The Result service specification defines an API for the retrieval of a single result.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52603</id>
		<title>LTI ContentItem Enhancements</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_ContentItem_Enhancements&amp;diff=52603"/>
		<updated>2017-06-13T15:25:05Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Created page with &amp;quot;{{Infobox Project |name = LTI Content-Item Enhancements |state = Planning |tracker = TBA |discussion = TBA |assignee = Stephen Vickers }}  &amp;#039;&amp;#039;&amp;#039;This page is under development&amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item Enhancements&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This page is under development&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52602</id>
		<title>LTI Gradebook Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Gradebook_Services&amp;diff=52602"/>
		<updated>2017-06-13T15:19:35Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Created page with &amp;quot;{{Infobox Project |name = LTI Gradebook Services |state = Planning |tracker = TBA |discussion =TBA |assignee = Stephen Vickers }}  &amp;#039;&amp;#039;&amp;#039;This page is under development&amp;#039;&amp;#039;&amp;#039; ==Proje...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Gradebook Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion =TBA&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This page is under development&#039;&#039;&#039;&lt;br /&gt;
==Project goal==&lt;br /&gt;
TBA&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
TBA&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Caliper&amp;diff=50882</id>
		<title>Caliper</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Caliper&amp;diff=50882"/>
		<updated>2016-09-11T18:38:11Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Caliper Logstore component uses the Moodle Logging interface to capture user events and emit them to a Caliper event store.  The [https://www.imsglobal.org/caliper Caliper Framework] is a specification from IMS Global which provides a data representation of learning activities and an API for transmitting these to an event store for later analysis.  Metric profiles are used to describe different types of learning activity, allowing representations to be matched against the nature of the activity.  Events may be sent immediately to the event store, or captured for sending later in batches.&lt;br /&gt;
&lt;br /&gt;
== Events supported ==&lt;br /&gt;
&lt;br /&gt;
The following table shows the mapping of Moodle URLs to Caliper events supported by the current version of this component:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Supported Caliper Events&lt;br /&gt;
|-&lt;br /&gt;
!Metric Profile&lt;br /&gt;
!Action&lt;br /&gt;
!Moodle URL&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Session&lt;br /&gt;
|Logged In&lt;br /&gt;
|\core\event\user_loggedin&lt;br /&gt;
|-&lt;br /&gt;
|Logged Out&lt;br /&gt;
|\core\event\user_loggedout&lt;br /&gt;
|-&lt;br /&gt;
|Navigation&lt;br /&gt;
|Navigated To&lt;br /&gt;
|\core\event\course_viewed&lt;br /&gt;
|-&lt;br /&gt;
|View&lt;br /&gt;
|Viewed&lt;br /&gt;
|&lt;br /&gt;
\mod_book\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_chat\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_choice\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_data\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_facetoface\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_feedback\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_folder\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_forum\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_forum\event\user_report_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_glossary\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_imscp\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_lesson\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_lti\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_page\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_quiz\event\attempt_reviewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_quiz\event\attempt_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_quiz\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_resource\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_scorm\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_survey\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_url\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_wiki\event\course_module_viewed&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_workshop\event\course_module_viewed&lt;br /&gt;
|-&lt;br /&gt;
|rowspan=&amp;quot;2&amp;quot;|Assessment&lt;br /&gt;
|Started&lt;br /&gt;
|\mod_quiz\event\attempt_started&lt;br /&gt;
|-&lt;br /&gt;
|Submitted&lt;br /&gt;
|&lt;br /&gt;
\mod_quiz\event\attempt_submitted&amp;lt;br /&amp;gt;&lt;br /&gt;
\mod_assign\event\assessable_submitted&lt;br /&gt;
|-&lt;br /&gt;
|Outcome&lt;br /&gt;
|Graded&lt;br /&gt;
|\mod_assign\event\submission_graded&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== How does it work? ==&lt;br /&gt;
&lt;br /&gt;
The component adopts the same implementation method as the logstore component for [https://moodle.org/plugins/logstore_xapi xAPI].  It is made up of three parts: an [https://github.com/LearningLocker/Moodle-Log-Expander Expander], a Translator, and an Emitter.  Each log entry follows a six step process before finally reaching the event store:&lt;br /&gt;
&lt;br /&gt;
# The component passes the log entry from the logstore_standard_log to the Expander.&lt;br /&gt;
# The Expander expands the log entry with data from the Moodle database.&lt;br /&gt;
# The component passes the expanded event from to the Translator.&lt;br /&gt;
# The Translator translates the expanded event to Caliper metric profile options.&lt;br /&gt;
# The component passes the translated event to the Emitter.&lt;br /&gt;
# The Emitter emits the event to the event store using the Caliper Sensor API.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
The component can be installed onto a Moodle 2.7+ instance as follows:&lt;br /&gt;
&lt;br /&gt;
# [https://moodle.org/plugins/logstore_caliper Download the component].&lt;br /&gt;
# Log into your instance of Moodle as a System Administrator.&lt;br /&gt;
# Go to &#039;&#039;/admin/tool/installaddon/&#039;&#039; on your Moodle instance.&lt;br /&gt;
# Drag and drop your download from step 1.&lt;br /&gt;
# Click &#039;&#039;Install plugin from the ZIP file&#039;&#039;.&lt;br /&gt;
# Click &#039;&#039;Install plugin!&#039;&#039;.&lt;br /&gt;
# Click &#039;&#039;Upgrade Moodle database now&#039;&#039;.&lt;br /&gt;
# Click &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
# Complete the component&#039;s settings page:&lt;br /&gt;
#* &#039;&#039;Event Store URL&#039;&#039;;&lt;br /&gt;
#* &#039;&#039;API Key&#039;&#039;;&lt;br /&gt;
#* &#039;&#039;Send statements immediately to event store?&#039;&#039;;&lt;br /&gt;
#* &#039;&#039;Batch size&#039;&#039;.&lt;br /&gt;
# Click &#039;&#039;Save changes&#039;&#039;.&lt;br /&gt;
# Go to &#039;&#039;/admin/settings.php?section=managelogging&#039;&#039; on your Moodle instance.&lt;br /&gt;
# Enable the &#039;&#039;Caliper log store&#039;&#039; component (use the &#039;&#039;Settings&#039;&#039; option to update the component&#039;s settings values).&lt;br /&gt;
&lt;br /&gt;
NB If zip installation is disabled, you can unzip the zip file to &#039;&#039;/admin/tool/log/store&#039;&#039; instead of steps 3 to 5 above.&lt;br /&gt;
&lt;br /&gt;
== About the Contributors ==&lt;br /&gt;
This plugin was contributed by the Blackboard Product Development team.  Blackboard is an education technology company dedicated to bringing excellent online teaching to institutions across the globe.  We serve colleges and universities, schools and organizations by supporting the software that educators use to manage and deliver instructional content to learners in virtual classrooms.  We are proud to be a Moodle Partner company.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48522</id>
		<title>LTI Outcomes2 Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48522"/>
		<updated>2015-09-21T15:59:50Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added tracker item ID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Outcomes Management 2 Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-51480&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=317752 Support for LTI Outcomes Management 2 services]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Outcomes Management 2 services as per the specification available from the [http://www.imsglobal.org/lti/ IMS website].  These services are sometimes referred to as &amp;quot;rich outcomes&amp;quot; and are in public draft at the time of writing.  They allow LTI Tool Providers to manage columns in the gradebook of an LTI Tool Consumer.  Their implementation allows LTI tools to overcome the limitation of the LTI 1.1 Basic Outcomes Service which restricts each resource link to having a single gradebook column associated with it.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the kind support of [https://www.vitalsource.com/ Vitalsource].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
There are two main services: LineItem and LISResult which provide CRUD operations on line items (columns) and results (cells).  Service endpoints are provided for both containers (collections) of line items for a course and sets of results for a line item, as well as for managing individual line item and result resources.  A media type is also defined for obtaining details of a line item together with its associated results.&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages.  The OAuth signature is placed in the Authorization header of the message and the payloads all use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
==LineItem service==&lt;br /&gt;
Allows line items to be created, read, updated and deleted by a Tool Provider in the Tool Consumer gradebook.  Only line items created by the Tool Provider can be read/updated/deleted by it.  Each line item will be owned by the Tool Provider and associated with a specific context (course); they are not connected to any specific resource link, just a context.  The specification does not impose any limits on the number of line items which can be created by a Tool Provider - all part of the trust relationship implemented by LTI.  (Of course, a Moodle administrator does not have to make these services available to a Tool Provider.)  The line item which may have been auto-created for a resource link can also be accessed via these services, so it will be included in lists of line items for the context in which the resource link resides.  These services provide an alternative way of managing these line items; the LTI 1.1 Basic Outcomes service may also continue to be used.&lt;br /&gt;
&lt;br /&gt;
On launch a Tool Provider may be passed two URLs as custom parameters: an endpoint for the container of all line items for the context and an endpoint for the auto-created (LTI 1.1) line item (if any).  The endpoints for any of the other line items can be obtained from the container service.&lt;br /&gt;
&lt;br /&gt;
==LISResult service==&lt;br /&gt;
The LISResult service allows a Tool Provider to create, read, update and delete results (grades) in the line items which can be accessed through the LineItem service.  A grade may also include a comment (feedback).  This service cannot be used to access any other grades in the gradebook; just those belonging to the Tool Provider&#039;s line items.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48415</id>
		<title>LTI Outcomes2 Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48415"/>
		<updated>2015-08-03T17:14:41Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Outcomes Management 2 Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=317752 Support for LTI Outcomes Management 2 services]&lt;br /&gt;
|assignee = Stephen Vickers&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Outcomes Management 2 services as per the specification available from the [http://www.imsglobal.org/lti/ IMS website].  These services are sometimes referred to as &amp;quot;rich outcomes&amp;quot; and are in public draft at the time of writing.  They allow LTI Tool Providers to manage columns in the gradebook of an LTI Tool Consumer.  Their implementation allows LTI tools to overcome the limitation of the LTI 1.1 Basic Outcomes Service which restricts each resource link to having a single gradebook column associated with it.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the kind support of [https://www.vitalsource.com/ Vitalsource].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
There are two main services: LineItem and LISResult which provide CRUD operations on line items (columns) and results (cells).  Service endpoints are provided for both containers (collections) of line items for a course and sets of results for a line item, as well as for managing individual line item and result resources.  A media type is also defined for obtaining details of a line item together with its associated results.&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages.  The OAuth signature is placed in the Authorization header of the message and the payloads all use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
==LineItem service==&lt;br /&gt;
Allows line items to be created, read, updated and deleted by a Tool Provider in the Tool Consumer gradebook.  Only line items created by the Tool Provider can be read/updated/deleted by it.  Each line item will be owned by the Tool Provider and associated with a specific context (course); they are not connected to any specific resource link, just a context.  The specification does not impose any limits on the number of line items which can be created by a Tool Provider - all part of the trust relationship implemented by LTI.  (Of course, a Moodle administrator does not have to make these services available to a Tool Provider.)  The line item which may have been auto-created for a resource link can also be accessed via these services, so it will be included in lists of line items for the context in which the resource link resides.  These services provide an alternative way of managing these line items; the LTI 1.1 Basic Outcomes service may also continue to be used.&lt;br /&gt;
&lt;br /&gt;
On launch a Tool Provider may be passed two URLs as custom parameters: an endpoint for the container of all line items for the context and an endpoint for the auto-created (LTI 1.1) line item (if any).  The endpoints for any of the other line items can be obtained from the container service.&lt;br /&gt;
&lt;br /&gt;
==LISResult service==&lt;br /&gt;
The LISResult service allows a Tool Provider to create, read, update and delete results (grades) in the line items which can be accessed through the LineItem service.  A grade may also include a comment (feedback).  This service cannot be used to access any other grades in the gradebook; just those belonging to the Tool Provider&#039;s line items.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48414</id>
		<title>LTI Outcomes2 Services</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Outcomes2_Services&amp;diff=48414"/>
		<updated>2015-08-03T17:04:49Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Implementing LTI Outcomes Management 2 (rich outcomes) services&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Outcomes Management 2 Services&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Outcomes Management 2 services as per the specification available from the [http://www.imsglobal.org/lti/ IMS website].  These services are sometimes referred to as &amp;quot;rich outcomes&amp;quot; and are in public draft at the time of writing.  They allow LTI Tool Providers to manage columns in the gradebook of an LTI Tool Consumer.  Their implementation allows LTI tools to overcome the limitation of the LTI 1.1 Basic Outcomes Service which restricts each resource link to having a single gradebook column associated with it.&lt;br /&gt;
&lt;br /&gt;
This work is being undertaken with the kind support of [https://www.vitalsource.com/ Vitalsource].&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
There are two main services: LineItem and LISResult which provide CRUD operations on line items (columns) and results (cells).  Service endpoints are provided for both containers (collections) of line items for a course and sets of results for a line item, as well as for managing individual line item and result resources.  A media type is also defined for obtaining details of a line item together with its associated results.&lt;br /&gt;
&lt;br /&gt;
The services are secured in the same way as other LTI services, using the same consumer key and shared secret as used for LTI launch messages.  The OAuth signature is placed in the Authorization header of the message and the payloads all use JSON-LD.&lt;br /&gt;
&lt;br /&gt;
==LineItem service==&lt;br /&gt;
Allows line items to be created, read, updated and deleted by a Tool Provider in the Tool Consumer gradebook.  Only line items created by the Tool Provider can be read/updated/deleted by it.  Each line item will be owned by the Tool Provider and associated with a specific context (course); they are not connected to any specific resource link, just a context.  The specification does not impose any limits on the number of line items which can be created by a Tool Provider - all part of the trust relationship implemented by LTI.  (Of course, a Moodle administrator does not have to make these services available to a Tool Provider.)  The line item which may have been auto-created for a resource link can also be accessed via these services, so it will be included in lists of line items for the context in which the resource link resides.  These services provide an alternative way of managing these line items; the LTI 1.1 Basic Outcomes service may also continue to be used.&lt;br /&gt;
&lt;br /&gt;
On launch a Tool Provider may be passed two URLs as custom parameters: an endpoint for the container of all line items for the context and an endpoint for the auto-created (LTI 1.1) line item (if any).  The endpoints for any of the other line items can be obtained from the container service.&lt;br /&gt;
&lt;br /&gt;
==LISResult service==&lt;br /&gt;
The LISResult service allows a Tool Provider to create, read, update and delete results (grades) in the line items which can be accessed through the LineItem service.  A grade may also include a comment (feedback).  This service cannot be used to access any other grades in the gradebook; just those belonging to the Tool Provider&#039;s line items.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47522</id>
		<title>LTI Content Item</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47522"/>
		<updated>2015-03-20T12:08:20Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added tracker link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item message&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-49609&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=293571 Support for LTI Content-Item message]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Content-Item message as per the specification available from [http://www.imsglobal.org/lti/]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This message type provides an improved workflow for teachers adding links to their courses, such that the configuration of the link by the tool provider can be included in the process.  This avoids the current two-step process of creating the link and then launching it to access any configuration options the tool provider has to offer.  It also means that students will not be presented with unconfigured links in their courses, because the link will not be created until after the configuration has occurred.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47468</id>
		<title>LTI Content Item</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47468"/>
		<updated>2015-03-08T18:53:13Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added discussion forum reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item message&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=293571 Support for LTI Content-Item message]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Content-Item message as per the specification available from [http://www.imsglobal.org/lti/]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This message type provides an improved workflow for teachers adding links to their courses, such that the configuration of the link by the tool provider can be included in the process.  This avoids the current two-step process of creating the link and then launching it to access any configuration options the tool provider has to offer.  It also means that students will not be presented with unconfigured links in their courses, because the link will not be created until after the configuration has occurred.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47467</id>
		<title>LTI Content Item</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_Content_Item&amp;diff=47467"/>
		<updated>2015-03-08T18:49:22Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Created page with &amp;quot;{{Infobox Project |name = LTI Content-Item message |state = Planning |tracker = TBA |discussion = TBA |assignee = Stephen Vickers }} ==Project goal==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox Project&lt;br /&gt;
|name = LTI Content-Item message&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = TBA&lt;br /&gt;
|discussion = TBA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goal==&lt;br /&gt;
The goal of this project is to add support for the LTI Content-Item message as per the specification available from [http://www.imsglobal.org/lti/]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This message type provides an improved workflow for teachers adding links to their courses, such that the configuration of the link by the tool provider can be included in the process.  This avoids the current two-step process of creating the link and then launching it to access any configuration options the tool provider has to offer.  It also means that students will not be presented with unconfigured links in their courses, because the link will not be created until after the configuration has occurred.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=Conditional_activities_API&amp;diff=47454</id>
		<title>Conditional activities API</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=Conditional_activities_API&amp;diff=47454"/>
		<updated>2015-03-05T16:06:23Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
Conditional Apis allow you to specify , if to show or hide an activity when the conditions associated with it are met/not met. This should not be confused with [https://docs.moodle.org/dev/Activity_completion_API completion API] which is used to mark if an activity is completed or not. That is conditional API is used to handle the availability of an activity where as completion helps to track the progress of student in an activity.&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
The main file containing all important conditional stuff is located at lib/conditionlib.php&lt;br /&gt;
&lt;br /&gt;
== Functions and Examples ==&lt;br /&gt;
The class condition_info defined in lib/conditionlib.php is the main conditional API in Moodle. Following are some important methods of the above mentioned class.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
fill_availability_conditions(&amp;amp;$cm)&lt;br /&gt;
get_full_course_module()&lt;br /&gt;
add_completion_condition($cmid, $requiredcompletion)&lt;br /&gt;
add_grade_condition($gradeitemid, $min, $max, $updateinmemory=false)&lt;br /&gt;
wipe_conditions()&lt;br /&gt;
get_full_information($modinfo=null)&lt;br /&gt;
is_available(&amp;amp;$information, $grabthelot=false, $userid=0, $modinfo=null)&lt;br /&gt;
show_availability()&lt;br /&gt;
update_cm_from_form($cm, $fromform, $wipefirst=true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The basic functionality of these methods can be classified as:-&lt;br /&gt;
# Fetching information related to conditions&lt;br /&gt;
# Adding/Updating conditional clauses to activities&lt;br /&gt;
# Deleting conditions attached to activities&lt;br /&gt;
&lt;br /&gt;
=== Fetching information related to conditions ===&lt;br /&gt;
Following functions are normally used to fetch information regarding conditions associated with activities:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
get_full_course_module();&lt;br /&gt;
get_full_information($modinfo=null);&lt;br /&gt;
is_available(&amp;amp;$information, $grabthelot=false, $userid=0, $modinfo=null);&lt;br /&gt;
show_availability();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== get_full_course_module() ====&lt;br /&gt;
This method can fetches and returns all necessary information as a course module object which are required to determine the availability conditions.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$cm-&amp;gt;id = $id;&lt;br /&gt;
$test = new condition_info($cm,CONDITION_MISSING_EVERYTHING);&lt;br /&gt;
$fullcm = $test-&amp;gt;get_full_course_module();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== get_full_information() ====&lt;br /&gt;
This function returns a string which describes the various conditions in place for the activity in the given context.Some possible outputs can be:-&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 a) From 13:05 on 14 Oct until 12:10 on 17 Oct (exact, exact)&lt;br /&gt;
 b) From 14 Oct until 12:11 on 17 Oct (midnight, exact)&lt;br /&gt;
 c) From 13:05 on 14 Oct until 17 Oct (exact, midnight 18 Oct)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Please refer the inline documentation in the code for detailed explanation of the logic and all possible cases.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$ci = new condition_info($mod);&lt;br /&gt;
$fullinfo = $ci-&amp;gt;get_full_information();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== is_available() ====&lt;br /&gt;
This function is used to check if a given course module is currently available or not. A thing worth noting is that this doesn&#039;t take &amp;quot;visibility settings&amp;quot; and &amp;quot;viewhiddenactivities&amp;quot; capability into account. That is these settings should be properly checked after the result of is_available(), before dumping any data to the user.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$ci = new condition_info((object)array(&#039;id&#039;=&amp;gt;$cmid),CONDITION_MISSING_EVERYTHING);&lt;br /&gt;
$bool = $ci-&amp;gt;is_available($text,false,0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== show_availability() ====&lt;br /&gt;
This function is used to check if information regarding availability of the current module should be shown to the user or not.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$ci = new condition_info((object)array(&#039;id&#039;=&amp;gt;$cmid),CONDITION_MISSING_EVERYTHING);&lt;br /&gt;
$bool = $ci-&amp;gt;show_availability();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Adding/Updating conditional clauses to activities ===&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
fill_availability_conditions(&amp;amp;$cm);&lt;br /&gt;
add_completion_condition($cmid, $requiredcompletion);&lt;br /&gt;
add_grade_condition($gradeitemid, $min, $max, $updateinmemory=false);&lt;br /&gt;
update_cm_from_form($cm, $fromform, $wipefirst=true)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== fill_availability_conditions() ====&lt;br /&gt;
This function adds any extra availability conditions to given course module object.&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$rawmods = get_course_mods($courseid);&lt;br /&gt;
if (empty($rawmods)) {&lt;br /&gt;
    die;&lt;br /&gt;
}&lt;br /&gt;
if ($sections = $DB-&amp;gt;get_records(&amp;quot;course_sections&amp;quot;, array(&amp;quot;course&amp;quot;=&amp;gt;$courseid), &amp;quot;section ASC&amp;quot;)) {&lt;br /&gt;
    foreach ($sections as $section) {&lt;br /&gt;
        if (!empty($section-&amp;gt;sequence)) {&lt;br /&gt;
            $sequence = explode(&amp;quot;,&amp;quot;, $section-&amp;gt;sequence);&lt;br /&gt;
                foreach ($sequence as $seq) {&lt;br /&gt;
                    if (empty($rawmods[$seq])) {&lt;br /&gt;
                        continue;&lt;br /&gt;
                    }&lt;br /&gt;
                    if (!empty($CFG-&amp;gt;enableavailability)) {&lt;br /&gt;
                         condition_info::fill_availability_conditions($rawmods[$seq]);&lt;br /&gt;
                         //do something&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}  &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== add_completion_condition() ====&lt;br /&gt;
In Moodle availability condition of a Module or activity can depend on another activity. For example activity B will not be unlocked untill activity A is successfully completed. To add such inter-dependent condtions, this funtion is used.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$test1=new condition_info((object)array(&#039;id&#039;=&amp;gt;$cmid),CONDITION_MISSING_EVERYTHING);&lt;br /&gt;
$test1-&amp;gt;add_completion_condition(13,3);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==== add_grade_condition() ====&lt;br /&gt;
This function is used to add a grade related restriction to an activity based on the grade secured in another activity. In the following example a minimum grade of 0.4 is required on gradeitem 666 to unlock the current activity in context.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$test1=new condition_info((object)array(&#039;id&#039;=&amp;gt;$cmid),CONDITION_MISSING_EVERYTHING);&lt;br /&gt;
$test1-&amp;gt;add_grade_condition(666,0.4,null,true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==== update_cm_from_form() ====&lt;br /&gt;
This function is used to update availability conditions from a user submitted form.&lt;br /&gt;
&lt;br /&gt;
Example:-&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$fromform = $mform-&amp;gt;get_data();&lt;br /&gt;
if (!empty($fromform-&amp;gt;update)) {&lt;br /&gt;
&lt;br /&gt;
        if (!empty($course-&amp;gt;groupmodeforce) or !isset($fromform-&amp;gt;groupmode)) {&lt;br /&gt;
            $fromform-&amp;gt;groupmode = $cm-&amp;gt;groupmode; // keep original&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // update course module first&lt;br /&gt;
        $cm-&amp;gt;groupmode        = $fromform-&amp;gt;groupmode;&lt;br /&gt;
        $cm-&amp;gt;groupingid       = $fromform-&amp;gt;groupingid;&lt;br /&gt;
        $cm-&amp;gt;groupmembersonly = $fromform-&amp;gt;groupmembersonly;&lt;br /&gt;
&lt;br /&gt;
        $completion = new completion_info($course);&lt;br /&gt;
        if ($completion-&amp;gt;is_enabled()) {&lt;br /&gt;
            // Update completion settings&lt;br /&gt;
            $cm-&amp;gt;completion                = $fromform-&amp;gt;completion;&lt;br /&gt;
            $cm-&amp;gt;completiongradeitemnumber = $fromform-&amp;gt;completiongradeitemnumber;&lt;br /&gt;
            $cm-&amp;gt;completionview            = $fromform-&amp;gt;completionview;&lt;br /&gt;
            $cm-&amp;gt;completionexpected        = $fromform-&amp;gt;completionexpected;&lt;br /&gt;
        }&lt;br /&gt;
        if (!empty($CFG-&amp;gt;enableavailability)) {&lt;br /&gt;
            $cm-&amp;gt;availablefrom             = $fromform-&amp;gt;availablefrom;&lt;br /&gt;
            $cm-&amp;gt;availableuntil            = $fromform-&amp;gt;availableuntil;&lt;br /&gt;
            $cm-&amp;gt;showavailability          = $fromform-&amp;gt;showavailability;&lt;br /&gt;
            condition_info::update_cm_from_form($cm,$fromform,true);&lt;br /&gt;
        }&lt;br /&gt;
// Do something else with the data&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=== Deleting conditions attached to activities ===&lt;br /&gt;
&lt;br /&gt;
we have a simple function wipe_conditions() that can erase all conditions associated with the current activity.&lt;br /&gt;
consider an example:-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code php&amp;gt;&lt;br /&gt;
$ci = new condition_info($cm, CONDITION_MISSING_EVERYTHING, false);&lt;br /&gt;
$ci-&amp;gt;wipe_conditions();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Conditional activities Adding module support]]&lt;br /&gt;
* [[Conditional activities]] - original specification for this feature.&lt;br /&gt;
&lt;br /&gt;
===User documentation===&lt;br /&gt;
&lt;br /&gt;
* [[Availability_conditions|How to make a new availability condition plugin]].&lt;br /&gt;
* [https://docs.moodle.org/en/Conditional_activities Conditional Activities]&lt;br /&gt;
* [https://docs.moodle.org/en/Conditional_activities_settings Conditional Activities Settings]&lt;br /&gt;
* [https://docs.moodle.org/en/Using_Conditional_activities Using Conditional Activities]&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45307</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45307"/>
		<updated>2014-06-12T12:16:50Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added MDL-39134 to list of current issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress|forumurl=https://moodle.org/mod/forum/discuss.php?d=261527}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-45843&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=261527#p1132968 Adding LTI 2.0 support]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://vitalsource.com/ Vital Source Technologies] recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# Add support for multi-tenancy sites to permit different LTI credentials for courses in different sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-39134: Create an LTI filter&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
* registration page&lt;br /&gt;
* defining services&lt;br /&gt;
* tool consumer profile service&lt;br /&gt;
* tool proxy service&lt;br /&gt;
* tool settings service&lt;br /&gt;
* enable/disable tools&lt;br /&gt;
* generate launch request (including custom parameter substitution variables)&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45289</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45289"/>
		<updated>2014-06-11T08:56:36Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added list of tasks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress|forumurl=https://moodle.org/mod/forum/discuss.php?d=261527}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-45843&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=261527#p1132968 Adding LTI 2.0 support]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://vitalsource.com/ Vital Source Technologies] recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# Add support for multi-tenancy sites to permit different LTI credentials for courses in different sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
* registration page&lt;br /&gt;
* defining services&lt;br /&gt;
* tool consumer profile service&lt;br /&gt;
* tool proxy service&lt;br /&gt;
* tool settings service&lt;br /&gt;
* enable/disable tools&lt;br /&gt;
* generate launch request (including custom parameter substitution variables)&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45274</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45274"/>
		<updated>2014-06-09T19:32:08Z</updated>

		<summary type="html">&lt;p&gt;Svickers: /* Current issues with existing LTI functionality */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-45843&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=261527#p1132968 Adding LTI 2.0 support]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://vitalsource.com/ Vital Source Technologies] recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# Add support for multi-tenancy sites to permit different LTI credentials for courses in different sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45117</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45117"/>
		<updated>2014-06-04T12:40:11Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-45843&lt;br /&gt;
|discussion = [https://moodle.org/mod/forum/discuss.php?d=261527#p1132968 Adding LTI 2.0 support]&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://vitalsource.com/ Vital Source Technologies] recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45116</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45116"/>
		<updated>2014-06-04T12:29:17Z</updated>

		<summary type="html">&lt;p&gt;Svickers: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = MDL-45843&lt;br /&gt;
|discussion = NA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
[http://vitalsource.com/ Vital Source Technologies] recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45110</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45110"/>
		<updated>2014-06-04T05:28:50Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Added Defining Services section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = NA&lt;br /&gt;
|discussion = NA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
Vital Source Technologies recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
# Add a new tab set to list enabled and disabled services with icon to toggle their current status (by default a new service would be disabled)&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Defining services==&lt;br /&gt;
The goal is to enable the list of available services to be extensible, this includes the Tool Consumer Profile, Tool Proxy and Tool Settings services which are required elements of LTI 2.0.  A service is an endpoint to which requests may be sent; these requests send or receive resources of a specified media type.&lt;br /&gt;
&lt;br /&gt;
===Service definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for service&lt;br /&gt;
** Name - a display name for service&lt;br /&gt;
** IsEnabled - whether the service is currently enabled&lt;br /&gt;
** Resources - list of media types associated with the service&lt;br /&gt;
** Endpoint - URL for service requests&lt;br /&gt;
* Methods:&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the service and/or its resources&lt;br /&gt;
** CheckSignature - check the OAuth signature for a request received&lt;br /&gt;
&lt;br /&gt;
===Resource definitions===&lt;br /&gt;
* Properties:&lt;br /&gt;
** ID - unique ID for resource&lt;br /&gt;
** Template - URL template for service requests&lt;br /&gt;
** Media types - list of supported media types&lt;br /&gt;
** Methods - supported HTTP methods&lt;br /&gt;
** Capabilities - names of available capabilities&lt;br /&gt;
** Parameters - values of parameters included in request template&lt;br /&gt;
* Methods:&lt;br /&gt;
** Endpoint - fully qualified URL&lt;br /&gt;
** ParseValue - parse a custom parameter value for substitution variables defined by the resource&lt;br /&gt;
&lt;br /&gt;
===Installing services===&lt;br /&gt;
The initial approach will be to try to implement the above requirements using the existing [https://docs.moodle.org/dev/External_tool LTI Source Plugins] functionality.&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45109</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45109"/>
		<updated>2014-06-04T03:26:41Z</updated>

		<summary type="html">&lt;p&gt;Svickers: /* Register new external tool page (new) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = NA&lt;br /&gt;
|discussion = NA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
Vital Source Technologies recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
New page allowing the following data entry:&lt;br /&gt;
; registration URL : simple text box&lt;br /&gt;
; select capabilities to be offered to the tool provider : textarea of selected capabilities, textarea of potential capabilities, buttons to add and remove capabilities from selection&lt;br /&gt;
; select services to be made available for use by the tool provider : textarea of selected services, textarea of potential services, buttons to add and remove services from selection&lt;br /&gt;
; option to initiate the registration process : button&lt;br /&gt;
; option to cancel the process : button&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45108</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45108"/>
		<updated>2014-06-04T03:05:17Z</updated>

		<summary type="html">&lt;p&gt;Svickers: /* Database changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = NA&lt;br /&gt;
|discussion = NA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
Vital Source Technologies recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
# New page allowing the following data entry:&lt;br /&gt;
## registration URL&lt;br /&gt;
## select capabilities to be offered to the tool provider&lt;br /&gt;
## select services to be made available for use by the tool provider&lt;br /&gt;
## link/button to initiate the registration process; link/button to cancel the process&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
It is anticipated that the addition of LTI 2 support will require the following database changes:&lt;br /&gt;
* new table to capture details of tool proxies&lt;br /&gt;
* new fields to lti_types table to record:&lt;br /&gt;
** foreign key for tool proxy&lt;br /&gt;
** enabled capabilities&lt;br /&gt;
** launch parameters&lt;br /&gt;
** icon and secureicon URLs&lt;br /&gt;
* new table to record tool settings&lt;br /&gt;
&lt;br /&gt;
===lti_tool_proxies table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| regurl&lt;br /&gt;
| text&lt;br /&gt;
| Registration URL&lt;br /&gt;
|-&lt;br /&gt;
| state&lt;br /&gt;
| tinyint(2)&lt;br /&gt;
| Current state of tool proxy processing&lt;br /&gt;
|-&lt;br /&gt;
| guid&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Consumer key&lt;br /&gt;
|-&lt;br /&gt;
| secret&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Shared secret&lt;br /&gt;
|-&lt;br /&gt;
| capabilityoffered&lt;br /&gt;
| text&lt;br /&gt;
| Capabilities offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| serviceoffered&lt;br /&gt;
| text&lt;br /&gt;
| Services offered to Tool Provider&lt;br /&gt;
|-&lt;br /&gt;
| toolproxy&lt;br /&gt;
| text&lt;br /&gt;
| Copy of agreed Tool Proxy (JSON)&lt;br /&gt;
|-&lt;br /&gt;
| createdby&lt;br /&gt;
| int(10)&lt;br /&gt;
| ID of user which initiated the registration process&lt;br /&gt;
|-&lt;br /&gt;
| timecreated&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was created&lt;br /&gt;
|-&lt;br /&gt;
| timemodified&lt;br /&gt;
| int(10)&lt;br /&gt;
| Date/time at which the record was last modified&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_types table===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| enabledcapability&lt;br /&gt;
| text&lt;br /&gt;
| Enabled capabilities (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| parameter&lt;br /&gt;
| text&lt;br /&gt;
| Launch parameters (null for LTI 1 tools)&lt;br /&gt;
|-&lt;br /&gt;
| icon&lt;br /&gt;
| text&lt;br /&gt;
| URL to icon file&lt;br /&gt;
|-&lt;br /&gt;
| secureicon&lt;br /&gt;
| text&lt;br /&gt;
| Secure URL to icon file&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===lti_tool_settings===&lt;br /&gt;
{| class=&amp;quot;nicetable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| id&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key&lt;br /&gt;
|-&lt;br /&gt;
| toolproxyid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of related tool proxy&lt;br /&gt;
|-&lt;br /&gt;
| course&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course (null for system-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| coursemoduleid&lt;br /&gt;
| int(10)&lt;br /&gt;
| Primary key of course module - tool link added to course (null for system-wide and context-wide settings)&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting name&lt;br /&gt;
|-&lt;br /&gt;
| value&lt;br /&gt;
| varchar(255)&lt;br /&gt;
| Setting value&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
	<entry>
		<id>https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45088</id>
		<title>LTI 2 support</title>
		<link rel="alternate" type="text/html" href="https://docs.moodle.org/dev/index.php?title=LTI_2_support&amp;diff=45088"/>
		<updated>2014-06-02T16:56:49Z</updated>

		<summary type="html">&lt;p&gt;Svickers: Initial project description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Work_in_progress}}&lt;br /&gt;
{{Infobox Project&lt;br /&gt;
|name = LTI 2 support&lt;br /&gt;
|state = Planning&lt;br /&gt;
|tracker = NA&lt;br /&gt;
|discussion = NA&lt;br /&gt;
|assignee = [[User:Stephen Vickers|Stephen Vickers]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Project goals==&lt;br /&gt;
The main goal of this project is to implement LTI 2.0 functionality for Moodle which is capable of passing the IMS certification tests.  It is not expected that the required changes will have any significant impact on the current LTI 1.1 functionality; indeed it is hoped that the work will also have some beneficial side-effects for the current LTI implementation.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
Vital Source Technologies recognises the benefits that the [http://www.imsglobal.org/lti IMS Learning Tools Interoperability (LTI) 2 specification] can deliver to tool providers and has, therefore, agreed to sponsor this project in the interests of the whole community.  The work will be undertaken in collaboration with Moodlerooms as an adaptation of the existing LTI (External tool) module which they manage on behalf of the Moodle community.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
Moodle already provides support for LTI 1.1, this project will build on this support to add support for LTI 2.0; it will not remove any existing functionality but it is expected that the LTI 1 support will also be enhanced as a consequence of this work.  The main differences between LTI 1.1 and LTI 2.0 are as follows:&lt;br /&gt;
&lt;br /&gt;
; Tool registration : Rather than passing a launch URL, consumer key and shared secret from the tool provider to the tool consumer using some out-of-band communication, LTI 2 uses an interactive registration process; all a tool consumer administrator needs is the URL for initiating this process.&lt;br /&gt;
; Tool Consumer Profile : as part of the registration process, a tool consumer makes available to the tool provider a profile describing itself and the capabilities/services it is willing to make available.&lt;br /&gt;
; Tool Proxy : when &amp;quot;sealing the deal&amp;quot; between the two parties, the tool provider sends a Tool Proxy to the tool consumer which includes a profile about itself and details of the capabilities/services which it proposes to use.  A tool Proxy can be used to register more than one tool (resource handler), all of which are secured using the consumer key and shared secret agreed by the two systems during this process.&lt;br /&gt;
; Launch process : whilst the mechanics of launching an LTI tool remain unchanged from LTI 1, the tool proxy allows the data passed on launch to be tailored to specific requirements.  The custom parameter substitution variables (available in LTI 1 but not implemented in the current Moodle implementation) are used to enable this functionality.&lt;br /&gt;
; Tool Settings service : LTI 2.0 includes a service which allows a tool provider to request a tool consumer to record data (name and value pairs) which are passed back on each launch.  Settings may be saved at one of three levels: system-wide (Tool Proxy level), context-wide (Tool Proxy binding level, e.g. course-wide) and resource specific (LTI link level, i.e. specific to an individual link added to a course).  This service is helpful as it ensures settings are deleted when a link or course is deleted, and it can also help when a course containing links to a tool provider is copied.&lt;br /&gt;
; Discoverable services : the addition of the tool consumer and tool profiles allows each party to declare services which it is willing to offer the other party.  These services may be ones included in the IMS LTI specification (e.g. Tool Settings), but may equally be ones written by other parties which have yet to become part of the specification (and perhaps never will).  Provided both the tool consumer and tool provider have implemented the service, the trust relationship established using LTI can be leveraged to secure the request messages between the servers.  This transforms an LTI tool consumer into an extensible platform for learning tools and resources.&lt;br /&gt;
&lt;br /&gt;
==Current issues with existing LTI functionality==&lt;br /&gt;
There are a number of open Moodle Tracker items relating to enhancements to the LTI implementation.  Whilst this project is not directly concerned with resolving these issues, it does provide an opportunity to review them and see how they might guide the decisions being taken so they are consistent and may indeed provide solutions as a byproduct.  Here is a list of those identified so far (some are from discussion postings or other sources):&lt;br /&gt;
# MDL-28946: Add support for multi-tenancy sites&lt;br /&gt;
# MDL-37041: The LTI consumer does not pass the user&#039;s profile picture in the user_image launch parameter&lt;br /&gt;
# MDL-37445: Add ability to set Maximum Grade for External Tool&lt;br /&gt;
# MDL-38120: course reports for external tool misssing&lt;br /&gt;
# MDL-41202: LTI course identifier is not configurable; relies on shortname exclusively&lt;br /&gt;
# MDL-41724: Implement the IMS LTI contexts membership service&lt;br /&gt;
# MDL-45064: Option to add LTI Tool to Activity Chooser&lt;br /&gt;
# Visibility of external tools in the activity choose&lt;br /&gt;
# Support for both activity and resource types&lt;br /&gt;
# [https://moodle.org/mod/forum/discuss.php?d=196469 passing the Username?]&lt;br /&gt;
# More flexibility with passing appropriate roles&lt;br /&gt;
# Support for success and log messages on return URL&lt;br /&gt;
If you know of any missing from this list then please add a comment or get in touch; no promises that it will get included!&lt;br /&gt;
&lt;br /&gt;
==User interface changes==&lt;br /&gt;
It is anticipated that the LTI 2 functionality can be added on top of the existing LTI 1.1 support with minimal impact on the current user interface.  This section describes the current proposals for the new registration workflows.&lt;br /&gt;
&lt;br /&gt;
===Plugin settings page (existing)===&lt;br /&gt;
# Move the &amp;quot;Add external tool configuration&amp;quot; link outside the &amp;quot;Active&amp;quot; tab and place below the tool list (may need to go above to save scrolling when the list of tools is long)&lt;br /&gt;
# Add a new link labelled something like &amp;quot;Register new external tool&amp;quot; which can be used to initiate the tool registration process&lt;br /&gt;
See also &amp;quot;Registration process&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
===Register new external tool page (new)===&lt;br /&gt;
# New page allowing the following data entry:&lt;br /&gt;
## registration URL&lt;br /&gt;
## select capabilities to be offered to the tool provider&lt;br /&gt;
## select services to be made available for use by the tool provider&lt;br /&gt;
## link/button to initiate the registration process; link/button to cancel the process&lt;br /&gt;
Initiating the registration would generate a random key and secret and redirect the administrator to the tool provider using a ToolProxyRegistrationRequest message.  The next part of the process is dependent upon the implementation by the tool provider based on their business rules.  It would, however, depend upon the provision of a Tool Consumer Profile service; the profile provided would be based on the capabilities and services selected on this page (i.e. would be specific to a registration request).  On completion the tool provider will call the Tool Proxy service.&lt;br /&gt;
&lt;br /&gt;
===Registration process===&lt;br /&gt;
Once initiated a Tool Proxy registration will have one of the following states:&lt;br /&gt;
# created&lt;br /&gt;
# in process&lt;br /&gt;
# completed&lt;br /&gt;
# rejected&lt;br /&gt;
# cancelled&lt;br /&gt;
A rejected or cancelled registration would be logged but not remain visible in the UI.  A new tab would be required on the Plugin settings page for any &amp;quot;in process&amp;quot; registrations (initiated but not yet completed by the creation of a tool proxy).  An icon would be included next to each link to cancel a registration.  A completed registration will generate a tool proxy associated with each of the tools (resource handlers) it specifies (which would be added to the &amp;quot;Pending&amp;quot; tab on the Plugin settings page).&lt;br /&gt;
&lt;br /&gt;
===Managing tools===&lt;br /&gt;
Once a Tool Proxy has been accepted its resource handlers will be added as if they were external tools created manually using the current LTI 1 process.  Their initial state will be pending; an administrator must enable them to make them available.  They will appear to instructors (and learners) just like an LTI 1 external tool - there is no need for them to see any difference.  The only difference will be behind the scenes when a launch request is made, the launch parameters will be determined on the basis of the resource handler definition from the tool proxy rather than being a generic LTI 1 launch.  Support would also be added for custom parameter substitution variables which could/would also be available to LTI 1 launches.&lt;br /&gt;
&lt;br /&gt;
==Database changes==&lt;br /&gt;
Coming soon!&lt;/div&gt;</summary>
		<author><name>Svickers</name></author>
	</entry>
</feed>