How to activate duplicate feature on my new activity in moodle?

All we need is an easy explanation of the problem, so here it is.

I created a new activity on Moodle but I found that duplicate feature isn’t working .
is there any way to solve these problem .
after searching i found that i have to add backup folder in the folder of my activity
but i don’t know if that true or not

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

You will need to populate the backup files for your plugin – see details at

Your PLUGINNAME_supports() function in lib.php will also need to return true for FEATURE_BACKUP_MOODLE2

I usually start with something like mod_forum in the core code and use that as the basis for my activity plugin backup & restore code.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

Leave a Reply