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.
When working against external services it can be advantageous to not
have automated tasks all hit the service at the exact same time from
many different installations.
This change allows the use of 'R' in hour/minute fields of the scheduled
task definition so a task will be installed with a 'random' hour/minute
value for these sort of occasions.
Note that the task will be installed in the database with a defined
time, this simply randomises the time chosen when loading from the
definiton.
Remove errors when attempting to delete non-empty directories when
child directories do not get removed since the mtime was updated when
files were removed from the child directory.