Create External Tool (LTI) activity from code or API

Create External Tool (LTI) activity from code or API

by Shaun T -
Number of replies: 3

Hi I have a custom block that we use to access our middlewear from within Moodle. I've setup an LTI and I want to automatically add the External Resources activity to a course, after our middlewear configures the service its connecting to. I'm looking for either a function I can call to create the activity or a web service I can call from my middlewear to accomplish this. Any help would be greatly appreciated. 

Thanks

Shaun

Average of ratings: -
In reply to Shaun T

Re: Create External Tool (LTI) activity from code or API

by Darko Miletić -
To modify Moodle course from external site you can use Moodle Web Service functions.

Check https://docs.moodle.org/dev/Web_service_API_functions especially those that apply to mod_lti.

In reply to Darko Miletić

Re: Create External Tool (LTI) activity from code or API

by Shaun T -

Thanks for the info but I'm running 2.8.12 and it looks like those api aren't available in 2.8. 

I was looking at the mod/lti/lib.php and there is a lti_add_instance function but I'm not sure what to pass for the arguments and can't find it used anywhere.