MDL-27459 Completion: When ratings off, disallow grade completion

For activities that use ratings, there is no grade unless ratings
are enabled. The completion system still lets you select 'complete
when user gets a grade', which leads to later errors.

This change simply disables the 'completion on grade' field if
ratings are enabled for the activity, but not turned on in the form.
MDL-45256 portfolio: Unit tests for rewrite pluginfile urls
MDL-45256 portfolio: Do not require strict XML when parsing content
MDL-45273 quiz: move admin settings into classes folder.
MDL-45273 remove the need for quiz settings.php to include locallib.php.
MDL-45273 only create the quiz settings if necessary.
MDL-45321 quiz upgrade: make it more tolerant to old bad data.
MDL-45273 quiz: Fix codechecker issues.
NOBUG: Fixed file access permissions
on-demand release 2.7beta+
MDL-45221 Allow unit tests to pass under any OS

This commit gets rid of the old lib/tests/other/executable.php
file completely because it was only executable under unix OSs
and moves the check to be performed against some mimetex binaries
that are known to be executable and bundled with every installation.

Note this was discovered because the weekly rolling process changed
the execution permissions of the "fixture" file and, at the end
we decided to get rid of it completely, folowing the plan above.
MDL-44780 filter_mathjaxloader: switched mathjax filter on by default
MDL-44780 filter_mathjaxloader: mathjax is now at the top of the filter list
MDL-42635 lesson: Fixed error message
Merge branch 'MDL-45315-master' of git://github.com/danpoltawski/moodle
Merge branch 'MDL-27459-master' of git://github.com/sammarshallou/moodle
Merge branch 'MDL-45257-master-2nd' of git://github.com/FMCorz/moodle
MDL-43557 events: removed underscores from event string keys

AMOS START
 MOV [event_legacy_logged, logstore_legacy],[eventlegacylogged,logstore_legacy]
 MOV [event_cohort_created,cohort],[eventcohortcreated,cohort]
 MOV [event_cohort_deleted,cohort],[eventcohortdeleted,cohort]
 MOV [event_cohort_member_added,cohort],[eventcohortmemberadded,cohort]
 MOV [event_cohort_member_removed,cohort],[eventcohortmemberremoved,cohort]
 MOV [event_cohort_updated,cohort],[eventcohortupdated,cohort]
 MOV [event_group_created,group],[eventgroupcreated,group]
 MOV [event_group_deleted,group],[eventgroupdeleted,group]
 MOV [event_group_member_added,group],[eventgroupmemberadded,group]
 MOV [event_group_member_removed,group],[eventgroupmemberremoved,group]
 MOV [event_group_updated,group],[eventgroupupdated,group]
 MOV [event_grouping_created,group],[eventgroupingcreated,group]
 MOV [event_grouping_deleted,group],[eventgroupingdeleted,group]
 MOV [event_grouping_updated,group],[eventgroupingupdated,group]
 MOV [event_webservice_function_called,webservice],[eventwebservicefunctioncalled,webservice]
 MOV [event_webservice_login_failed,webservice],[eventwebserviceloginfailed,webservice]
 MOV [event_webservice_service_created,webservice],[eventwebserviceservicecreated,webservice]
 MOV [event_webservice_service_deleted,webservice],[eventwebserviceservicedeleted,webservice]
 MOV [event_webservice_service_updated,webservice],[eventwebserviceserviceupdated,webservice]
 MOV [event_webservice_service_user_added,webservice],[eventwebserviceserviceuseradded,webservice]
 MOV [event_webservice_service_user_removed,webservice],[eventwebserviceserviceuserremoved,webservice]
 MOV [event_webservice_token_created,webservice],[eventwebservicetokencreated,webservice]
 MOV [event_webservice_token_sent,webservice],[eventwebservicetokensent,webservice]
 MOV [event_user_loggedin,auth],[eventuserloggedin,auth]
 MOV [event_assessable_uploaded,assignsubmission_file],[eventassessableuploaded,assignsubmission_file]
 MOV [event_assessable_uploaded,assignsubmission_onlinetext],[eventassessableuploaded,assignsubmission_onlinetext]
 MOV [event_chapter_created,mod_book],[eventchaptercreated,mod_book]
 MOV [event_chapter_deleted,mod_book],[eventchapterdeleted,mod_book]
 MOV [event_chapter_updated,mod_book],[eventchapterupdated,mod_book]
 MOV [event_chapter_viewed,mod_book],[eventchapterviewed,mod_book]
 MOV [event_book_exported,booktool_exportimscp],[eventbookexported,booktool_exportimscp]
 MOV [event_book_printed,booktool_print],[eventbookprinted,booktool_print]
 MOV [event_chapter_printed,booktool_print],[eventchapterprinted,booktool_print]
 MOV [event_message_sent,mod_chat],[eventmessagesent,mod_chat]
 MOV [event_sessions_viewed,mod_chat],[eventsessionsviewed,mod_chat]
 MOV [event_answer_created,mod_choice],[eventanswercreated,mod_choice]
 MOV [event_answer_updated,mod_choice],[eventanswerupdated,mod_choice]
 MOV [event_report_viewed,mod_choice],[eventreportviewed,mod_choice]
 MOV [event_assessable_uploaded,mod_forum],[eventassessableuploaded,mod_forum]
 MOV [event_assessable_uploaded,mod_workshop],[eventassessableuploaded,mod_workshop]
AMOS END
MDL-43557 events: renamed event class names

1) The core 'item_tagged' class was renamed to 'tag_added'.
2) The core 'item_untagged' class was renamed to 'tag_removed'.
3) The core 'message_read' class was renamed to 'message_viewed'.
4) The mod_forum 'userreport_viewed' class was renamed to 'user_report_viewed'.
5) The report_outline 'activity_viewed' was renamed to 'activity_report_viewed'.
6) The report_outline 'outline_viewed' was renamed to 'report_viewed'.
MDL-43557 mod_lesson: removed incorrect usage of snapshots