For third-parth plugins, in can be helpful if the 'More help' links in
help pop-ups (the ones that come from $string['..._link'] string in the
language file) can go to other places.
This change support two other sorts of URL in addition to the standard
'course/editing' type of link that goes to MoodelDocs.
You can use absolute URLs, starting http:// or https:///
You can use a link starting %%WWWROOT%%, and that token is replaced by
$CFG->wwwroot to make the link.
This changes makes sure the error is triggerd when the exception is
thrown, so that the problem code is in the stack-trace. Before, the
error happend in the exception hander, so you could not see the code
that caused the problem.
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
The trouble is that dml driver methods (insert, update, select) are not guaranteed to return the same exception class for various db problems and coding style issues. The recommended practice is to catch dml_exception only.
incorrect PAGE init - it should be done at the very end; redirect() should not use OUTPUT before PAGE init; SITEID should be deprecated in favour of $SITE->id (this is going to cause troubles in tenant switching in CLI, cron and tests); missing "global $SITE"'; minor coding style issues; PHPDocs; it also helps with merging/testing of multitenant patch
The commit introduces four new constants that can be used to declare a
maturity level of Moodle core and, in the future, of extension plugins.
If the administrator is about to install or upgrade Moodle to a version
that is not considered as production-ready yet, a warning is displayed
before any change in the database.
Scripts that do not want buffered output just define NO_OUTPUT_BUFFERING before including config.php.
The fileserving code now checks if the headers are already sent which detects misconfigured servers.