Is there a way to add an activity inside a resource?

Is there a way to add an activity inside a resource?

by Ram Freedman -
Number of replies: 6
Hi,
Is there a way to add an activity inside a resource?

Let's say I'm adding a book resource and I want the reader to post something in a forum - but only to be able to do that after reading the first chapter,  and only after posting in the forum to be able to continue reading chapter 2 of the book - can it be done?

Regards,
Ram
Average of ratings: -
In reply to Ram Freedman

Re: Is there a way to add an activity inside a resource?

by Melanie Scott -
Picture of Particularly helpful Moodlers

You could probably do iframes. Basically, you would create the activity in the regular places and make them not visible on the front course page. Then make an iframe to host them inside the book. (I think you could do it in book. I've embedded video and seen people embed H5P...)  Not that that is a good idea, but it should work.


In reply to Melanie Scott

Re: Is there a way to add an activity inside a resource?

by Ram Freedman -
Hi,
Thanks.
You mentioned "Then make an iframe to host them inside the book" - can you please explain how can I turn an activity into iframe?
Regards,
Ram
In reply to Ram Freedman

Re: Is there a way to add an activity inside a resource?

by Melanie Scott -
Picture of Particularly helpful Moodlers

You don't make the activity an iframe. You create (and stealth) the activity and then create an iframe that opens the activity in the book.

I have very limited experience with iframes (they aren't a great idea) so I can't tell you the hows specifically try W3 schools. iframes basically create a browser window inside a window.

In reply to Ram Freedman

Is there a way to add an activity inside a resource?

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Ram,

I kind of understand where your course design is going, but you'd only be able to do that if you consider the following:

Use standard Topics format, but only show 1 topic at a time (instead of showing all topics at once), completely hide invisible topics
Add your activities and resources as you'd normally do
Use activity completion and other 'deciders' for creating restrict access rules

Activity inside an activity wouldn't work, not even with an iframe, because you'd embed the entire course page, not just the activity object, including all navigation components (dashboard, sitehome, calendar, etc.).

The only activity type that would allow embedding in pages, labels, books and the likes, is H5P.
In reply to Joost Elshoff

Re: Is there a way to add an activity inside a resource?

by Ram Freedman -
Hi,
Yes - I found out the issue with iframe embedding the entire course page.
Maybe I should try with the invisible topics.
Thanks!
In reply to Joost Elshoff

Re: Is there a way to add an activity inside a resource?

by Melanie Scott -
Picture of Particularly helpful Moodlers
Actually, it does work. you just open the activity and copy the activity link into iframe or you open the specific thread you want them to read/post to and link that. It will show the whole page (which includes course title and the nav portal thing) because that's how the activities work when you open them but it doesn't have to be the course page. And I'm positive about this because I just did it.

But I will add, as I said before, iframes are not typically recommended. Just possible.