How can I integrate my customized theme to only the user end and not to the admin end for moodle. The admin end should remain the same,but when user logins the theme should change.


Just tried to answer this on stackoverflow but the question got moved :)

You could work around it - set the user end theme as the default and change the user theme for the admins to standard :

Go to /admin/settings.php?section=themesettings and ensure the option for allowuserthemes is ticked.

On the same page, you might also want to limit the list of themes to yourthemename,standard

Or add the following to the config.php file

$CFG->allowuserthemes = true;
$CFG->themelist = 'yourthemename,standard';

Then update the admin user themes to the standard - first you will need a list of admin ids.

SELECT value FROM mdl_config WHERE name = 'siteadmins';

Then copy the list into

UPDATE mdl_user SET theme = 'standard' WHERE id in ([listofadminids]);

So when an admin logs in, they will see the standard theme. All other users will see the default theme which is yourthemeame.

|improve this answer|||||
  • I'm having some html pages. I need these html pages to be used inside my moodle. When the student logins, this newly added html page should be displayed. – user40349 Jun 10 '14 at 5:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.