MDL-35530 Lesson Module: Add question text to facilitate grading
MDL-29733 grade: Query for Identifying Grade Grades to Precreate is SLOW
MDL-29733 grade: SQL and comment cleanup
MDL-36162 core_message: removed the unnecessary and confusing course URL parameter as well as fixing the broken breadcrumb
MDL-36238 Blocks: Logs page close session write, so editing is set before
MDL-34695 wiki: ensure the correct individual subwiki is used/created for a user
MDL-34695 Wiki Module: add prevention to create new record when userid is 0
MDL-36025 qtype calculated: Fix handling of "-0"
MDL-36336: Prevent duplicate grade items on restore

During restore, lti_add_instance() was being called
and this could generate a grade item.  This would
produce a duplicate item because the restore
process would automatically generate the grade item.
MDL-36640 Logging: Correct testing of log->info.

log->info sometimes contains additional information which can be looked up
from other tables. This should only be attempted if the field is numeric,
but the CSV, XLS, and ODS outputs were not making this check.

There is an additional case for the print_mnet_log function which has not
been covered - this is because the mnet logging is currently broken beyond
the scope of this bug rendering this section untestable. These issues are
raised in MDL-36642.
MDL-36609 javascript: ensure HTML element exists before attempting to perform JS functionality
MDL-36305 theme: Forum reply button is not removed using MyMobile
MDL-36551 - mod_data: Onsite presets now retain the advanced search template.

Presets that were saved to the site would lose the advanced search template when being used.
The previous check was put in place to see if the advanced search template existed or not (presets pre 1.9),
This checked external files properly but not onsite files.

Now checks are being done on both internal and external preset files.
MDL-36760 formslib: fix frozen elements with [] in name.

This was a regression caused by MDL-30845 or, to be precise, the related
issue MDL-32785.

Form elements with names like multipier[0] require special handling,
such as is present in HTML_QuickForm_element::_prepareValue. I have
added equivalent handling to MoodleQuickForm::exportValues. I am afraid
that I could not think of a way to do this reliably without duplicating
code.
MDL-36806 question files: fix unnecessary require_login call.

quiz_question_pluginfile later does the correct check. Doing this
other check first means you get an error about changing $PAGE->context.
Merge branch 'wip-MDL-36551-MOODLE_22_STABLE' of git://github.com/abgreeve/moodle into MOODLE_22_STABLE
Merge branch 'MDL-36609_m22' of git://github.com/markn86/moodle into MOODLE_22_STABLE
MDL-33125: core_backup: Prevent import/activity duplication from duplicating manual grade items
MDL-36795 - lib / administration: maxsections now limits the default setting for numsections.

In the default course settings, setting the maximum number topics / weeks  to 0 would not
change the default number of sections on the same page as any other number would.
A more appropriate check has been put in place.

This also incorporates a fix for MDL-28584. The course edit screen now also checks to see
if maxsections is set or numeric. If it is not set or numeric then it defaults to 52.
MDL-27619: Prevent teachers from turning course Outcomes into site-wide ones

Similar to the issue which allowed teachers to create site-wide scales by editing a course-specific scale (MDL-24682), teachers could also promote a course-specific scale to a site-wide (standard) by editing it.  As with MDL-24682, removing the course ID check (leaving just the capability check) prevents this unauthorised creation of site-wide (standard) outcomes.