Embedding an LTI resource/activity inside a page resource

Embedding an LTI resource/activity inside a page resource

Acqua Alta發表於
Number of replies: 2
Particularly helpful Moodlers的相片

Hi,
Let's say that I have an LTI activity in a Moodle course, and I want to embed it in a Moodle Page resource. Can it be done?

The reason that I want to do this is that I want to write some instructions, then have the LTI embedded in the page after the instructions. And I want everything to be on the same page, and not on the main course page.

Please share your knowledge about this topic.

Thanks 微笑

評比平均分數: -
In reply to Acqua Alta

Re: Embedding an LTI resource/activity inside a page resource

Jake Dallimore發表於
Core developers的相片 Moodle HQ的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片 Testers的相片
Hi Acqua,

I can think of at least one way this might be possible but it's essentially a workaround right now. What we really want is something like Tiny MCE support for LTI - see MDL-67560 for that feature (it's not ready quite yet though).

The workaround, works like so:
1) Stealth activities need to be enabled at site level.
2) Teachers must have enough knowledge of HTML to create an iframe in the page activity settings
3) The iframe must use a src with syntax equal to "mod/lti/launch.php?id=x". This isn't a URL that's generally publicly available via the link to the activity in the course (that link is mod/lti/view.php?id=x)

Essentially, this allows the LTI activity to be hidden but still available to students. Then, using the HTML editor on the page's "page content", the teacher can insert an iframe with src set to the URL of the stealth activity's launch URL. See below for an example of this:

example of the workaround allowing LTI embeds in page resources
In reply to Jake Dallimore

Re: Embedding an LTI resource/activity inside a page resource

Acqua Alta發表於
Particularly helpful Moodlers的相片
Hi Jake,
Thank you very much for your detailed answer and the time and effort that you put into it 微笑