MDL-40343 forum: indent less when mobile, nested

Changes the indenting of forum replies to be relative to the width of
the parent container, so the indent decreases as threads get nested
deeper. Also reduces the indent size automatically for smaller screen
sizes.
MDL-46219 assignment: delete files when resetting assign activities
MDL-45636 course_rest: changed modcontext to coursecontext
MDL-46088 Impossible to click on Atto in a Quiz in 'Secure' mode.
MDL-46088 Quiz: Prevent alert when clicking in editor in secure popup
MDL-46088 quiz secure window: further Atto JS fixes.
MDL-47183: viewhiddenactivities should use the module context

Thanks to Paulo Matos for the forum part of this change.
MDL-46712: Center EditPDF window on browser resize / zoom
MDL-47569 backup: Escape section summary for XML

This was causing the parsing of the XML
to fail because things like & were not
escaped.
MDL-47569 backup: Do not close questions tag if never opened

This can happen when restoring quizzes that
do not have any questions.
MDL-47555 core_availability: Issue with page layout & grade restriction

* Set pagelayout before getting section info, otherwise conditional activity renderers will default to the default 'base' layout.
MDL-33939 gradingform_guide: use correct max grade for scales.
MDL-47499 tasks: Scheduled tasks custom schedule is reset on upgrade.

Add a unit test for reset_scheduled_tasks_for_component and make sure it doesn't clear
customised schedules for existing tasks.
MDL-47632 calendar: Fixed iCal link going blue after visiting it
MDL-30358 forms: strict validation is too strict
MDL-47704 Grades: Fix for set_usedinaggregation

Used in aggregation was not resetting previously set values
when recalculating an aggregation. This meant that items no longer
in the aggregation, were displayed with stale weights in the user report.
MDL-36987 auth_manual: fix config for field locking

Thanks to Sergey for the patch
MDL-47738 gradereport_history: User selector handles broke with 0 user

It was impossible to reopen the dialogue when the last search result
did not return any user.
MDL-29873 Lesson: Essays not shown on grade page with SQL server
MDL-47684 mod: better validation of rating options