MDL-40096 assign: Prevent js error because uniqid() is not unique.

Use html_writer::random_id instead because it incorporates a static counter.
MDL-25473 mediaplayer - prevent embedded videos from looping
MDL-43306 restore: fix grade item sortorder restoration

Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
MDL-37972 Assignment: fixing settings link for upload single submissions
MDL-34321 Assignment2.2 - Fixing submission count
MDL-36984 Assign: Add redirect after saving grades
MDL-42085 Enrol: Always apply enrolment duration.

Before the fix, the startdates and duration fields were integrated to HTML code only
when the user clicked on the collapsible region to see them.
It was wrong because their values were not sent by the form
if ever the user didn't expand this Enrolment options region.
MDL-40436 block_course_list: Fix bad context resolution

We were trying to get the course context of a remote course
from a completely unrelated ID. It would sometimes work if the
ID was matching the one of a local course. In other places
we are not trying to find a context for the remote course, we
simply use the $PAGE context in format_string. So the usage
of the context has been removed here too.
MDL-43355 testing: Return the hash when HEAD points to a hash
MDL-43348 theme: html <nav> element on the wrong content.
MDL-42931 set new requirements for 2.7
MDL-43235 behat: Ensure that behat_config_manager::get_config_file_contents() has always a behat_wwwroot
Merge branch 'MDL-42085-25' of git://github.com/mouneyrac/moodle into MOODLE_25_STABLE
Merge branch 'w51_MDL-42931_m25_env27' of https://github.com/skodak/moodle into MOODLE_25_STABLE
Merge branch 'MDL-40436-25' of git://github.com/FMCorz/moodle into MOODLE_25_STABLE
Merge branch 'MDL-40096-25' of git://github.com/damyon/moodle into MOODLE_25_STABLE
Merge branch 'wip-MDL-43348_M25' of git://github.com/gjb2048/moodle into MOODLE_25_STABLE
Merge branch 'MDL-37972-25' of git://github.com/phalacee/moodle into MOODLE_25_STABLE
MDL-21180 Gradebook: Consistent handling of change in aggregation

Change from/to GRADE_AGGREGATE_WEIGHTED_MEAN and GRADE_AGGREGATE_EXTRACREDIT_MEAN was only
handled prior to this patch. GRADE_AGGREGATE_SUM and GRADE_AGGREGATE_WEIGHTED_MEAN2 also
behave similar and should be handled same way
Merge branch 'wip-mdl-21180-m25' of https://github.com/rajeshtaneja/moodle into MOODLE_25_STABLE