When we want to delete all of the activities in a course we should
mark them as having a deletion in progress, as this makes them
unavailable to users immediately.
This should make it much less likely that a request to get a context
that does not exist should be made when a user accesses a page.
When deleting a course (especially one containing a large amount of
data) the course mod info cache could contain entries for deleted
activities for a signifcant amount of time making it possible that
users could see errors in Moodle.
Implemented with moodle_read_slave_trait
Functionality is triggered by supplying config dboption['readonly'].
See config-dist.php for more info on supported dboptions.
pgsql and mysqli drivers are using this feature. Also added support for
connection timeout for these two drivers.
When searching for the user by a case-insensitive field (email address
is the only one supported now), the performance may be very poor as the
DB cannot use the index due to the LOWER() operation and the full
sequential scan of all the user records is performed. On some DBs such
as MySQL, this can be significantly improved by pre-filtering the users
with accent-insensitive search.
So we first perform accent-insensitive search for potential candidates
in a subselect, which can use the index. Only then we perform the
additional accent-sensitive search on this limited set or records.
Component names should always support numbers (but the first character).
This patch will add PARAM_COMPONENT the expected regular expression
to validate the expected format.
If your server is behind multiple reverse proxies that append to the
X-Forwarded-For header then you will need to specify a comma separated
list of ip addresses or subnets of the reverse proxies to be ignored
in order to find the users correct IP address.
In the Behat CLI run (not in the individual web requests), if you
modified an existing $CFG variable then this would be reset at the
start of the next scenario. However, if you added a completely new
one, it would not be reset. This change removes those variables.
The Moodle sites now register with stats.moodle.org so use that as a new
official hub's URL. Beside that, allow for the alternative value be
provided in config.php for development and testing purposes.
Both the following constants are no longer needed as Moodle does not
support multiple hubs any more.
* HUB_HUBDIRECTORYURL is no longer valid as Moodle no longer supports
the listing of community hubs.
* HUB_OLDMOODLEORGHUBURL was used in the past for the transition
purposes.