How do I Upload a HTML folder with files

How do I Upload a HTML folder with files

by Kalyan Chatterjea -
Number of replies: 4
Hi All
I am very new to Moodle. Using Moodle 2.8.5 to develop a course. I have a folder with a few html files with links and a few photos. I can upload the folder by dragging the folder and it uploads nicely. But when I try to open the html-file, the links do not work and the pictures are not displayed. Can you kindly help?
Best Regards
Kalyan
Average of ratings: -
In reply to Kalyan Chatterjea

Re: How do I Upload a HTML folder with files

by Matt Bury -
Picture of Plugin developers

Hi Kalyan,

Have you considered using the standard Moodle Page or Book modules? All you have to do is copy and paste the text from the HTML files and then upload and insert the images. If you copy the HTML from a web browser, the links will be preserved if they are to external sites/pages.

Page module: https://docs.moodle.org/29/en/Page

Book module: https://docs.moodle.org/29/en/Book_module

The Book module automatically adds page indexes with navigation links and you can sort them, add sub-pages, etc.

I hope this helps.

In reply to Kalyan Chatterjea

Re: How do I Upload a HTML folder with files

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Another, not very elegant, way is to zip those HTML, upload, unzip and set a "main file". For details see https://docs.moodle.org/en/File_resource_settings#Displaying_a_website_index_page.
Average of ratings: Useful (3)
In reply to Visvanath Ratnaweera

Re: How do I Upload a HTML folder with files

by Kalyan Chatterjea -

Thank you  Vishvanath. I tried your suggestion and it worked beautifully!

Thank you again for your prompt input which helped me solve my problem immediately.

The mistake I did was uploading the files as a folder, which didn't work!

One needs to (1) zip the files and  (2) upload as a single zipped file and then (3) unzip the files and then finally (4) select the starting file (could be e.g. index.html). Of course one needs to (5) save in the end! Also, need to select in Appearance (6) the pop-up option!

Hope others learn from this question and your answer!

Happy Moodling

Kalyan


Average of ratings: Useful (2)
In reply to Kalyan Chatterjea

Re: How do I Upload a HTML folder with files

by Kalyan Chatterjea -

Thank you Matt for your prompt inputs. Will try them out!

My case is like what is described by Vishvanath. I tried that and it worked beautifully!

Anyway, thanks to both of you for your prompt inputs.

The mistake that I did was uploading the files as a folder, which didn't work! One needs to zip the files and upload as a single zipped file and then select the starting file (could be e.g. index.html).

Hope others learn from this question and both of your answers!

Happy Moodling

Kalyan

Average of ratings: Useful (1)