restrict guest access to individual files, folders, or activities

restrict guest access to individual files, folders, or activities

by Matthew Stockinger -
Number of replies: 1

Hi and thanks for your reply in advance.

I'm a teacher (and moodle admin) who is interested in putting solutions to my textbook on my moodle site, but I don't want them accessible by guests. 

I have guest access allowed, but the solutions files are PDF versions of teacher's manual pages (so they're copyrighted).  I see no legal problem in me showing these pages to students, but obviously, there's a problem with having them publicly available. 

Things I've tried:

  • put the PDFs in a folder on the course page, then redefine the guest role to disallow access to folders.  This works, but there are other folders on the site, to which guests should have access.
  • same thing, but redefine the guest and authenticated user roles to disallow file viewing.  This doesn't seem to work at all; when I log in as guest, I can still download the files.

Most promising possibility: put the PDFs in a folder and use conditional user settings on the activity.  (see http://docs.moodle.org/25/en/Conditional_user_fields)  The only problem is that the guest user isn't really stored as an account.  The conditional user settings require me to identify the target user through a user field, such as first name or email address.  Of course, the guest access has neither of these.  Anyone have a trick?  I can't find anything in the docs or in google searches.

-Matt

Average of ratings: -
In reply to Matthew Stockinger

Re: restrict guest access to individual files, folders, or activities

by Abhi puri -

Hi Matt, I need to do something similar. I have the logic in mind, but am struggling with Code implementation.

Basically if we could create a dropdown in the conditions, that lists all available enrollment plugins for a course, and another one for the roles that are allowed access. We could pick what role or enrollment plugin has access to the activity / item.