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
We now abstract the actual file generation to a new function.
We are then able to call this function from the other image generation
sources. This allows us to generate thumbnails in a more efficient manner.
* Stored files stay as stored files and are not temporarily re-written to
disk;
* Strings containing an image remain as a variable and are not temporarily
written to disk; and
* Arbitrary files are not captured to string.
This adds functionality to create individual request directories which can
be only be used for the current request. They are removed by a shutdown
handler.
The environment.xml files in plugins force you to define the versions of Moodle that the checks should be carried out against.
For community plugins the environment requirements of the plugin seem unlikely to be dependant on the version of Moodle.
This patch will allow the environment.xml files to use a new <PLUGIN> tag in place of the <MOODLE version="> tag.
This solution has the following properties:
* The Environment file will not break versions of Moodle that do not support the PLUGIN syntax.
* Specific versioned MOODLE tags can still be defined for versions of Moodle that do not have this patch.
* If both MOODLE and PLUGIN tags exist the PLUGIN tag will be used in preference.
* The PLUGIN tag will not function in the main Moodle environment.xml file.
* The PLUGIN tag has a mandatory name attribute that must match the frankenstyle name of the plugin being tested.
Rather than setting noemailever in the bootstrap, this sets up a default
phpmailer message sink which will catch all messages.
Tests which require the phpmailer sink will continue to work as before
without change, though the noemailever config setting no longer needs to
be altered.
For tests wanting to test with noemailever set with the previous behaviour,
they will need to load the message sink and then close it.
This setting is not compatible with combinations of aggregation methods
and the ways in which it does and does not work are not documented. It
was voted to remove it completely by the gradebook workshop, so I have
completely removed it and added a warning for all affected courses + restored
backups.
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.
Added property 'visible' for cohorts. Unsetting it hides the cohort from users in the course.
AMOS BEGIN
CPY [visible,core_moodle],[visible,core_cohort]
AMOS END
* Upgrades existing data so that the groupmembersonly option is
replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
data and functions.
* Changes other core library files to remove groupmembersonly
references.
Includes deprecation of several functions, listed in lib/upgrade.txt.
Creates two new functions that make it easier to get cm_info
objects (both in modinfolib.php):
get_course_and_cm($cmid) - intended for use e.g. in modules;
efficiently loads $course and $cm (normally saves 1 query).
cm_info::from_mixed($cm) - for use in back-end API where we
are not sure whether a $cm is a real cm_info or a stdClass.
On some pages full user data is not stored before user_created/
user_updated event is triggred. So giving option to trigger that
manually, so it can be triggred after all data is saved