Over the next few weeks, we’ll be inviting guest bloggers to publish posts on OurLearning. We start with our resident Moodler, Mary Cooch:
How to display websites (index.html) in Moodle 2.0
If you make a website and upload it to the internet, it will tend to be in a folder containing a number of webpages, possibly another folder with images and an index.html file that links everything together. It’s that file that forms the web address of your website and so it is that file that you link to if you upload your website into Moodle. Other programs that aren’t websites work in a similar way: I use a lot of games with younger (and older!) children which require a set of files in a folder. Each file has its own job to do, but again it is the html file that is displayed for pupils to click on. ( There are some good examples here) There are some nice flash “flip” books which allow you to show photos in a neat way, each page turning over smoothly. Once again, you ensure everything is in one folder, upload that folder and link to the .html file.
In Moodle 1.9 this would be done by zipping the folder, uploading it to the course files section, unzipping it and then using the “link to a file or website” option to link to your chosen main file. In Moodle 2.0, the way course files are managed has radically changed. It is still possible to do anything you wanted previously to do; you go about it in a different way. One way (not the only way) to display your website/flash game/flip photo book etc is like so:
- With the editing turned on, go to “add a resource>file”
- Click “Add” and upload the zipped folder of your website or other similar package. (I know it says “file”, but you can still upload a folder!)

- Click the little icon to the right of your zipped folder and choose “unzip” (right)
- Click on your newly unzipped folder to reveal all the files inside it
- Choose the file you want to link to (for us, the html file but it doesn’t have to be that one for you)
Click the little icon to the right of it and choose “set main file”- Choose the other settings according to taste and click “save and return to course”
- Enjoy!
.
Thanks Mary. You’re the best. This information was exactly what I was looking for.
Hi Mary,
This tip was very useful as it’s not obvious how to upload a website into Moodle. I did trip up though, because even though I uploaded the website. it still wouldn’t display. At best I saw a list of files and at worst I saw nothing but the page name.
However, I noticed chaging the default Display preference from ‘automatic’ to ‘pop-up’ or ‘open’ immediately rendered the site perfectly. This is one extra step right after your instructions, so if others also find their sites do not display correctly, it may be worth trying to change the default preference.
Hope this helps and thanks again, Mary
)
Trevor
Thanks a lot. Really helpful !!! Clear explanation!!!!
I got stuck with the blank page when I chose embed. And when I chose “open” I got the first page of HTML content to display with relative links that worked. HOWEVER, I got ONLY that page in the window. I want the student to be able to get back to the course home page easily, from a familiar navigation menu or bar. I don’t want to have to code the home page with the unique course id number into the HTML that I create. SO, I was stuck again.
I have solved this by using the admin settings to enable more options for displaying files. Here’s the path: Site Administration > Plugins > Activity Modules > File and within that page of options is a multi-selection form field with values, labeled Available display options . I had to enable the value for In frame in order to retain the header navigation.
OF COURSE the problem here is that frames are suboptimal, or even frowned upon, or dare I say it “bad” practice.
So, why doesn’t embed work?
Hello i’m french and i have just installed moodle 2 the trouble is that unzuip does not appear in ly menu
only
download
specify the main file
rename
move
delete
Thanks
This suggests you have already unzipped the folder or you have uploaded a file that is not zipped. Can you confirm it is a zipped folder? ressource>fichier – uploader l’archive?
Great info on exactly what I wanted to do but still having an issue uploading the zip folder to Moodle 2.0. I am going to the folder on my directory>> Right click >>> Send To>>Compressed(zip) Folder. Windows 7 then creates a Zip Folder. But… When I go back to Moodle and get to the Upload File and Browse to the Zip folder (the folder icon shows the zipper) and try selecting that zip folder that’s where I can get no further. Normally if you click on a file/folder it would appear in the “File Name” line at the bottom and then I would click on the “Open” button. However, nothing appears. (If I select a single file in the list it works fine) but I need to upload the entire zip folder. ??? I even tried downloading WinZip to see if it would create a single .zip file but it also creates a folder full of files. ???
Tips?
So are you able anywhere to upload zipped folders to your Moodle 2? If not, then that could be an issue with your Moodle site not accepting the zip extension rather than anything you are not doing from these instructions.
Thanks Mary – I was having real problems with this after upgrading to Moodle 2, followed your instructions and the problem is solved! I did have the same problem as Trevor, solved it by changing display preference to “pop-up”.
Hello,
I need a help with moodle 1.9.9,
what is the exactly directory that I should upload the zip and then unzip?
Thanks!
This blog post was about Moodle 2. If you want to do the same with Moodle 1.9 you just upload your directory into the course files, unzip it there and then using the “add a resource>link to a file or website” option you can link to the index.html file
Thanks, but where is this “course files” ?
Why not head over to http://www.moodle.org and ask your question there where we can explain in more detail! If you are in 1.9 then you have a link in your course administration block to the files in that course.
I cannot thank you enough for this information. I have been struggling for 2 days and came across this article and was able to load flash presentation. Thank you thank you thank you.