Using externally edited HTML files

Using externally edited HTML files

by Keith Bone -
Number of replies: 5

I am new to Moodle and have been dropped in the deep end!

I notice that Moodle does not seem to like changed HTML files.

Tis is the process:

1. Create HTML page using an external package.

2. In Moodle, link the INDEX.HTML and all works fine.

3. Go back and edit the original HTML

4. Remove Moodle link to HTML file.

5. Delete the original HTML file in Moodle "files"

6. Upload edited HTML file (or all files needed)

7. Link the edited HTML file in Moodle.

For some reason Moodle still uses what appears to be a cached version of the deleted file!

The work around is to delete the (sub) folder in which the HTML file resides and copy the edited HTML file(s) to a new folder. Works fine, but seems weird to have to do this.

I have also notices some rather awkward limitations with Moodle's own HTML editing, which I will mention later.

Thank you

Average of ratings: -
In reply to Keith Bone

Re: Using externally edited HTML files

by Colin Fraser -
Picture of Documentation writers Picture of Testers
You are quite correct, and a good observer. Most people miss the clue about the cached file and just spew because they do not understand why they are seeing the older file.

Moodle is limited yes, but that is the nature of the language it is written in, a scripting language, in PHP. So the limitations are more likely the limitations of PHP than anything else. Unlike C or C++, scripting languages have yet to be seriously developed, (and before anyone goes off at me for that comment, just remember that no scripting language is anywhere near as sophisticated as a language that can be fully compiled, not even <ahem>VB<choke-cough-splutter-gurgle-gurgle-aaahhhhh>, it is still BASIC.

However, have you considered that it might be easier to just clear your cache rather than adopt some roundabout, seriously time consuming methodology to get a new file up?

Also, if you know anything about HTML then you can write your pages in a UTF-8 compliant text editor. You do not need anything overly fancy, just some bold, italic, and coloured text, with some images to get your points over. For use in your Moodle, you do not need to give any page superfluous code - it is all there.

Most Moodle users are painfully aware of the limitations of the HTML editor, and there are alternatives, but you need to go to other chats to get the instructions on how to change it. Apparently, Moodle v2.0 is fixing some of these issues, but it is not yet in Beta, but soon.

There are a number of issues with Moodle, we know, but compared to the others, it is an excellent tool capable of further development and open to external improvement. (Try that with any of the others.) Moodle can slide into Joomla, Drupal, can integrate, Mahara, MediaWiki and a range of other tools. You can use it as a one stop shop, an intranet, or it can be your web site, or as part of an overall public or private training and education cms, or web-based vle, take your pick, and it is the right price.

In the end, it all boils down to this page. Writing here, you become part of the Moodle Community, you can jump up and down, scream, get help, help someone else. You can add to your Moodle and share it with anyone else - or no one if you want. You can use it or not, suit yourself. Bottom line is that Moodle is a tool, with a lot of people willing to help you as best they can, all without charge. Where else will you get that from?



In reply to Colin Fraser

Re: Using externally edited HTML files

by ben reynolds -
> However, have you considered that it might be easier to just clear your cache rather than adopt some roundabout, seriously time consuming methodology to get a new file up?

Colin,
If the page has been substantially altered, why doesn't the browser recognize that and load the new page?


In reply to ben reynolds

Re: Using externally edited HTML files

by Colin Fraser -
Picture of Documentation writers Picture of Testers
The best answer I can give is that the manner in which the browser's cache is utilized by Moodle keeps the already downloaded page available for a period well after it does so the first time. Even if the browser is refreshing the page it does so from the cache, not from the server. For a more technically accurate description, you may need to ask this in the Developer's General Forum, or perhaps one of the code contributors will be able to give more detail. What I am suggesting is, I understand, correct, but like all approximate answers, it is couched in layman's terms for broader understanding, and it can be challenged, and I have no problem with that.

Clearing the cache forces the browser to return to the server to download the page like it would for the first time.


Average of ratings: Useful (1)
In reply to Colin Fraser

Re: Using externally edited HTML files

by ben reynolds -
I think that's a pretty good explanation, Colin. I admit to frustration with this aspect of Moodle (& I'm a fellow of patience, mostly).