The course navigation was getting duplicate nodes because
it was loading the nav tree plugin functions twice. Once
specifically for the reports and then a second time more generally.
The code will now explicitly skip loading the report plugin
functions on the second load.
The upgraded version of HTML2Text highlighted some bugs in our unit tests.
In the IOS test, the HTML content includes a couple of patches of
In the previous version of HTML2Text, these were being converted to
breaking spaces. In one of these cases, it was then removed due to a trim.
The expected texts have been converted to use the correct non-breaking spaces.
In the case of the trimmed one, it is no longer trimmed as non-breaking
spaces are not trimmed.
This gives a truer reflection of the actual text.
In the case of the Outlook test, this trailing whitespace is not present in
the source. It was likely caused by a bug in the previous version of
HTML2Text.
In the case of the weblib change, the test was just wrong. Both of the
actual characters are encodings for an HTML bullet (decimal and hex) and
should both be converted to the relevant UTF8 representation of this
bullet.
We were previously using an ancient version of html2text from RoundCube
with many customisations.
This patchset moves to the version included in the latest version of
HTML2Text, and wraps the library in a moodle-provided class. This
moves all previous hacks away from that class.
Unfortunately, two hacks still remain - two of the functions in the
RoundCube class are private, and must be modified to protected in order to
use the class effectively.
This commit covers all events outside of /mod/. It adds mapping info for restoring
events, or the default implementation which returns false if mapping is not required.
Do not attempt to read an unreadable directory because previously the generated
errors were hard to fathom.
Thanks to James McQuillan for the basis of the patch.
When you add a module or otherwise cause a Moodle dialogue to appear, this
enables the 'lock scroll' feature (the scrollbar disappears).
On some browsers this causes the width of the viewport to change, which can
cause centered/right-aligned theme elements to move distractingly.
This change temporarily sets body max-width while lock scroll is active.