MDL-40515: report_log: List activities in optgroups

Prevents users from generating reports on invalid values

Change-Id: If358fa06c8dadd33bb2875ea54ab4bce97b16aff
MDL-39489 behat: Updating to 2.6 moodlehq/behat-extension tag

Also solving new problem after Behat
2.5 upgrade.
MDL-42111 TinyMCE media preview: fix video preview display for TinyMCE media.

Effected themes: boxxie, clean, brick, formal_white and splash.
MDL-38664 Lesson mod: fixed re-attempt unseen page
MDL-38664 Lesson mod: code improvement for lesson re-attempt page
MDL-42453 theme_base: Fixed Error in base/style/admin.css that breaks CSS validator.
MDL-42464 mod_chat: Correct use of encoded & in link
MDL-42476 report_progress: don't browser sniff for SVG support

Use feature detection, its more robust and better practice.
MDL-42355 assignfeedback_editpdf - do not start a new comment immediately when deselecting the old comment
MDL-42494 Fix workshop coding exception if all assessments have zero weight

If all assessments for the given submission have zero weight, the grading
evaluation plugin "Comparison with the best assessment" is unable to decide on
the average assessment as it ignores those with zero weight. In such rare case,
it makes sense to set the grading grade to null and prevent the coding
exception.
MDL-42402 EditPDF: CSS Improvements for editing toolbar.

The main change here is to prevent the default rendering of a select list for the page
selector, so that it looks more consistent with the rest of the toolbar on different
browsers/os combinations.

This is done with some vendor specific css rules targeting webkit, mozilla and ie.

There are also some minor tweaks to vertically align the images in the buttons and reduce the padding
above and below the toolbar.
MDL-42533 conditionlib: Field name is translated for students
MDL-42270 course: Section name too big message.
MDL-34654 Glossary: ampersand breaks auto-linking
MDL-42548 quiz review: don't show grade for non-finished attempts.

Now we show the attempt state separately, so there is no need to show
Grade: Attempt still in progress - especially since we were showing that
for abandoned and overdue attempts which is just wrong.
MDL-42400 modlib: include module file when it's used

- changed the place where module file is included to make sure that add_moduleinfo() can be called independently from create_module()
- removed permission check from add_moduleinfo() because this function is not supposed to check permissions. Besides it's only half-check. See can_add_moduleinfo()
- added phpdocs to some functions to indicate that they can throw an exception
MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts
MDL-42400 generator: Add function testing_module_generator::create_content()

also implement it for mod_book and mod_forum to call existing create_page, create_discussion/post functions
MDL-42400 tool_generator: save db query in module generation
MDL-42400 modlib: speed up add_moduleinfo, remove unnecessary queries

removed code that was causing unnecessary DB queries, this significantly speeds up data generators