customscripts: Difference between revisions
From MoodleDocs
Dani Ureña (talk | contribs) mNo edit summary |
Rex Lorenzo (talk | contribs) |
||
Line 18: | Line 18: | ||
==References== | ==References== | ||
* http://moodle.org/mod/forum/discuss.php?d=31895 | * http://moodle.org/mod/forum/discuss.php?d=31895 | ||
* | * https://tracker.moodle.org/issues/?jql=text%20~%20%22customscripts%22 |
Revision as of 20:56, 4 March 2014
Custom Scripts Mechanism
Any scripts that are called directly via a url (eg index.php, user/view.php) can now be customised by placing a file with the same name (including directories) in my_moodle_data_dir/customscripts For example: my_moodle_data_dir/customscripts/index.php; my_moodle_data_dir/customscripts/user/view.php
- this is for people making short term changes to VISIBLE web pages in the moodle source code
- need to check relative links ; for example: never require ../config.php
- cannot add new files to customscripts folder because they are not accessible directly via web.
- better to use cvs or cogito for long term management of customisations to moodle code
- it seems to have been used extensively only by the Moodle_for_Mobiles project
- to enable Custom Scripts, add $CFG->customscripts=path/to/customscript/folder (see Configuration_file)