Clone a Moodle Theme 3.10 >

Time has come around again for a major upgrade of Moodle 3.8 to 3.10, with this bring the fun of making sure the theme is working okay. Adaptable has just released their latest theme for Moodle 3.10, so I’ve taken this and cloned it. For this makes it easier to know which theme works on which version of Moodle we have installed. In the past we’ve needed to flip the DNS to the new production server.

Hopefully the below will work for you, it took me 10 attempts to crack it, without having random php / file errors showing on the browser or in dev tools.

Step 1

Download the latest version of your theme, we are using the 3.10 version of adaptable here. In Notepad ++ use the ‘Find in Files’ function to locate everything ‘Adaptable‘ which is the current name of the theme, replace that with your new name ‘ManMet-Adaptable‘. This should be two hits in one file, then hit ‘Replace in Files’. This just changes the naming in the language pack

Step 2

Now search for ‘theme/adaptable‘ and replace all with ‘theme/manmet_adaptable‘ (dont use a minus symbol in the theme path). This should find 24 hits in 8 files, now replace all with ‘Replace in Files’.

Step 3

Search for the original name of the theme ‘adaptable‘, change this to ‘manmet_adaptable‘, this is a massive file and replace with 3199 hits in 149 files.

Step 4

Now search the theme code for ‘/adaptable/‘ and replace with ‘/manmet_adaptable/‘. This should replace 33 hits in 9 files.

Step 5

Now find ‘theme_adaptable‘ and change that to ‘theme_yourname‘, in my case this is ‘theme_manmet_adaptable‘. This should be replacing around a large 2201 hits in 148 files.

Step 6

The unknown step.. I think it is required 🙂 I think it’s to do with the tabs in the theme settings. Search for ‘THEME_ADAPTABLE‘ and replace with ‘THEME_MANMET_ADAPTABLE‘, this should return around 18 hits in 7 files.

Step 7

Check places like config.php in the root of your theme and see that the main theme’s .css matches what is in /styles dir, also check that the naming in \jquery\plugins.php matches the name of the .js file in \jquery it should be under

$plugins = array(
    'manmet_adaptable' => array('files' => array('adaptable_v2_1_1_2.js')),

Step 8

Change the name of the theme folder to match, zip it up and deploy for testing – Good luck ! should the above method not work for you, do try the one which was working on < Moodle 3.9 which I wrote in 2018.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s