Images in course-description not accessible for logged out users

Images in course-description not accessible for logged out users

by Felix Berger -
Number of replies: 11
Hello there,

I am currently trying to set up a moodle site that shows course descriptions on the front page. To do this, I have created a text section (describing the course) within the course-settings/general HTML editor and also linked Image files for each course which were uploaded before in the appropriate course's files directory.

Now I have realized that logged-out users can see the course-description's text. But the image links keep breaking as long as the user is not logged in. The links are printed in the following syntax:



The syntax remains the same - no matter if they are accessed from a logged in or logged out status.

I guess - as there is an option of creating "site files", the best way to solve this issue would be to upload the course images within a site wide directory and to link them from here. I have tried this, but it seems the "site files" directory (in this case: "moodledata/1/sitewide/content_images" cannot be accessed from the course settings' HTML editor.

Am I mistaking any basic concepts or is this just not possible - hints are very much appreciated.
Average of ratings: -
In reply to Felix Berger

Re: Images in course-description not accessible for logged out users

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
What you do is you upload your image to the site files and then you right click on it, get its properties - which is its URL - and then when you go to the html editor, instead of trying to upload an image or access it from the course files, you just paste the URL of that one in sitefiles into the top box. Moodle will recognise it as an image and will display it. smile
In reply to Mary Cooch

Re: Images in course-description not accessible for logged out users

by Felix Berger -
Thx for the quick reply! I followed your instruction - though, I am not sure what you mean by "sitefiles into the top box". Do you refer to an option within the HTML editor?
In reply to Felix Berger

Re: Images in course-description not accessible for logged out users

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
I mean as in the attached screenshot - paste the url of the image you have uploaded to site files into the location box at the top of the drop down you get when you try to insert an image into the html editor
Attachment imagemoodle.png
In reply to Mary Cooch

Re: Images in course-description not accessible for logged out users

by Felix Berger -
Now got your point and of course it works like a charm - thanks a lot, Mary!
In reply to Felix Berger

Re: Images in course-description not accessible for logged out users

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
you are welcome smile
In reply to Mary Cooch

Re: Images in course-description not accessible for logged out users

by Fernando Vicente -

Hi, I am experiencing the same issue that Felix refers above.  Logged out  users cannot see images that come with course descriptions.  I've tried your solution using a direct URL For the image. However it doesn't work for me.  Would you by any chance know of any other possibility to fix this?

Any help or hints would be greatly appreciated.

I'm using Moodle version 1.9.19  and Firefox  version 15 to edit the website.

this is the URL: http://newthoughtlearning.org/courses/

 thank you for your attention.

 Fernando

 

In reply to Fernando Vicente

Re: Images in course-description not accessible for logged out users

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

Hi there and thanks for posting the URL because it made it easier to check your issue.  You need to upload your images to the site files (NOT the individual course files) So go to Site admin>Front page>Site files and upload them there and get their URL from there. Images in that folder (directory #1) can be seen by anyone in the world but you have uploaded yours into the course, which can only be accessed once you are enrolled in the course.

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

Re: Images in course-description not accessible for logged out users

by Fernando Vicente -

Hi Mary,

 thank you for correcting my understanding.   This time  I followed your instructions and it is now displaying course description images when logged out.

 I appreciate your help.   I really spent a long time trying to figure  this out by myself, but unsuccessfuly.

Again,  thank you so much.

 Fernando

In reply to Fernando Vicente

Re: Images in course-description not accessible for logged out users

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

This no longer works in Moodle 2.x because site files has disappeared. 

So currently I just have a set of files in a web accessible directory and link directly to them. Is there a nice "in Moodle" way to show images from the course description to users who are not logged in?

In reply to Justin Hunt

Re: Images in course-description not accessible for logged out users

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

 I think you can just upload them via the image icon in the TinyMCE editor or else (in 2.5) add them as course summary files?

In reply to Mary Cooch

Re: Images in course-description not accessible for logged out users

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Actually that is correct. I was using images from legacy files and that somehow affected things. 

If I add a new image via the image icon on TinyMCE it works fine. Thanks.