Limiting Course Level LTI creation

Limiting Course Level LTI creation

by Scott Hardwick -
Number of replies: 1

Hello Fellow Moodle Admins,

If anyone has any insight they can share, I would very much appreciate it.

I am in the process of trying to get all of our "External Tool" activities upgraded from LTI 1.0/1.1 to LTI 1.3.

As part of this, I would like to lock down the ability for teachers to add new LTI instances without them being configured at the site level. 

I know there are several LTI permissions and I have played with them.

My gut says that I should be able to remove mod/lti:addmanualinstance

My thought being they would then be able to go to External Tool and ONLY have the preconfigured tool in the drop down, but that they could still use the Select Item button.

However, removing this permission removes "External Tool" from the activity chooser all together.

I then tried removing mod/lti:addcoursetool which seemed to kind of do what I wanted, but then the "Select Content" would tell the teacher's that they did not have permission to select the specific content at that preconfigured tool.

I did some research and found these two Tracker items:

https://tracker.moodle.org/browse/MDL-62815

https://tracker.moodle.org/browse/MDL-68328

A similar previous discussion took place here (https://moodle.org/mod/forum/discuss.php?d=423730), but seemed to have a different goal.

And as best I can gather from the discussion, the expectation is that we...

1. remove mod/lti:addmanualinstance

2. ensure that on each external tool setup that we choose for "Tool configuration usage" to "Show in activity choose and as a preconfigured tool"

This would show the preconfigured tool item in the activity choose, but not show the external tool item.

Is this the only (or best) way to accomplish my goal?

(I am on Moodle 3.11, hosted on OpenLMS)

Thanks,

Scott

Average of ratings: -
In reply to Scott Hardwick

Re: Limiting Course Level LTI creation

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Scott,

You've touched on an interesting area and may have highlighted a problem we've overlooked for years. After looking at the capability docs and the revision history (some of which goes back a long way), my take is as follows:
  1. The mod/lti:addcoursetool capability (https://docs.moodle.org/400/en/Capabilities/mod/lti:addcoursetool) was introduced well before LTI Advantage support was added, and in fact even before content selection (deep linking) support was added. Back then, it was added to control access to instructor_edit_tool_type.php. Back then, this was controlling the ability to add a full tool configuration to a specific course. Because we only supported 1.1 back then, a teacher was able create a course tool without the need to involve system admins, so this capability made sense as a way to control this. if users didn't have this, they couldn't create course-level tools. They could still use them, however.
  2. Content item selection (deep linking) support was then added in MDL-49609. That issue added the capability check (mod/lti:adcoursetool) to contentitem (Source code here) flows, but never tested that as far as I can see. There appears to be no discussion around this on the issue either, aside from "Add capability checks for contentitem and contentitem_return pages".
I think the content item message issue (2) incorrectly added that capability check (perhaps copy and paste from prior LTI code - I don't really know). There should be no reason a teacher can't use an existing preconfigured tool by selecting it from the list and then clicking "Select content" to pick a specific content item(s). This isn't creating a course level tool, it's just using an existing tool. Controlling it with this capability isn't right.

So, it certainly looks like we have an annoying bug there, but that doesn't help you right now.
And as best I can gather from the discussion, the expectation is that we... 1. remove mod/lti:addmanualinstance 2. ensure that on each external tool setup that we choose for "Tool configuration usage" to "Show in activity choose and as a preconfigured tool" This would show the preconfigured tool item in the activity choose, but not show the external tool item. Is this the only (or best) way to accomplish my goal?
I think this is indeed the only way to achieve what you want until the bug is fixed. I'll link a tracker issue here shortly dealing with addressing that.

Edit: See MDL-74797 dealing with the bug described above.

Hope that helps,
Jake