Topics Map > Course Resources
Importing a website into your Moodle Course
Importing an existing set of web pages with CSS and JS to function as a single "site" within your moodle course.
This is more of an advanced topic as to be able to even have the website to import you must be able to create a website using a tool like Dreamweaver or on your own with HTML,CSS,JS.
- It is possible to host a website within Moodle by first making sure all links within your web pages are relative to each other. What we mean by this is if you have an index.html page and a book.html page in the same directory, as a link to the book.html page from the index page you have "/book.html". If this is not done, links within the pages will not work.
- Also make sure that paths to CSS and JS are also relative
- After this is done, you will need to zip up the root directory of your site into one zip file
- Go into your Moodle course and add a File resource activity
4. Add the zip file as the file for this resource.
5. After that is uploaded, select the zip file in the file picker, and then a popup window will appear.
6. In the popup you'll be able to select "unzip". After unzipping you'll see a folder in the file picker.
7. Navigate into the folder and select your "index" page, whether that's named index.html or something else.
8. After clicking on that, another window will appear, in which you can select it to be the "main file".
Making it the main file means that this is what Moodle will open when a user clicks on the resource.
9. After that you can go through the rest of the normal Moodle resource options in the form.
We recommend the "In frame" display option as this works the best for websites within Moodle
-- Individual files can be updated after this process is done as well so that you don't need to re-upload the whole zip file.