MDL-47564 Availability: incorrect use of defined('PHP_UNIT')
MDL-47572 libraries: modify unittest to avoid random timing fail

Thanks to Nigel Cunningham
MDL-47583 tinymce_managefiles: correctly decode filename
MDL-47583 atto_managefiles: correctly decode filename
MDL-47594 core_accesslib: removed three useless lines of code
MDL-47431 advanced grading: correct use of frankenstyle names for consistency
MDL-44548 mod_scorm: force an external sync to check for updated files.
also remove some globals no longer needed (not used in function or in required files.
MDL-47613 wiki: allow searching several words

Thanks to Sandeep B for suggested solution
MDL-47603 quiz edit: qbank popup preview icon needs new window

Also, ensure that clicking the + icon adds the question on the right
page.

Bit of this fix are a bit hacky, but we have to deal with the fact there
is not a good general solution to MDL-47604.
MDL-47631 report_participation: fixed filtering by letter
MDL-46819 core_grades: Negative weights are changed to 0

Negative weights in the natural aggregation are not currently permitted.
Any figure below zero is changed to a zero.
MDL-46546 core_grades: Notice display for bad import.

If the initial import of csv data is bad, a notification
will be displayed to the user.
MDL-47140 editor_atto: Improved error handling
MDL-47463 core_grades: Handle course contribution of scales
MDL-47463 core_grades: Behat checks the contribution of scales
Merge branch 'MDL-47140-master' of git://github.com/gurgus/moodle
Merge branch 'wip-MDL-46546-master' of git://github.com/abgreeve/moodle
Merge branch 'wip-MDL-46819-master' of git://github.com/abgreeve/moodle
MDL-47463 core_grades: Behat checks the contribution of single item scales
Merge branch 'MDL-47603' of git://github.com/timhunt/moodle