Resource only for logged in users?

Resource only for logged in users?

by Manuel Aristarán -
Number of replies: 4
Hi,

I'm integrating a product into moodle, and i need to add a Resource (WebLink) on the front page's main menu, visible only to logged in users. Is that possible?
If not, how can I add a link with that behaviour; without modifying moodle's code?

Thank you!

Manuel Aristarán
Bahía Blanca, Argentina

Average of ratings: -
In reply to Manuel Aristarán

Re: Resource only for logged in users?

by Andrea Bicciolo -

Where is placed the resource? If it is inside a course, and the dependent files are uploaded from within the Moodle interface straight to the "Moodledata" folder, you should have your resource protected.

In reply to Andrea Bicciolo

Re: Resource only for logged in users?

by Manuel Aristarán -
Thanks for your reply:

The resource is placed on the "main menu" of the front page, not inside a course.
In reply to Manuel Aristarán

Re: Resource only for logged in users?

by Andrea Bicciolo -

If I correctly understand, you intend to place a link to a resource on the Front page, I think on the top left side block. But where are placed the resource file phisically? If it is in a course area, a login is needed.

If t is uploaded in the Site File, I think there is no way to protect it unless you set your site to forcelogin=yes, but in this case also teh front page will be availabel only after login.

There is another option: if teh resource is an HTML file, you could place the file outside moodle but inside teh web space, the protect the page with this code I posted several months ago. It is not updated, you may want to try it.

In reply to Manuel Aristarán

Re: Resource only for logged in users?

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
You could create the WebLink as a Resource in any Course (which would mean that only logged in users could access it) and then create a Resource on the front page that would actually link to the Resource in the Course... so your WebLink on the front page would be a link to another Resource on your site. It would not be hidden, but would force people to login before they could access it.

This made sense when I thought about it, but I don't think I've explained it very well blush