HOME BLOG PORTFOLIO PHOTO CONTACT Admin Login
Giving the permission to change themes by user/guest/student in moodle.

Giving the permission to change themes by user/guest/student in moodle.

Very Simple close your eyes and open your eyes after few seconds when you fill relax.

Then
Step 1. Open your moodle directory

In my pc like :D :jaywampwwwmoodle4

Step2. Open here a file name is “moodle4/lib/setup.php”
In this file search “allowthemechangeonurl” near to line number 638
you have look like this

{code type=codetype}
if (isset($_GET['theme'])) {
if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
$themename = clean_param($_GET['theme'], PARAM_SAFEDIR);
if (($themename != ”) and file_exists($CFG->themedir.’/’.$themename)) {
$SESSION->theme = $themename;
}
unset($themename);
}

}

{/code}

Replace above code to like this

{code type=codetype}
if (isset($_GET['theme'])) {
/*if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
$themename = clean_param($_GET['theme'], PARAM_SAFEDIR);
if (($themename != ”) and file_exists($CFG->themedir.’/’.$themename)) {
$SESSION->theme = $themename;
}
unset($themename);
}*/
$themename = clean_param($_GET['theme'], PARAM_SAFEDIR);$SESSION->theme = $themename;
}
{/code}

Step3. open your browesr and give this type parameter
here i m using like my pc path like this :

http://localhost/moodle4/?theme=metal

http://localhost/moodle4/?theme=formal_white

Step4. Now enjoy its done.

Note I m writing with concept of moodle version 1.9.5+ (but most possible no difference my this tutorial on other moodle version)

http://www.themeswiki.org/Theming_Moodle here you search “Jay Bharat” Im giving same tutorial here also.

   Share on Facebook

Fatal error: Uncaught mysqli_sql_exception: MySQL server has gone away in /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php:67 Stack trace: #0 /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php(67): mysqli_query(Object(mysqli), 'INSERT INTO ips...') #1 /Applications/MAMP/htdocs/bharatbaba.com/analytics.jay.php(52): common::sql_query('INSERT INTO ips...') #2 /Applications/MAMP/htdocs/bharatbaba.com/footer.php(76): require_once('/Applications/M...') #3 /Applications/MAMP/htdocs/bharatbaba.com/blog.php(120): require_once('/Applications/M...') #4 {main} thrown in /Applications/MAMP/htdocs/bharatbaba.com/classCommon.php on line 67