Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]
This file is executed right after the install.xml For more information, take a look to the documentation available: - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
Copyright: | 2009 Petr Skoda (http://skodak.org) |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 326 lines (15 kb) |
Included or required: | 5 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
xmldb_main_install() X-Ref |
Main post-install tasks to be executed after the BD schema is available This function is automatically executed after Moodle core DB has been created at initial install. It's in charge of perform the initial tasks not covered by the {@link install.xml} file, like create initial users, roles, templates, moving stuff from other plugins... Note that the function is only invoked once, at install time, so if new tasks are needed in the future, they will need to be added both here (for new sites) and in the corresponding {@link upgrade.php} file (for existing sites). All plugins within Moodle (modules, blocks, reports...) support the existence of their own install.php file, using the "Frankenstyle" component name as defined at {@link http://docs.moodle.org/dev/Frankenstyle}, for example: - {@link xmldb_page_install()}. (modules don't require the plugintype ("mod_") to be used. - {@link xmldb_enrol_meta_install()}. - {@link xmldb_workshopform_accumulative_install()}. - .... Finally, note that it's also supported to have one uninstall.php file that is executed also once, each time one plugin is uninstalled (before the DB schema is deleted). Those uninstall files will contain one function, using the "Frankenstyle" naming conventions, like {@link xmldb_enrol_meta_uninstall()} or {@link xmldb_workshop_uninstall()}. |