Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

customscripts

From MoodleDocs
Revision as of 05:55, 22 June 2011 by Michael de Raadt (talk | contribs) (Created page with "==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 (includin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
  • to enable Custom Scripts, add $CFG->customscript=path/to/customscript/folder (see Configuration_file)

References