Understand ... gonna say 'no' (unfortunately) ...
Know you know the following ... but maybe a review?
Admin -> Repositories
Allow external links - Default is yes.
This option enables all users to choose whether or not external media is copied into Moodle or not. If this is off then media is always copied into Moodle (this is usually best for overall data integrity and security). If this is on then users can choose each time they add media to a text.
In repos ...
Box, Dropbox EQUELLA, Netcloud (new in 3.7 I think)
And there are, of course, the 'evils' ... Google, 2 Microsoft OneDrive's (one Legacy), Amazon S3, etc. Do any of those fit/behave to your liking?
Everything in one basket?
As long as the moodle site stays where it's hosted ... but when a Moodle site
moves to another hosting provider? or 2 moodle systems and one is being used to develop ... other production and using backup/restore needs to be checked out.
To avoid increasing space used in mooodledata/filedir anything setup would
have to allow teachers/students to upload there.
Thanks for the response! To check whether I understand you:
- The answer to my original question "Can I restrict a File system repository to Create an alias/shortcut to the file?" is No.
- The other information are my alternatives.
Am I right?
Well, read what you posted as meaning ..
"restrict a File system repository to Create an alias/shortcut"
was the only choice .... and no other options would be available?
OR was it ... removal of the option to 'copy to moodle'.
Might be having a 'senior moment' this AM! :\
From what I re-call (2.0) folks discovered if they had used things like a web page on another server, they edited that web page (changing maybe the year/semester info whatever ... small change), the original link remaining in Moodle did NOT actually re-acquire the changed page (cache?).
So an update to 2.0 ... 2.1 or 2.2 ... the alias + copy to Moodle was added.
Like many things in Moodle, once it makes it's way to core ... it stays.
I see, my post was too curt. Here is a longer version.
Here is a step-by-step description of what I can do and what I want to do:
1. I upload a (big) file to a File system repository through SCP/SFTP.
2. On my course page, I start adding a File resource.
3. I kick File picker by by klicking on Files under Select files
4. I navigate to the File system repository and choose the file I uploaded in step 1.
5. Now I am given the choice
[*] Make a copy of the file (the default)
[ ] Create and alias/shortcut to the file.
What I want is the second option being the only option. (I know, a single option is not an option. Let's leave that aside.)
That;s kinda what I thought .... senior moment or not .. ;)
An alias/shortcut would be like Apache/OS symlinks then - only it's meta data coming from DB .. the added layer of complexity when it comes to files.
If one removed a symlink via any apache interface set to follow symlinks it actually removes the source files.
So in other words, and by example: Large videos in
Would have to be included in backups of courses. Backups of that course would include the meta data, but how about restore routine ability to re-create file system repositories which only admin level user can do?
And what if the backup/restore courses process was being used to get from a neglected moodle site that is now 10 versions behind, admin user finds it too difficult to update/upgrade the site in place ... or has opted to move the site to new hosting ... old site won't allow tweaking of what's needed to run latest/greatest of Moodle.
Hmmmm ...some catch 22's there me thinks! :|
Using your example on your system, make a query of the DB for the moodle of mdl_files for that file 'deb-ratnavis.ova' and in the query include other columns of that table.
mysql> select filename,filesize,contenthash from mdl_files where filename='deb-ratnavis.ova';
using the contenthash value above and located in moodledata/filedir/
Let's say your server gave a contenthash value of:
Find and list the file, like so:
find ./ -name 07899ef5d4dd538aa250a98788eaa9d27276be7c
ls -l ./07/89/07899ef5d4dd538aa250a98788eaa9d27276be7c
What do you get? That's a question for your info only.
Make a no user backup of that course. Restore the backup to another server that doesn't have filesystem repo 'public'.
Does the course restore entirely? Including the link to the 'deb-ratnavis.ova' file?
You are right. I have to understand these Repositories beter. I tend to postpone it every time - were never love at first sight!