MDL-32214 quiz regrading: with many attempts, PHP runs out of memory
MDL-31789: Allowing context object to be passed to JS using json_encode()

Classes with magic properties such as context do not pass through json_encode().
The solution is to implement iterator in such classes and convert what we
feed to json_encode to array using 'foreach' before we pass it to json_encode():
- class context implements IteratorAggregate
- added function convert_to_array() that converts anything to array
- before calling json_encode we convert the argument to array
Automatically generated installer lang files
Revert "MDL-31914 Ensure that completion criteria are deleted when removing a course module"

This reverts commit 3bf0bb64fd7696cb0d0f9b88de1dda632e122f3e.
Merge branch 'install_22_STABLE' of git://github.com/amosbot/moodle into MOODLE_22_STABLE
weekly release 2.2.2+
MDL-32220 question import: files sometimes stored in the wrong context.

Sadly, this involves a small API change, but I don't believe anyone was
using the argument I had to remove (because we were sometimes passing a
wrong value, and there is not way to compute the right value at that
point in the code.)

Also sadly, the code to compute the context we are importing into is now
rather spaghetti-like, but it works.

Conflicts:

	question/format/examview/format.php
	question/format/learnwise/format.php
	question/format/webct/format.php
MDL-32246 question export: should cope with unrecognised qtypes.

If a question is of an unrecognised type, then we just omit it from the export.
MDL-32239 question bank: wrong cap checks editing/viewing quesitions

None of these problems affect the default roles. They only occur when
the permissions have been edited to allow restricted subsets of the
question capabilities.

In some cases, things that the restriced subset of capabilities should
have allowed were blocked by errors. In other cases, users were allowed
to do more than they should bave been due to failures to check the
right capabilities in the right places.

For full details, see the bug report.

Two of the bugs were previously reported separately as MDL-26395 and
MDL-27232.
MDL-32240 quiz editing: check permissions questions are added.

We also check permissions when removing questions from the quiz, so that
we do not let users make mistakes they cannot immediately undo.

Conflicts:

	mod/quiz/editlib.php
MDL-32256 quiz_cron() now returns true as expected by the current API
MDL-32258 database module does not have any data_cron() function to execute
MDL-32201 question export: use qformat_xml::write_answer in base class

Without this, images in answers were not being written to the export
file for questions using extra_answer_fields.
MDL-32039 qeupgradehelper: fix typos in the lang strings
MDL-32264 theme_standard: Fixed multi-day calendar event border issue
MDL-32018 mod_wiki: Improved form definitions to ensure they consistent and secure
MDL-32018 mod_wiki: Fixed formatting of the page title so that is is consistent and secure
MDL-32018 mod_wiki: Fixed up whitespace after peer-review
MDL-31631 navigation: Removed caching of activities and sections arrays in favour of relying on cminfo caching
MDL-29678 navigation: Navigation AJAX require_login calls no longer set wantsurl or redirect