Implement the functionality of the following LTI source plugin in core: https://moodle.org/plugins/ltisource_message_handler
Canvas LMS currently has a script to receive posted messages from a tool consumer. It would be useful for Moodle to have a similar feature for tool providers to take advantage of. The biggest issue is that the LTI iframes in Moodle are very small and the height can not be changed by the tool provider. This means that most tool providers design their content to be opened in a new window or tab.
The LTI Source plugin I have written injects a script to mod/lti/view.php which listens for messages posted from within the iframe. I'd like to implement the message listening JS functions to core. The functions as implemented in the existing plugin can be seen here.
Possible message subjects I would like to implement:
- Update the LTI iframe height to the provided height.
- Scroll the tool consumer window to the top of the iframe. Useful when changing pages within the iframe.
- Removes the iframe border.