Retrieving images from HTML blocks

Retrieving images from HTML blocks

by Mary Cooch -
Number of replies: 8
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Have I missed something here or am I doing something wrong? I uploaded an image into an HTML block in one course and I thought I would do the same in another course but when I went to server files to the previous course to get the image there was no folder with the HTML block with the image in  -and neither did it appear in my recent images repository. So do I conclude that this image storing in server files doesn't work for images embedded in HTML blocks and if so, where is this recorded? (Or was I meant to know this?wink)

Average of ratings: -
In reply to Mary Cooch

Cannot Retrieve files from HTML blocks

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Just changing the title of this because I have done some more investigating and it seems if you had other file types as well as images ( I added an mp3) to an HTML block then they are not retrievable in another course, either from server files or recent files. I know block can appear in  more than one course or area and perhaps that has a bearing on this, but surely even if there is no mechanism for them to appear in server files they should appear in your own recent files? Asking for others to confirm this before I note it officially.

In reply to Mary Cooch

Re: Cannot Retrieve files from HTML blocks

by Farhan Karmali -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi Mary, I tried this on a Moodle 2.2 site.

Added HTML block in one of my course, uploaded an image there from my desktop.

Went to another course, added html block, the file I uploaded does not appear in recent files or anywhere.

I hope that helps

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Cannot Retrieve files from HTML blocks

by Sakshi Goel -

Hi Mary

I have tested it in moodle version 2.4.4 and 2.5 by adding a HTML block in the moodle home page and tried to add mp3 song in it and when i add a new HTMl block in the course but no file is appearing in recent files and server files.

In reply to Mary Cooch

Re: Cannot Retrieve files from HTML blocks

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Mary,

I am seeing the same funny behavior but it also depends on where you add the HTML block as the display options are different when added to the front page than when added to any other page. I have tried this on Moodle 2.3, 2.4, and 2.5 and it worked the same in all three...

If I add an HTML block on the front page and set it to display throughout the entire site, then I can see newly uploaded files in the Recent Files area anywhere I can edit the HTML block, but not any other editable place. I can also see recent files uploaded that were added to other editable areas.

If I add an HTML block in a course and set it to display on any page, then I can see newly uploaded files in the recent file area only when editing THAT HTML block in the original course or any that courses sub-courses. Any other editable spot, the newly uploaded item is missing from the recent files area. I can also see recent files uploaded that were added to other editable areas.

Hope you understand what I am trying to say,

AL

Average of ratings: Useful (1)
In reply to AL Rachels

Re: Cannot Retrieve files from HTML blocks

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I do understand -and the plot thickenssmile

In reply to Mary Cooch

Re: Cannot Retrieve files from HTML blocks

by Richard Jones -
Picture of Plugin developers Picture of Testers

I wasn't sure if I should add this here or start a separate thread - it seems that it might be related.

We are unable to load image files to the html editor area at all.  We get the file reference but no image.  I've tried this in Chrome and IE9.

missing image

It works here on moodle.org so may be related to our system - Windows IIS and MS SQL.

What do you think Mary,  file a bug report or add it to yours?

Richard

In reply to Richard Jones

Re: Cannot Retrieve files from HTML blocks

by Richard Jones -
Picture of Plugin developers Picture of Testers

I tracked down our problem - the zip file we got did not contain all the required Moodle source files (draftfile.php, help.php and a bunch of others were missing).

Not sure how this happened, maybe there is a rogue mirror out there somewhere?

Cheers

Richard