External tool (LTI)

Add LTI Tool to Activity Chooser

 
 
Picture of Dominic Hanzely
Add LTI Tool to Activity Chooser
 
Greetings,

I am still very new to Moodle, so please bare with me if I am going down the wrong path here.

The goal is to make it possible to configure an External Tool Type to be displayed in a course's Activity Chooser (attached screen shots below).

Once selected from the Activity Chooser, the user would then land on the external tool's edit instance settings page (/course/modedit.php?update=87) as if they had first selecting the standard "External Tool" option from the Activity Chooser, selected the tool from the external tool type select box, clicked "save and return back to course", then navigated to the tool's instance settings page.

The approach that I'm inclined to take is to:

- add a showinchooser field to the lti_type table
- modify /mod/lti/edit_form.php to add a checkbox for showinchooser
- add a function lti_get_types_for_chooser_add_instance() in /mod/lti/locallib.php based on lti_get_types_for_add_instance() to return results that have showinchooser = 1
- override core_course_renderer::course_modchooser() to add a call to lti_get_types_for_chooser_add_instance()

The advantage to this approach is that the changes to core are minimal (all within /mod/lti). The disadvantage is that it requires modification to any other theme in which it is desired to display available external tools.

Ideally, it would be nice to have these tools be seen as the rest of the modules listed within the Activity Chooser, I'm just not seeing a way to accomplish that cleanly.

Thoughts and/or suggestions?

Thanks!

Dominic

My home -> Site administration -> Plugins -> Activity modules -> Manage activities -> LTI Administration

My home -> test_course

 
Average of ratings: -
Picture of Dominic Hanzely
Re: Add LTI Tool to Activity Chooser
 

And, uh, please bear with my request to bare with me...  awkward! blush

 
Average of ratings: -
Picture of John Tutchings
Re: Add LTI Tool to Activity Chooser
 

The BasicLTI plugin does this, when you add an external tool using it it displays the new tool in the list of activities the tutor can choose from.  I prefer this approach of adding to the list of activities as it makes it easy for the teachers to find rather than them having to look for it in a drop down list within the External Tool configuration page.

 

https://code.google.com/p/basiclti4moodle/

 
Average of ratings: -
Picture of Dominic Hanzely
Re: Add LTI Tool to Activity Chooser
 

Thanks, John.  Looks like it's been a while since any work has been done on that plugin and there are some warning/error messages when running in 2.6, though nothing that prevents it from working. It is definitely a good source for inspiration, and I see that it accomplishes the desired functionality by adding subtypes to the module, so this will certainly keep me busy for a bit.

Newbie question, though I intend to do my own experimenting with this idea, do you think that creating a subplugin for the LTI module could be a viable option? I don't fully understand the plugin system yet, so I've got some reading and tinkering to do.


Thanks again,

Dominic

 
Average of ratings: -
Picture of Kris Stokking
Re: Add LTI Tool to Activity Chooser
 

I would definitely avoid using the basiclti4moodle if you are using a supported version of Moodle, as that has not received an update in nearly 2 years. The good news is that as of Moodle 2.6, the External Tool plugin should be able to support all of your sub-plugin needs.  The related ticket is MDL-36224, which actually gives an example of a dummy sub-plugin that you can install under mod/lti/source to have it display in the Activity Picker.  You can also launch directly into the LTI Provider upon selecting the activity by tying into the add_instance_hook .  We'll be adding much more detailed information to the External Tool documentation within the next few weeks, but in the meantime if you have questions please feel free to private message me as I don't always see Forum posts.

 
Average of ratings: -
Picture of Dominic Hanzely
Re: Add LTI Tool to Activity Chooser
 

That's exactly what I was looking for in regards to sub-plugins. I'm going to check this out and will report back to this post. Thank you, sir!

 
Average of ratings: -
Picture of Kris Stokking
Re: Add LTI Tool to Activity Chooser
 

Just to followup on this conversation, the use of subplugins in LTI has been documented at http://docs.moodle.org/dev/External_tool.

Thanks,
Kris

 
Average of ratings: -