MDL-44630: Several additions to Common Cartridge Import/Export

Changes provided by Darko Miletic and Sam Chaffee.

* Fix problem with CC import not detecting a CC package. (Sam)
* Fixed Common Cartridge not importing FIB answers. (Sam)
* Fix to CC export so that short answer pattern matching question
  in a quiz does not prevent the entire quiz from exporting. (Sam)
* Fix notice about missing index when there is no answer-specific
  feedback in short answer question during CC export. (Sam)
* Fixed Japanese characters being incorrectly encoded (garbled)
  on Common Cartridge import. (Sam)
* Changed import of CC discussions to create 'Standard General'
  forums in Moodle. (Sam)
* Fix problem with question name being replaced with question
  text on CC import of exported Moodle questions. (Sam)
* Fix CC 1.1 multiple choice question import having no correct
  answers. (Sam)
* Fixed problem with multiple choice, multiple answers allowed
  questions not exporting correct answers to CC. (Sam)
* Removed duplicate method. (Darko)
* Implemented fix that skips quiz export if it contains
  non-exportable question. (Darko)
* Fixed: Common cartridge export is extremely slow when dealing
  with lot of more than 200 files. (Darko)
* Added support for basic roles support in common cartridge. (Darko)
* Implemented folder resource export. (Darko)
* Minor fixes to adjust to the standard. (Darko)
* Added support for exporting simple fill in the blank
  (shortanswer without wildcards in Moodle). (Darko)
* Added support for exporting essay question. (Darko)
* Added support for true/false export. (Darko)
* Added support for exporting multiple response questions,
  added also category information into question metadata
  during export (Darko)
* Added support for correctly importing multiple response
  questions. (Darko)
MDL-44575: Prevent cron from sending feedback notifications when assignments are hidden in the gradebook
MDL-44630: Review changes

* Fixing coding style violations.
* Fixing DOMDocument warning.
MDL-45212 scorm: Disable sorting on unsortable columns in SCORM reports
MDL-45239 editor_atto: The editor cannot be active if it is not the active element

FireFox thinks that you can have an active selection on an element which
currently does not have focus. How this can be the case is a mystery.
MDL-45254 atto_equation: Allow insertion of macros at the beginning of words
MDL-44398 tags: Fix incorrect usage of caps
MDL-45257 mod_assign: Removing wonky feedback_updated event
MDL-45258 tags:context object/0 should not be passed to tag_set()
MDL-42956 auth: Fix hard-coded LIMIT clause on keepalive_client method.
MDL-45298 theme: More permissive usage of retired themes settings
MDL-45292 filepicker: fixed border style

Fixed base style issues on RTL.
MDL-45315 block_news_items: Add missing depedency
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.