The widgetbase module was intended to be a generic search widget,
despite its location in grade/amd/src. As such, other modules may
depend on this. This was modified in MDL-76246, which added new
requires params to the js, and changed the js to expect certain new
data attributes in the templates. This broke b/c for existing
dependents.
This patch makes sure the existing uses of the basewidget continue
to work by adding b/c code. See MDL-77991 which deals with deprecating
this search widget and replacing it with one that just implements the
desired combobox logic, without the b/c code. That issue should also
make it abundantly clear that this widget is for public consumption.
When we deprecate the use of a file, we often include tests which ensure
that the legacy behaviour is maintained. There are also legacy uses
in the community where people would like to use the deprecated API for a
period.
The issue that we face is that, if the deprecated file is included once,
then it will be included for all other, unrelated, tests. This means
that other tests may not detect cases where the deprecated file was
included.
We can solve these cases by running the test that performs the inclusion
in a deprecated process. This means that the inclusion is only performed
in that isolated process, and other unrelated tests do not include the
file.
However, we also then need to detect which files which are including the
file and which we do not know about.
This change introduces:
- an override to the TestCase::setInIsolation method to define a
constant when the test is running in isolation
- a new function that a file can call when it is included, to make sure
that the test process was isolated, where there is any test.
Move the fixed assignment removal upgrade code to the end of the upgrade
script as a new upgrade step. Already upgraded sites with mod_assignment
removed should just be able to rerun this without any issues.
When an editor is renderer initially invisible to the browser, e.g.
the forum "Add discussion" form, it has a `clientHeight` value of
zero. We can approximate an alternative value based on the number
of rows in the textarea.
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>