Merge branch 'mdl34020-moodle26' of https://github.com/tlock/moodle into MOODLE_26_STABLE
Merge branch 'MDL-41506-26' of git://github.com/FMCorz/moodle into MOODLE_26_STABLE

Conflicts:
	theme/bootstrapbase/style/moodle.css
MDL-43794 Files API Set the mtime of files to extraction time.

The restore cleanup code expects the mtime to be the time of extraction
not the mtime before archiving. If set to the old mtime, the restore
files may be cleaned up before the restore is complete.

This behaviour also matches the behaviour of the zip unpacker.
MDL-43800 course: groupings are sorted alphabetically
MDL-43643 chat: do not assign to nonexisting cm_info properties
Merge branch 'install_26_STABLE' of git://git.moodle.org/moodle-install into MOODLE_26_STABLE
weekly release 2.6.1+
MDL-43246 give unit tests class a better name.
MDL-43246 some question data mapper unit tests

With fixes for the issues unearthed by these tests.
MDL-43246 question engine: avoid order-by id.

This was breaking with oracle master/master replication. Fortunately all
the places that needed to be changed were private to datalib.php. There
is still some ordering by id there, but only places where we want a
consitent, rather than meaningful, order, so that is OK.

The queries changed by this patch all have subqueries in aggregate
queries that pull out the latest step for a question_attempt. Those
queries used to look for MAX(id) but now they look for
MAX(sequencenumber). This is equivalent (for databases where ids always
increase with time, except for auto-saved steps. In the past,  an
auto-saved step might have been considered latest. Now the latest step
will always be one that has been properly processed. You can aruge that
this change is an improvement. Anyway, it is a moot point. All these
queries are only used in reports which are run on completed attempts,
where there will not be any autosaved data.
MDL-43809 qformat_xml messes up $s in multianswer questions.
MDL-43688 dndupload: fixed positioning across themes
MDL-40786 User Profile: Right align profile fields in RTL mode (theme/bootstrapbase, theme/clean)
MDL-40786 User profile: Fixing narrow screen RTL collapse
Automatically generated installer lang files
MDL-43440 unit testing: Use cmid in unit tests when it should be used.

instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.

Conflicts from extra tests in master:
	blocks/comments/tests/events_test.php
	mod/assign/submission/comments/tests/events_test.php
	mod/data/tests/lib_test.php
	mod/glossary/tests/events_test.php
MDL-43746 fix require_course_login regression caused by MDL-25981
MDL-43757 messaging: Behat feature to test participants messaging

The new test checks that messages can be sent from
the participants block and they can be read when
accesing user's recent conversations.
MDL-43757 behat: Allowing the form field guesser to detect TinyMCE

It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
  when values contained double quotes.
- Adding seconds to the screenshots directory to
  avoid using the same folder for multiple runs.
MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.

This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.