Resource types

Alias/shortcut to a file

 
Picture of Melvin Romero
Alias/shortcut to a file
 

Hi,

I would like to know if this feature is by design or if it's a bug. According to me, it's the former, but I just want to make sure.

When I created a "Page" ressource, I made some hyperlinks to a server file with the alias/shortcut function. The original files are stored in a folder that I have hidden to the students.

The students have access to the alias while the originals are hidden, is this normal?

 

To reproduce what I mean:

1. Create a page

2. Create a folder with at least 2 files inside

3. Make hyperlinks inside the page ressource with the alias/shorcut function

4. Hide the folder to the students.

5. Connect as a student and check that the hyperlinks work.

It should work for everyone, this is by design right?

Thanks.

Mel

 
Average of ratings: -
Picture of Mat Cannings
Re: Alias/shortcut to a file
Plugin developers

Hi Mel,

This is one of those things that confuses people a lot when they move from 1.9 to 2.0. In 2.0 the files are no longer stored in an actual real location that you can browse to like on your computer. Now the files are stored "somewhere" on the server and attached to a resource/activity by way of a database reference. In 2.0 the hyperlinks to files do not go directly to the file but get processed by Moodle, checking permissions etc..., before the actual file is sent to the user.

The folder that you created with the files in is not actually a real folder but just something that looks and behaves like one, it has one or more links to files that are stored somewhere on the server. The resource that you created is just a link to the file. The file itself has no access settings/restrictions, these are just inherited from whatever resource/activity is linking to it. Moodle takes care of where it is stored, you do not have to worry about that.

If you hide the folder you have created then the students can no longer get to the files that way. If you still have resource links to the files then they can get to them that way. The URL's to the files will be slightly different for each activity/resource even if they point to the same file, that way Moodle can check the permissions properly when fetching the file.

If you do delete the folder then Moodle does not immediately delete the files within it. It first checks if they are used elsewhere, if they are then they are retained and the resource would still work.

 
Average of ratings: -