MDL-37062 Course: Show one 'Add new course' button

Currently if there is no course and admin/course creator go to create course, he/she see two
'Add new course' buttons.
MDL-33117 grade: adding unit tests for the user report function inject_rowspans()
MDL-36095 Section availability: Make behaviour consistent with activities
MDL-29835: filemanager - zero means zero, not unlimited

The form_filemanager constructor was using empty() rather than !isset(),
so overwrote maxfiles=0 with the default (-1).  In addition, the JS UI
treated 0 as unlimited - but the non-JS fallback UI treated it as zero.
This would result in a file manager which allowed files to be
chosen/uploaded, which would then vanish into the void when the backend
saw that the maximum number of files was 0.
MDL-36335 - course: Orphaned activities no longer show a notice.
MDL-36335 - course: Orphaned activities no longer show a notice.
MDL-37173 Stop attempting to set User-Agent from core JS

This leads to some browsers throwing warnings that it is unsafe to set the
User-Agent. It doesn't help us in any way particularly either.
MDL-37194 activity chooser displays entire list of default activities/resources
MDL-37395 Add .jar filetype so Moodle doesn't incorrectly call it a zip file
MDL-37162: Use CSS to make mod show/hide icons not look "clickable" in hidden sections

Previously, the resource toolbox initialiser was using JS to find the show/hide icon, then find its section ancestor, then check if the section was hidden - only to pointlessly set pointer:auto if it was.  That didn't meet the aim stated in the comments ("Disable" show/hide icons (change cursor to not look clickable) if section is hidden), but this patch meets that goal with a single CSS rule.
MDL-36511 course: Save "completion starts on enrolment" disabled state
MDL-37354 clean return value for each externallib PHPUnit tests
MDL-29534 Forum: If forum_replytouser is not set then don't display from user email"
MDL-29534 Forum: if forum_replytouser is not set then send forum email using noreplyaddress.
MDL-35780 Administration: email display on user profile view page will respect user capability
MDL-32341 calendar: get_file_by_hash() expects a hash
MDL-35885 - Wiki - add a legend element to the search wikis form
MDL-36616 repository: Fix direct linking to images in Flickr Public.
MDL-37413 Use correct variable in chooserdialogue
MDL-37313 Moodle XML import format should use draft file areas, not arrays