project: Moodle
summary: LTI Improvements for Moodle 3.1
description: List of LTI improvements for Moodle 3.1

1.summary: Enable teachers to add (read config.xml uri) tools from the edu-apps.org LTI catalog
description: Simplify the process, for teachers, to add a tool from the edu-apps.org LTI catalog (which is publicly published for Instructors Canvas teachers) to an External LTI activity. After applying the attached patch, a Teacher could: Browse the edu-apps.org catalog. ("edu apps catalog" screen capture) and Select a tool. Copy its configuration xml uri ("copy tools configuration url" screen capture) Paste it into a new text input field "Tool configuration (XML) URL" (leftmost screen capture) Click the "+" button (next to the "External tool type" field) New window opens up with tools configuration details (parsed) available on the proper fields. (2nd from the left, screen capture) Update the relevant settings and click "Save" to go back into the LTI module settings page to finish setting up the tool.
2.summary: Option to add Preconfigured LTI Tool to Activity Chooser
description: Add an option to the LTI External Tool Type Configuration settings to allow a tool to be displayed within the Activity Chooser. I dont feel like this would necessarily be "new" functionality, since - for all intents and purposes - it is just adding tools from the external tool type select box right to the activity chooser. I can think of 2.5 possible approaches to accomplishing this, but am still very new to Moodle, so maybe Im going about it all wrong: The first approach that Ive been experimenting with is to add a new option "Show tool in course activity chooser," and continuing down that path. The second approach that Ive been considering is to use the "Show tool type when creating tool instances" option, and save the tool as a mod/lti subtype (inspired from Though, this feels a bit too presumptuous... but, maybe there could be a LTI global option to toggle whether or not display tools in the activity chooser when that option set. The second and a half approach is mash the first two approaches together by adding a showinchooser field and checkbox option which will save/update the tool as a mod/lti subtype.
3.summary: Integrate LTI Provider support in Moodle
description: Martin is interested in having support for sharing courses via LTI. He has requested me to take a look to integrate the LTI Provider plugin into Moodle 3.1 Initially we will support only LTI 1.1 (with the outcomes and membership service) The LTI Provider plugin is a local add-on with some hacks (sharing of activities, force navigation, custom CSS) that maybe are not suitable for Moodle core, Ill do a full review of the plugin features to create a spec. This should be shipped with core Moodle - we should review the plugin in the plugins DB, identify anything that needs fixing - and fix it (in this issue). Will need to move it out from local From Juan, quoteThe plugin uses some hacks that in my opinion are not suitable for core so I think that maybe an initial approach would be to create a new enrolment plugin "LTI" for sharing courses. Activity sharing would require much more job.quote Todo Create authentication plugin (In progress) Create enrol plugin Create LTI role, setup permissions so they can only do stuff in course -Fix debugging errors- -textlib > core_text (done by aspark)- -local_ltiprovider_extends to local_ltiprovider_extend (done by aspark)- -$plugin >component (done by aspark)- -get_list_of_timezones (done by mjsamberg)- -Notice: Undefined index: custom_resource_link_description in /home/moodle/moodles/stable_master/moodle/local/ltiprovider/tool.php on line 325- Move out from local/ Add events (if necessary) Option to enable "allowframembedding" when you activate the provider Dont modify _GET and _POST. Instead, store them in a new variable (best practice) Perhaps there is a way to use moodle library functions as well, but I doubt it. CIBot will just have to complain about this one -Fix bug where if you click the link to LTI provider in course settings from an activity module, it will go to the wrong course id- Add consumer key, rather than just using the same thing as the shared secret - security concern Check github issues and pull requests. Pull in anything that is ready. Create issues & branches for any needing more work Make sure page titles are set and the headers are included, pagetypes are correct, urls set navigation tree is correct, breadcrumbs show etc -Fix coding style problems- Remove elements from navigation that the user doesnt need (nav block, user menu) Look into using capabilities rather than rolesallowedcreatecontexts and rolesallowedcreateresources Fix bug where if you log in as admin on your site, you can edit settings to the module on providers moodle (might be the username is admin and so it appears in $CFG->admin) If the user has an invalid email address, it will constantly try to redirect them to the course, then back to their profile edit page, then back again. We may need a fix for this or similar situations. (Theres already a fix for site policy, perhaps we can do similar fixes for other problems) Throw exception if you try to access the site outside of LTI. The plugin asks you to turn on the setting Allow frame embedding which we state in core is not recommended for security reasons. I can see this worrying users - need to think about a better approach without scaring people. -Remove upgrade path.- Look at all the TODOs in code. -Remove usage of deprecated functions.- Make sure all strings are being used, remove any that are not. Remove test folder. Fix incompatibility with MNet (see comments below)
4.summary: Support cartridges
description: E.g. It needs to be as simple as enter url, give it a name, click save. cartridge_basiclti_link: blti:title blti:description blti:custom with lticm:property blti:extensions with lticm:property blti:launch_url blti:secure_launch_url blti:icon blti:secure_icon blti:vendor lticp:code lticp:name lticp:description lticp:url lticp:contact lticp:email lticp:contact cartridge_bundle cartridge_icon The TC will generally display the title in the item entry in the user interface rather than title in the basic_lti_link entry.
5.summary: Rework LTI admin screens
description: E.g. There is no point listing the capabilities, before we know what capabilities the tool requires. Allow admins to create and approve tools in one step. There is no point in 2 separate list of pending tools. Look everywhere and remove as many steps out of every process as possible. .List of required changes Combine the two pages Manage external tool types Manage external tool registrations Remove pending state (we left it while a user decides whether they want to accept capabilities) Tool created through "Tool Registration" should be added to tool type immediately Tool added through tool type should be added immediately Just one tool add screen. Determine what the url given is XML, use our new xml parser Tool registration URL register automatically Tool launch URL, add the tool type (will require extra screen to fill in more details) In tool proxy tool registration, do not list capabilities until after firing the Registration request
6.summary: Change default for "show tool type when creating instances"
description: This should be "on" by default.
7.summary: Configured LTI tools should show in activity chooser - at the same level as standard Moodle activities.
description: We could also have an option for showing the tools as "resources" or "activities".
8.summary: Change language for external tool
description: In a meeting it was discussed that we should change the language around external tools You should add an "External tool" module and select a "preconfigured tool" On the admin screen it should say "Configure tools" and "add a tool"

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: LTI Improvements for Moodle 3.1
description: List of LTI improvements for Moodle 3.1

### Response:
1.summary: Enable teachers to add (read config.xml uri) tools from the edu-apps.org LTI catalog
description: Simplify the process, for teachers, to add a tool from the edu-apps.org LTI catalog (which is publicly published for Instructors Canvas teachers) to an External LTI activity. After applying the attached patch, a Teacher could: Browse the edu-apps.org catalog. ("edu apps catalog" screen capture) and Select a tool. Copy its configuration xml uri ("copy tools configuration url" screen capture) Paste it into a new text input field "Tool configuration (XML) URL" (leftmost screen capture) Click the "+" button (next to the "External tool type" field) New window opens up with tools configuration details (parsed) available on the proper fields. (2nd from the left, screen capture) Update the relevant settings and click "Save" to go back into the LTI module settings page to finish setting up the tool.
2.summary: Option to add Preconfigured LTI Tool to Activity Chooser
description: Add an option to the LTI External Tool Type Configuration settings to allow a tool to be displayed within the Activity Chooser. I dont feel like this would necessarily be "new" functionality, since - for all intents and purposes - it is just adding tools from the external tool type select box right to the activity chooser. I can think of 2.5 possible approaches to accomplishing this, but am still very new to Moodle, so maybe Im going about it all wrong: The first approach that Ive been experimenting with is to add a new option "Show tool in course activity chooser," and continuing down that path. The second approach that Ive been considering is to use the "Show tool type when creating tool instances" option, and save the tool as a mod/lti subtype (inspired from Though, this feels a bit too presumptuous... but, maybe there could be a LTI global option to toggle whether or not display tools in the activity chooser when that option set. The second and a half approach is mash the first two approaches together by adding a showinchooser field and checkbox option which will save/update the tool as a mod/lti subtype.
3.summary: Integrate LTI Provider support in Moodle
description: Martin is interested in having support for sharing courses via LTI. He has requested me to take a look to integrate the LTI Provider plugin into Moodle 3.1 Initially we will support only LTI 1.1 (with the outcomes and membership service) The LTI Provider plugin is a local add-on with some hacks (sharing of activities, force navigation, custom CSS) that maybe are not suitable for Moodle core, Ill do a full review of the plugin features to create a spec. This should be shipped with core Moodle - we should review the plugin in the plugins DB, identify anything that needs fixing - and fix it (in this issue). Will need to move it out from local From Juan, quoteThe plugin uses some hacks that in my opinion are not suitable for core so I think that maybe an initial approach would be to create a new enrolment plugin "LTI" for sharing courses. Activity sharing would require much more job.quote Todo Create authentication plugin (In progress) Create enrol plugin Create LTI role, setup permissions so they can only do stuff in course -Fix debugging errors- -textlib > core_text (done by aspark)- -local_ltiprovider_extends to local_ltiprovider_extend (done by aspark)- -$plugin >component (done by aspark)- -get_list_of_timezones (done by mjsamberg)- -Notice: Undefined index: custom_resource_link_description in /home/moodle/moodles/stable_master/moodle/local/ltiprovider/tool.php on line 325- Move out from local/ Add events (if necessary) Option to enable "allowframembedding" when you activate the provider Dont modify _GET and _POST. Instead, store them in a new variable (best practice) Perhaps there is a way to use moodle library functions as well, but I doubt it. CIBot will just have to complain about this one -Fix bug where if you click the link to LTI provider in course settings from an activity module, it will go to the wrong course id- Add consumer key, rather than just using the same thing as the shared secret - security concern Check github issues and pull requests. Pull in anything that is ready. Create issues & branches for any needing more work Make sure page titles are set and the headers are included, pagetypes are correct, urls set navigation tree is correct, breadcrumbs show etc -Fix coding style problems- Remove elements from navigation that the user doesnt need (nav block, user menu) Look into using capabilities rather than rolesallowedcreatecontexts and rolesallowedcreateresources Fix bug where if you log in as admin on your site, you can edit settings to the module on providers moodle (might be the username is admin and so it appears in $CFG->admin) If the user has an invalid email address, it will constantly try to redirect them to the course, then back to their profile edit page, then back again. We may need a fix for this or similar situations. (Theres already a fix for site policy, perhaps we can do similar fixes for other problems) Throw exception if you try to access the site outside of LTI. The plugin asks you to turn on the setting Allow frame embedding which we state in core is not recommended for security reasons. I can see this worrying users - need to think about a better approach without scaring people. -Remove upgrade path.- Look at all the TODOs in code. -Remove usage of deprecated functions.- Make sure all strings are being used, remove any that are not. Remove test folder. Fix incompatibility with MNet (see comments below)
4.summary: Support cartridges
description: E.g. It needs to be as simple as enter url, give it a name, click save. cartridge_basiclti_link: blti:title blti:description blti:custom with lticm:property blti:extensions with lticm:property blti:launch_url blti:secure_launch_url blti:icon blti:secure_icon blti:vendor lticp:code lticp:name lticp:description lticp:url lticp:contact lticp:email lticp:contact cartridge_bundle cartridge_icon The TC will generally display the title in the item entry in the user interface rather than title in the basic_lti_link entry.
5.summary: Rework LTI admin screens
description: E.g. There is no point listing the capabilities, before we know what capabilities the tool requires. Allow admins to create and approve tools in one step. There is no point in 2 separate list of pending tools. Look everywhere and remove as many steps out of every process as possible. .List of required changes Combine the two pages Manage external tool types Manage external tool registrations Remove pending state (we left it while a user decides whether they want to accept capabilities) Tool created through "Tool Registration" should be added to tool type immediately Tool added through tool type should be added immediately Just one tool add screen. Determine what the url given is XML, use our new xml parser Tool registration URL register automatically Tool launch URL, add the tool type (will require extra screen to fill in more details) In tool proxy tool registration, do not list capabilities until after firing the Registration request
6.summary: Change default for "show tool type when creating instances"
description: This should be "on" by default.
7.summary: Configured LTI tools should show in activity chooser - at the same level as standard Moodle activities.
description: We could also have an option for showing the tools as "resources" or "activities".
8.summary: Change language for external tool
description: In a meeting it was discussed that we should change the language around external tools You should add an "External tool" module and select a "preconfigured tool" On the admin screen it should say "Configure tools" and "add a tool"
