Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

customscripts: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
mCap resum de modificació
mCap resum de modificació
Línia 16: Línia 16:
* to enable Custom Scripts, add $CFG->customscript=path/to/customscript/folder (see [[Configuration_file]])
* to enable Custom Scripts, add $CFG->customscript=path/to/customscript/folder (see [[Configuration_file]])


==references==
==References==
* http://moodle.org/mod/forum/discuss.php?d=31895
* http://moodle.org/mod/forum/discuss.php?d=31895
* http://tracker.moodle.org/secure/QuickSearch.jspa and type "customscripts"
* http://tracker.moodle.org/secure/QuickSearch.jspa and type "customscripts"


[[category:Developer]]
[[category:Developer]]

Revisió del 08:53, 30 abr 2007

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