
How to prevent files from downloading - consider
Moodle for mobile
Is it possible to prevent downloading of audio / video
Is it possible to prevent downloading of audio / video
Dear Friends,
I'm a new, quite inexperienced admin for a library site featuring audios (.mp3) and videos (.flv). The files are from the Moodle repository on the server, linked to (not copied into Moodle) and displayed embedded.
I've managed to prevent downloading of them by disabling the right-click feature for the entire site.
Now it turns out that mobile phones give the user the download option instead of streaming them. Is there some way that I can block that?
Thank you
Re: Is it possible to prevent downloading of audio / video
Hi Birgit,
that's an interesting question, there is a workaround to solve this but first of all I'd like to let you know that disabling the right-click feature is not secure at all (there are tons of extensions in the browser or ways to be able to download the complete list of resources linked in a page).
If you are embedding the resources, what you can do is instead embedding local files in your Moodle is embed files using a direct link.
The app only download resources embedded if they are served by Moodle, so, if you embed a file using an absolute URL the file won't be downloaded.
This will work only if you are embedding the files in pages, labels, books or in any activity in the description.
Juan
Re: Is it possible to prevent downloading of audio / video
Hi Juan,
Thank you for alerting me about the right-click!
I'm not sure I understand the "direct link" or "absolute URL". I have the files in a repository folder in my Moodle folder on a private server, so (to my knowledge) I cannot link to them directly, or?
If I upload them to a Youtube account for example, I would share private files via email. Do you mean that I could assign an email-id for the moodle site?
Re: Is it possible to prevent downloading of audio / video
Hi Juan,
I tried now to link to a file directly on the server. I have copied the path from Moodle's automated backups, which I know works.
Linking in the description box, though, seems to work a little different. It adds the normal "http://etc.etc./(path)" in front of the "path" and I therefore get the following error code in the flowplayer:
200, Stream not found, NetStream.Play.StreamNotFound, clip: '[Clip] 'http://etc..
Could you give me an example of how it should look or to work around this?
Thank you!
Re: Is it possible to prevent downloading of audio / video
Hi Birgit,
can you create a course in your site and grant me access as an editing teacher to that course so I can create an example for you?
If that's possible, please send me the credentials to mobile@moodle.comJuan
Re: Is it possible to prevent downloading of audio / video
Hi Juan,
Yes! Thank you for sharing.
To be able to post questions in a developer's forum and connect to your knowledge is really helpful.
I've sent you credentials to the above email. Please let me know if I need to do something more.
Birgit
Re: Is it possible to prevent downloading of audio / video
Hi Juan, I have the same problem as Birgit.
My courses are formed of mainly video lessons and anyway I try to upload them (by uploading a File, by embedding the link in a Label or by using an external url) they can be downloaded with the right click. Can you advise.
Even if it's not the most effective way I would want to disable the right click also. Where can I paste the JavaScript for this?
I use Moodle 3 and the uploaded files are in MP4 format.
Thanks, Dana
Re: Is it possible to prevent downloading of audio / video
Hi Dana,
I'm so happy we are 2 people now requesting an option to prevent this
Here's the disabling of the right-click:
In Site Administration / Appearance / Additional HTML you paste:
<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="This function has been disabled!";
///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
Moodle is great,
Birgit
Re: Is it possible to prevent downloading of audio / video
Hi Birgit,
Thanks a lot for the reply
Disabling the right click works fine. As for preventing the download in other ways was there any progress?
Cheers, Dana
Re: Is it possible to prevent downloading of audio / video
Hi,
if you want this functionality supported in the Mobile app you should open a new issue (New feature) in the Moodle Tracker (in the MOBILE PROJECT) https://tracker.moodle.org/projects/MOBILE and vote for it.
Alternatively, you can ask (and pay) a Moodle Partner to implement this, they can contact with us and we can suggest them how to implement it.
Regards, Juan
Re: Is it possible to prevent downloading of audio / video
Hi Juan,
My login for the link
https://tracker.moodle.org/projects/MOBILE
doesn't work. Shouldn't it be the same as for Moodle.docs?
I would very much like to post the functionality of mobiles preventing downloads of audio and video files.
Thank you so much for your advice.
Birgit
Re: Is it possible to prevent downloading of audio / video
Tracker is a different login to the moodle.org / forums site. Which is a shame, but I assume it's a time thing of hacking the tracker software to handle moodle logins.
Something for HQ to answer on why that's not been done as I do find it a nuisance needing a separate login.
-
-