New function \core_search\manager::is_indexing_enabled(), analagous
to existing is_global_search_enabled().
This replaces existing duplicated code, ready for more use in
following commits.
Previously we did not require the lib.php files for each module
in this ad-hoc task, which meant that the *_refresh_events functions
would only be called if some lucky sequence of events led to the
lib.php file for the module being required.
Instead we should use the component_callback function which can handle
that stuff automagically.
Due to imperfect validation of the user registration and profile forms,
we allowed for firstname and lastname be just a whitespace. On MySQL,
such a whitespace is not significant for VARCHAR comparison so these
otherwise valid accounts could be silently deleted.
The patch makes sure that at least one of the checked fields is a real
empty string before deleting such account.
The mark started function for the completions scheduled task can be very
slow and causes performance issues when running. By splitting this into
it's own task it can be managed independantly from the other parts which
update regularly.
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.
The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!
Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
touch should only work on temp and below
dir's. With path we get temp/.. and temp/.
So we were modfying moodledata dir as well
and it was failing because of permission issues.
This scheduled task was previously only doing a partial delete
due to the fact that the directory modification time would be
updated when a child file was deleted. It would then have to
wait another week before that directory could be deleted.