MDL-44501 mod_data: Only attempt to export files when a file exists.

The error only occurs when portfolios are enabled and there is only one field which is
a file field.
Merge branch 'MDL-41665_master' of https://github.com/markn86/moodle
MDL-39726 backup: Move question files by context, not one at a time

Use question category contexts to send file to the file pool in bulk.
Questions are only restored in whole category chunks, so this is safe
to do.
MDL-45764 mod_lti: Fix adding General Tool

This error only occurs when a ltisource
plugin is present that implements the
get_types callback.
MDL-44309 Administration - correcting inproperly assigned column classes in environment table
MDL-45870 mod_assign: Outcomes are saved for each group member
MDL-45761 assign Set inline comment format properly when plugin is empty

If a plugin says it is empty, skip it for for building the inline
comment.

If not format was found in any plugins, set to FORMAT_HTML, which is
the default for feedback anyways.
MDL-20154 questions: question_delete_question should not check perms

By Moodle convention, library functions should not implement permission
checks, they are to be handled by the invoking code.
Merge branch 'install_master' of https://git.in.moodle.com/amosbot/moodle-install
weekly release 2.8dev
MDL-20154 quiz: Remove unused random questions

When a random question is removed from a quiz, and it is not
in use elsewhere, it should be deleted.
MDL-42835 mod_scorm: Close tree nodes using TreeView API
MDL-35648 adding missing distinct selector in sql on participation report
MDL-45789 mod_wiki: removed undefined "$this->other['itemid']" from the comments_viewed event description
MDL-45846 Libraries Reinstate custom user agent device detection
MDL-45574 Backup progress: Can time out with large number of files

When there are many files inside a single resource, it's possible
for the backup to time out because it does not report progress
while adding entries to the backup_ids table.
MDL-29708 Fixed extra slashes in $string['storedfilenotcreated'].
MDL-29708 Fixed file_exception() arguments in rename().
MDL-44711 navigation: improved expandable course calculation
MDL-45524 navigation: fixed non-expandable node behat tests