MDL-47033 general: Fix incorrect use of 'course' layout

It should use 'incourse' layout in most cases

Signed-off-by: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
MDL-47170 tiny_mce: Fixed display of bullets in rtl languages
MDL-47214 General: Multiple IP addresses in X-Forwarded-For Fixed

Fixed getremoteaddr() function handle multiple IP addresses
MDL-46920 theme_bootstrapbase: fix dropdown to use data-target
MDL-47154 behat: extended table head look up to check if header is link

Header can be a link, this step will now look if
header has a text or header link has the text

Part of MDL-46191
MDL-47154 behat: escape user supplied strings in xpath
MDL-39190 Javascript: Pop-up calendar days of week wrong

The YUI2 calendar widget (still used via 2in3) uses midnight as the time
component of its Date objects, which triggers a Safari bug resulting in
11pm Saturday being returned instead of midnight Sunday when subtracting
days to get the last few days of the previous month.  This shows up ONLY
on the month after DST begins, if DST begins on the last Sunday of a given
month (and the Calendar widget is set to Sunday as the first day of the
week).  The fix/workaround of using noon instead of midnight is employed
by YUI3 and others.
MDL-37707 mod_assign: Prevent user from switching to and from team submissions
MDL-47378 mod_assign: prevent debugging notice

Parameters come out of get_user_preferences as strings.
MDL-47404 filelib: Prevent flash from treating files as uploads

Flash treats files as uploads if filename is passed in content-disposition
this causes security to be enforced that causes issues with SCORM packages
MDL-47398 core_grades: fix grade category generator
MDL-47069 admin: Add option to upload required ZIP at the check page

The plugins check page displays other plugins that the current one
depends on.  Previously, we always displayed the other plugin as a link
to the plugins directory. This did not work well in two scenarios:

* The admin wants/needs to upload the other plugin from the ZIP file
  (e.g. it is not available in the plugins directory),

* the other plugin is actually a standard plugin that is not supposed to
  be registered with the plugins directory.

This patch displays the Install or Upload or Check for updates links
next to the required plugin instead, as appropriate.
MDL-47333 fix support for custom fonts in tcpdf
MDL-47322 Availability: empty availability should be saved as null
MDL-42974 UI: Modal dialogs do not work in IE8
MDL-47408 user: Add enableblogs checking before adding blog's link.
Merge branch 'MDL-47378-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE
Merge branch 'MDL-42974-m27' of https://github.com/sammarshallou/moodle into MOODLE_27_STABLE
Merge branch 'MDL-37707-27' of git://github.com/FMCorz/moodle into MOODLE_27_STABLE
MDL-47411 admin: Check if the plugin is a git submodule on uninstalling

Credit goes to PJ King. I was trying to add unit tests for this new
behaviour but it turned out there are many hard-coded dependencies and
it's not easy to make the whole machinery support alternative location
of testable (fake) plugins.