How to disable right click in Moodle

Disabling right click is a stupid way of protecting one’s content. If your browser able to read the content, so does the user. The user able to download / copy or do whatever they want to do. That’s a fact!

Moodle

However if you are a Moodle user, you may notice  ‘Save Video as’ option on Chrome for your videos as annoying.

There is many other suggestions such as embedding the content using iFrame etc to prevent content download. However such method will prevent users from using offline reading feature in Moodle mobile.

So here is a simple way of preventing right click on your Moodle site;

Go to Site Administration => Appearance => Additional HTML

Add the following code in When BODY is opened section;

<script language=JavaScript>
<!–
var message=”Function 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(“;return false”)
// –>
</script>
That’s it!

Editing Moodle Badge after its issued

Moodle badges will become locked and you cant change the criteria once its issued. Thefore editing Moodle badge after it is issued to users is impossible from the backend.

Moodle Badges Locked

 

 

However, you still can edit the badge criteria from your Moodle database.

Before doing any changes to the database, ensure you have made backup of your database and Moodle files. Wrong alteration to Moodle database tables may cause your Moodle stop working! Continue reading “Editing Moodle Badge after its issued”