Editing html files imported from outside Moodle 2.1

Editing html files imported from outside Moodle 2.1

by Francois Evans -
Number of replies: 6

I uploaded an html file to a Topic area. From inside Moodle however, I don't think I have a way of editing it. All I seem to be able to do is to go back to my html editing application (e.g. Dreamweaver), correct the file and then upload it again to Moodle to update the server-side copy there.

Is it true that Moodle can only edit html files that have been made from inside Moodle to start with? mixed

Thanks in advance!

F.

Average of ratings: -
In reply to Francois Evans

Re: Editing html files imported from outside Moodle 2.1

by Francois Evans -

More detail...

I note that with 'Add a resource', 'html pages can be made' and 'html files can be uploaded', into Moodle. One can only bulk-upload files (e.g. by FTP).

Once a page has been made, it can be editied from inside Moodle at a later date using Moodle's html editor; but the same cannot be said of html files! Once these are uploaded, Moodle will not allow them to be edited using the html editor sad ...(or am I missing something)?

I would like to be able to bulk-upload html files and then edit their html code once they're inside Moodle. Is this possible?

 

F.

In reply to Francois Evans

Re: Editing html files imported from outside Moodle 2.1

by Stefan Nychka -

Hi.  I believe you're right.  I've never noticed a way to edit uploaded files using the WYSIWYG editor, although note I haven't been looking, and haven't yet used 2.1 (just 2.0.x and 1.9)

In our case, bulk uploads means we're creating an html mini-site, and thus whatever html editor was previously used will still be used.  Or, we use the file upload for non-html files.

Otherwise, we create Pages (or whatever appropriate activity/resource) and edit those.

If you really wanted, you could copy-and-paste the html from the file into the Moodle editor, edit it, then copy-and-paste the source back into the body of the file, then upload.  It's not quite this straight-forward, but with a bit of experimentation to learn the details I didn't mention, it would be possible and likely not too tough.  It seems cumbersome, though.

Cheers

In reply to Francois Evans

Re: Editing html files imported from outside Moodle 2.1

by François Lizotte -
Picture of Particularly helpful Moodlers

Hi François,

Did you find a solution? I have the same issue. We are migrating from our homemade LMS to Moodle, and I have to mode html files.

In 1.9, we can edit the pages in text mode. But I tested in 2.0 and couldn't do anything.

François L.

In reply to François Lizotte

Re: Editing html files imported from outside Moodle 2.1

by Patrick Thibaudeau -

As far as I know, there is no way to edit uploaded files from within Moodle.

A work around would be to have your HTML pages hosted on a seperate web server and use the URL resource in Moodle 2.x  with the display option set to embed.

If you are using Moodle 1.9.x, you won't be able to embed, but you can use link to a file or website. Set the window option to new window. This way the user is back in Moodle when they close the window.

These solutions will not allow you to edit files within Moodle, but atleast, you do not have to re-upload each time you make a change to the files.

In reply to Patrick Thibaudeau

Re: Editing html files imported from outside Moodle 2.1

by Andres Ortiz -

Hi Patrick! Sorry but u can be embed in 1.9.  I used "iframe" and is perfect for embed content like html.

ex. <div align="center"><iframe heigth="100%" border-color="#FFFFFF" border="0" src="/*****.html" align="middle" frameborder="0" height="320" width="100%"></iframe></div>

In reply to François Lizotte

Re: Editing html files imported from outside Moodle 2.1

by Itamar Tzadok -

I've just implemented something to that effect in my contributed dataform module. It works for html files such that on the designated editing mode the content of the file is copied into a moodle editor where it can be edited. Saving replaces the old file with a new modified one in the filesystem. It is currently just a stub and there are a few limitations, such as embedded images must use external links (rather than pluginfile), but these issues are resolvable with some more work.

A similar approach may probably be used for extending the resource module to allow internal editing of html files.

hth smile