* We bump our minimum node version up to >=4. Although this isn't yet
necessarily *required* it was spurred on because grunt dropped support
for very early node versions and so it's likely some devs will have to
upgrade their npm.
We do it now which gives us more flexibility for tools going forward
(especially for things like new theme/testing). And node has matured
the ecosystem (especially supporting properly semver) so should result
in less edge cases.
* We make the minimum node version explicit in package.json. Though it
doesn't help much for older versions of node because npm doesn't
have the functionality to warn about it.. ;-)
* Left async dependency as it was, because it's only on an RC: 2.0.0-rc.6
This functionality was commented out in
78946b9bdb1299a21f00b88d81c73ad8700c951e for MDL-20204 back in 2009.
Since then it has been wasting cycles performing utterly pointless
preg_match and preg_replace calls.
The decision has been made to deprecate it in stables, and remove it in
3.2.
1. Improve upgrade note
2. Don't abuse $PAGE to get the current course/cm
3. Use validate_context, never $PAGE->set_context()
4. Reset current coursemodule in validate_context().
5. Respect moodlepageclass when calling an external function.
Fix:
$PAGE->context must be reset when calling validate_context
Improve:
Provide wrapper for calling an external function
The wrapper correctly checks the function parameters and return type against
the description of the external function, and stores the PAGE and COURSE global
state variables, restoring them before the function returns.
Fix: buggy unit tests.
These tests are expecting debugging from a bug that was fixed, and calling web
service functions with no user or session.
The function get_role_users() requires the caller to include the $sort fields in
the $fields argument. On PostgreSQL this will cause the function to fail when
the default $sort fields aren't part of the requested fields. The behavior of
the function is augmented to add the $sort fields to $fields if they are not
already present.
Also the get_property_definition() was created to get the property without retrieve the whole definition cache and
unit tests were created to tests those new methods.
This is a squashed commit containing a number of changes:
This is an ajax driven course selector that has searching etc. It can select single, or multiple courses.
Make course selector accept a list of courses to exclude
courseselector - lookup coursename on setValue
Use the get_course_display_name_in_list function to generate the course names
Add a throttle to auto-complete to reduce spamming the server
Do a single query to fetch all the courses in the mform element when validation fails
Fix core course search function to return results when there are less than 2 chars in the query.
Handle setData with an empty array in new course selector