This commit moves user agent related functionality out of several
core libraries and combines it into a more manageable class.
All core uses are converted and functions deprecated in favor
of the new class.
Includes:
* no more hacky reloads, everything is written only once and kept until cache reset
* lang menu list is now cached in MUC
* both string and lang menu caches are compatible with local caches on cluster nodes
* config-dist.php cleanup
Due to the newly introduced event user_loggedin, the upgrade
could not be reached as the event class was not found during login.
To remedy this, we need to force the upgrade before login.
With the alteration of the user table to include the new alternate name fields anyone
upgrading from one version to another will receive errors until they run the upgrade.
Forcing a redirect if major version upgrade will bypass this issue.
- Core upgrade MUST NOT call rebuild_course_cache() at all - update DB directly instead
- Plugins MUST call rebuild_course_cache(.., TRUE) for clearing the course cache and can not update DB directly
- Plugins MUST NOT call rebuild_course_cache() unless for clearing the cache
- Created function upgrade_ensure_not_running() to be included in other functions that can not be used during upgrade
It is weird, but Chrome PDF viewer keeps retrying byteserving requests for anything but 407. This commit also normalises response headers on all error pages.
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.