Hi,
I've a few questions which have to do with the ability of a particular PHP version or MySQL version to break my moodle module. This goes without saying that the Moodle version itself may break my module.
1. When developing a Moodle module what should be my approach to developing such that I avoid becoming dependant on PHP and MySQL?
2. Or am I being unnecessarily cautious. Is Moodle designed in such a way that as a developer of Moodle modules, all I have to worry about is the Moodle version. The next Moodle version will take care of PHP and MySQL changes etc. and ensure that my module functions normally?
Many thanks for a prompt reply on this.
lstocky
Each version of Moodle has a minimum PHP version requirement. For lots of reasons you will need to decide the minimum Moodle version that your module will work with (you have to put it in version.php!). You should not use any features that are only in newer versions of PHP. Simple as that really.
MySQL is much less of an issue, as you should use the provided data access functions in the api. This will maximise your compatibility with all supported databases.
See also: http://docs.moodle.org/en/Installing_Moodle#Requirements
MySQL is much less of an issue, as you should use the provided data access functions in the api. This will maximise your compatibility with all supported databases.
See also: http://docs.moodle.org/en/Installing_Moodle#Requirements
you'll want to go to this moodle doc page: http://docs.moodle.org/en/Modules_%28developer%29 for information. Of special note is the link to a zipfile at the bottom of the page. That zipfile is basically a template module (including a version.php file).