PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.
Credit to Rajesh Taneja.
* Refactor the block generator base class, to remove the amount
of duplication required in base classes.
* Change the defaults that are filled in to be a little more natural.
* Make the Behat step 'Given the following "block" exist:' work.
In MDL-50891, the is_web_crawler() was refactored into a core_useragent
method and the function itself was deprecated. However, there were no
unit tests kept to check the backwards compatible behaviour. It turned
out that the deprecated function leads to PHP fatal error due to a typo.
This patch fixes the typo and brings back the previous unit tests. To be
able to explicitly check the raised debugging message, the test case
now must be subclass of advanced_testcase.
Additionally fixes missing info about the function being deprecated.
The problem with the previous implementation was that the table's
$this->prefs can contain valid non-empty value in its default state -
the default column to sort by. On resetting, we must not throw away
these default prefs.
This patch simplifies the TABLE_VAR_RESET interpretation. If such an
HTTP parameter is passed via the request, the table simply behaves as if
there were no previously stored preferences (does not matter if coming
from the current session, or from the persistent cross-session storage).
The logic that decides on whether or not the reset widget should be
displayed is put into a new method can_be_reset() with unit tests
attached.
Finally, the previously private method render_reset_button() is now
protected and the reset widget is given a new semantic CSS class.
This patch replaces backslash characters in the generated jQuery
plugin URL to forward slashes when slasharguments is disabled and
the Moodle server is running on IIS.
Thanks to Ryan Panning <Ryan.Panning@district196.org> for
reporting this issue and for suggesting a fix.
Norfolk Island's standard time (NFT) was on UTC+11:30 until 4 October
2015, when it was changed to UTC+11:00. So it's not suitable for 11.5
bad mapping replacement anymore.
It seems that there isn't any other location using such 11.5 timezone
so completely getting rid of it for conversions.
The benefit is that this becomes one test per external function instead of one
test testing them all - so more information is shown on failure and we get lots
more dots (we love dots!).
Optional params are not allowed as the top level value for external_function_parameters.
This is because stricter protocols (xmlrpc and soap) cannot handle optional parameters, only
optional properties in a structure.
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.
The method move_plugin_directory() was a relict from previous 2.9
implementation within tool_installadon_installer and was originally
supposed to be used to move whole plugin folders. The archiving feature
has been finally implemented via using zip files (so that we do not have
actual PHP code present in the dataroot) and we do not need this method.
This should allow the admin to revert the upgrade of existing plugins,
such when the dependency chain leads to a dead-end. Additionally, we
archive (as a last-chance copy) the to-be-installed plugins when
cancelling their installation. This is mainly for developers who could
otherwise loose their code. For the same reason, plugins are being
archived upon uninstallation, too.