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!


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){
return false;
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
return false;
if (document.layers){
else if (document.all&&!document.getElementById){
document.oncontextmenu=new Function(“;return false”)
// –>
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”