Video into an iframe

Video into an iframe

by David Berry -
Number of replies: 15
I seem to be going around in circles with this one. A member of staff wants the following situation implementing on Moodle. A window that contains a long list of video file names - so long that you need to scroll through them. No problem, create a separate file and then embed this within an iframe. The next bit is starting to "do my head in" (as they say in Lancashire). How do I bring in a video into the iframe corresponding to the one I have clicked on. I just want the video and nothing else. All permutations of links to labels, web pages, etc just don’t look right.
Average of ratings: -
In reply to David Berry

Re: Video into an iframe

by Steve Hyndman -

A couple of possibilities...

1. If you build this outside of Moodle and then just link to the index page from within Moodle, you could easily use iframes or include pages. When I build normal "simple" websites, I often use include pages for the navigation system...same concept as iframes but better...in my opinion. The links on the left of this site, for example, are on a separate html page and that page is simply included in all other pages...simple and effective.

If you want to replicate this in moodle, one easy way would be to...

2. Create an html block to hold all the links and include each movie on its own webpage resource set to show side blocks. You simply create hyperlinks in the html block to each of the webpages. You can see something similar here where I've done this with the Main Menu block (the main menu block is simply an html block). Click on the calendar to see the Google calendar included in a webpage...click on "cool websites" to see a list of weblinks in a webpage, etc....these could have just as easily been movies on the individual pages.

Steve

In reply to Steve Hyndman

Re: Video into an iframe

by David Berry -
Steve.

Many thanks for your ideas.

1. I have never tried "includes" before and I am not sure that our site is set up to work with them at the moment. This I will check tomorrow. As an aside the second page I googled with regards to "includes" was written by a "David Berry". That was very strange!

2. What a simple solution. By including the blocks you get a page containing all of the information. I was trying to do the reverse by trying to remove the information I didn't need. This should solve my problem as long as the user is happy with a slightly different layout.

Regards

Dave Berry
In reply to Steve Hyndman

Re: Video into an iframe

by John Isner -
Hi Steve,
I like it! I have one comment and one question.

Comment: If the Main Menu block is on the site front page (as it is on your site), then you can't have a topic section, or the resources will also be listed in the topic section.

Question: How do you get the Web page resource name to show up in the breadcrumb trail? When I click the Calendar link in your Main Menu, the breadcrumb trail shows Home -> Calendar. But When I tried your method on my site, the trail remains as "Home" (which is confusing).
In reply to John Isner

Re: Video into an iframe

by David Berry -
I didn't get the same as you - but I did change the solution slightly. The number of menu options was going to get too many for an HTML side block. My solution (which I am still working on) is to have a label which then has pointers to other internal (Moodle) web pages which have the "Show the blocks option" turned on. These pages are placed at the "bottom" of the course eg weeks/block 10. These contain further menu options which then link to the videos (as in Steve's idea). To tidy things up I then reduced the number of weeks/blocks to less than 10. The web pages are then available to be used, unlike using the hidden option.

The overall effect on the breadcrumbs is to show something like

site> category> coursename > resources > resource name

I think that I can live with that.

As far as I am concerned it just shows that there are lots of options in Moodle that I ought to investigate - in this case the "Show the course blocks" option.

Regards (and thanks again to Steve)

Dave Berry


In reply to David Berry

Re: Video into an iframe

by Steve Hyndman -

You're welcome and excellent ideas David...having information in topics/weeks that are now shown in the course has a lot of very neat uses since you can still link to those resources from anywhere in the course.

Steve

In reply to John Isner

Re: Video into an iframe

by Steve Hyndman -

John,

You can have a topic section (the photo in this site is in the topic section). The trick is to not add the resources from the topic section, but to add them from the default "main menu" block and then hide that block. When you hide that block the resources/activities are still available...very similar to what David is doing in his course by including things in a topic/week and then not showing it.

Since I have the default main menu block hidden, I have created another "main menu" block using an html resource.

As for the breadcrumb trail, I've just hacked out the resource/activity index pages from showing and the rest works by default...I'm using version 1.6.

Steve

In reply to Steve Hyndman

Re: Video into an iframe

by John Isner -
Your method of hiding resources by creating them from the (standard) Main Menu block, then hiding the block, is brilliant. I don't use the block and never knew you could do that. It is a much cleaner way than the unseen topic block method, which most people use.

But can you be more specific about how you got the breadcrumb trail to show the path to the resource? When I click a "Main Menu" block link, the contents of the center column change (exactly as they do on your site) but the breadcrumb trail does not indicate the path to the resource. It continues to show "Home."
In reply to John Isner

Re: Video into an iframe

by Steve Hyndman -

John,

On all my sites, in "site settings" for the frontpage, I always enter "Home" for the "Short name for the site". That results in "Home" as the first crumb in the breadcrumb trail. Then, for example, if I add a webpage resource, the name of the page will show in the breadcrumb trail...like on this page..."Cool Websites" is the name of the webpage and it is automatically included in the breadcrumb trail with the "Home" link before it. It's just like here from the frontpage of moodle.org...Moodle Security is the name of the webpage, so it shows in the trail. The only difference in my site and this, is that I have created the page in the main menu, set it to show side blocks, hidded the main menu, and then linked it in an html block. Of course, I've also hacked out the resource index page so it doesn't show in the trail....here is the hack from Mike Churchward that eliminates the resource and activity links in the trail.

If you are not seeing the resource names in the trail, then maybe you are using a later version and things have changed...again, I'm on 1.6.5

Steve

In reply to Steve Hyndman

Re: Video into an iframe

by John Isner -
If you are not seeing the resource names in the trail, then maybe you are using a later version and things have changed...again, I'm on 1.6.5

Yes, I am guilty of testing this on 1.9 beta smile Only the shortname of the site ("Home") shows in the breadcrumb trail when I click the resource link in the "main menu." I wonder if this is a bug or a feature.

I also notice that Main Menu block is only available on the site front page, so your method apparently can't be used in courses other than the front page course. It's too bad because it is a generally useful method for making unseen resources. Vote for MDL-4138 "A Main Menu type block for courses."
In reply to John Isner

Re: Video into an iframe

by Steve Hyndman -

I wonder if this is a bug or a feature.

Can't help you there...after version 1.6, I'm not sure how to tell the difference wink.

As for the main menu bock, there has never been one in a course...only the frontpage. In courses, using the "not shown" topic works equally well.

Steve

In reply to Steve Hyndman

Re: Video into an iframe

by John Isner -
As for the main menu bock, there has never been one in a course...only the frontpage

Yes, but I wonder if there is an essential reason for this restriction. MDL-4138 was created by Chardelle Busch, who also posted the code for a "course main menu block" in this discussion. I don't know where her code is now; it was removed from the forum and I don't see it in the third party modules and plugins database. Anyway, there are other people who would like this feature.
In reply to John Isner

Re: Video into an iframe

by Michael Penney -
In the social course format, the Social Activities block acts much like the Main Menu on the site home page.

We also built a course menu as a module, as part of the Flexpage course format available from this link wink.
Average of ratings: Useful (1)
In reply to John Isner

Re: Video into an iframe

by A. T. Wyatt -
I think you might be looking for the sidebar block. It is available in the plugins and modules database. I use it on our instance. You might take a look--
atw
In reply to A. T. Wyatt

Re: Video into an iframe

by John Isner -
HI A.T.

Ah, that's exactly what I'm looking for. Thanks!

While we're on the subject, does anyone know the rationale for the Main Menu Block? I know what it does; I want to know the use case(s) it was designed for. I can't find any documentation on it. Docs.moodle.org has only a stub. If I don't get an answer here, I'll post in the Blocks forum.
In reply to David Berry

Re: Video into an iframe

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Another option would be to use a Database activity ... each video can be a separate entry with titles, descriptions etc.