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-44630: Review changes

* Fixing coding style violations.
* Fixing DOMDocument warning.
MDL-45212 scorm: Disable sorting on unsortable columns in SCORM reports
MDL-44902: Several additions to External Tool (LTI)

* LTI service related changes:
** Fixing exceptions in OAuth library.
** Added new launch option, Existing window: replaces entire page with the LTI object.
** The LTI tool ID used to perform the launch is now sent with the LTI launch parameters.  This is sent back to Moodle on subsequent requests.
** Added $CFG->mod_lti_forcessl to force SSL on all LTI launches.
** Added new LTI launch parameter: tool_consumer_instance_name.  Default value is site full name, but can be customized with $CFG->mod_lti_institution_name.
** The LTI grade service endpoints now set the affected user to the session.  This was required for event listeners.
** Fix the grade deletion service.  Was deleting the grade item instead of just the grade.
** Send error response when LTI instance does not accept grades and grades are being sent.
** Added a method for writing incoming LTI requests to disk for debugging.  Disabled by default.
* Changes for ltisource plugins:
** Can now to plug into backup/restore.
** Can now have settings.php files.
** Can now hook into the LTI launch and edit parameters.
* Several grade changes:
** Added standard_grading_coursemodule_elements to LTI instance edit form.  This means LTI instances can be configured with a grade.
** No longer assumes that grade is out of 100.
** Replaced modl/lti:grade capability with mod/lti:view.
* JS on mod/lti/view.php for resizing the content object has been converted to YUI3.
* Fixed misspellings in language file.
* Added hooks for log post and view actions.
* Bug fix for lti_get_url_thumbprint() when the URL is missing a schema.
MDL-44902: Deprecating mod/lti/grade.php
MDL-44902: Bumping mod/lti version number

This bump is to update the site with changes
to the db/access.php file.
MDL-45373 quiz response analysis : count all tries at question

don't filter repeated tries.
MDL-44630: Fix CC backup of quizzes

The common cartridge backup was skipping
quizzes because the <questions> element
is no longer in the Moodle backup file.
Instead, now reading from the list of
<question_instances> list.
MDL-43312 TinyMCE: Version bump to 3.5.10. Remove all the hacks.

I retested the old bugs that required custom hacks to tinymce and could not reproduce them,
so I have not reimplemented the hacks.
MDL-23566 mod_lesson: Float answers so paragraphs line up correctly next to the inputs
MDL-45425 editor_atto: Check for change selections asynchronously
MDL-45398 Manage availability restrictions: Show/hide not working

The show/hide icons were not working correctly. In addition, the
report still displayed even when availability feature was turned
off.

As well as fixing them, I added a Behat test to cover this report.
MDL-45447 editor_atto: Highlight collapse and html icons when toggled
MDL-45432 mod_assign Declare character encoding in onlinetext export

Signed-off-by: Tony Butler <tonyjbutler@gmail.com>
MDL-44630: Fixing PHP foreach warnings
MDL-45461 behat: Added custom hack notice for chrome+safari+ie
Merge branch 'MDL-43312-master' of git://github.com/damyon/moodle
MDL-43312 tinymce: bump plugin version
Merge branch 'MDL-45425-master' of git://github.com/andrewnicols/moodle
MDL-45462 flickr: Requests are now done over HTTPS