How can I prevent guest users from downloading files from a directory

How can I prevent guest users from downloading files from a directory

by Peter Evans -
Number of replies: 5

I have a course in Moodle 1.8.4 that I want guests to be able to easily enter and view forum messages but I dod not want them to be able to post forum messages or download files until they have registered.

I can stop them posting messages by using  ADMINISTRATION > ASSIGN ROLES >  OVERRIDE ROLES > GUEST > then selecting PREVENT against

How do prevent them from downloading documents that have been upoaded into Moodle and are displayed in a DIRECTORY.

The site is at http://www.baker-evans.com/community/course/view.php?id=6 if you want to look at it and it provides tools to help markers to electroncially mark assignments.

Thanks in advance for any assistance,

Peter

Average of ratings: -
In reply to Peter Evans

Re: How can I prevent guest users from downloading files from a directory

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Peter,

Unfortunately it's not possible to prevent guests from downloading files in Moodle 1.8.4, however if you upgrade to Moodle 1.9 you can do so by setting up a grouping then assigning the resources to the grouping only. Please see the groupings documentation for further information.

An alternative solution, also only in Moodle 1.9, would be to create an HTML block containing links to the resources, then hide the block from guests. Please see the block permissions documentation for further information.
In reply to Helen Foster

Workaround to prevent guest users from downloading files from a directory (1.8.4)

by Peter Evans -
A workaround with 1.8.4 to stop unregistered users from downloading files it to hide the Directory resource and then use
Assign roles > override roles > Students > Course > View Hidden activities > and select ALLOW

It ain't wonderful but it works as shown on http://www.baker-evans.com/community/course/view.php?id=6

Guests can look at the course and the forums but can't post messages or start discussions or download the software.

Peter
In reply to Helen Foster

Re: How can I prevent guest users from downloading files from a directory

by Peter Evans -
I have now upgraded to 1.9 and still want to allow GUESTS to enter the course but NOT to download files.

The goal is to allow people to look at the site but not allow them to download files as soon as they have registered on the site. I can't use:
  • a grouping because this would mean that I would have to individually allocate users to the grouping as soon as they register (not very practical)
  • I don't want to use a block as I want the download in the centre of the screen.
Ideally the link to the download would be in a web page resource or perhaps a database and I would like guests to see the "access denied" message when they try to access it.I can hack it together by hiding the item then using OVERRIDE PERMISSIONS to allow students to see hidden activities. This is not ideal as it is shown in lighter text.

Does anyone know a way to allow registered users to see teh web page resource or database but prevent Guests from accessing it?

Peter Evans


In reply to Peter Evans

Re: How can I prevent guest users from downloading files from a directory

by Mitch K -
I would like to do the similar things, as well. I also want to show the link of the resources to the guests but would like to prevent from downloading.

Have you found the way?
In reply to Helen Foster

Re: How can I prevent guest users from downloading files from a directory

by Sandy Pittendrigh -
I use Moodle for displaying topics-oriented assignment headings, discussion forums,
multiple choice tests and grading. In other words I try to limit my use of Moodle's
built-in page editing (for each sequential topic) to an entry level page that describes the assignment in words, and then includes links to external HTML pages published by me (using various tools). Moodle is hard to modify. But when I publish pages with my
own tools, I can do anything I want (like limit access to resources).

This works for me because I'm a developer. But I tend to think it would be the
better model regardless. Why should Moodle developers try to duplicate what can
already be done so much better with Drupal, CMSMadeSimple, Joomla, Wordpress
and dozens of other far more powerful and flexible page generation systems.

Perhaps Moodle should stick to the course management role, and leave page
publishing up to major-league software that already does it so much better.