These templates are needed by plugins which use the now-deprecated
searchwidget (located in grade/amd/src/searchwidget/basewidget.js)
in order to keep that deprecated widget working during the deprecation
time period. This also clarifies the js deprecation notice.
In this commit, the front-end experience for grade item weights in the
gradebook setup page is refined, building upon the improvements made in
the previous commit.
Firstly, overridden weights are excluded from automatic adjustments.
This enhancement guarantees that user-specified weights remain unchanged
by front-end calculations, thereby preserving the flexibility of custom
weight assignments.
Additionally, front-end form validation has been introduced to enhance
the user experience. Now, users will see validation errors if they
submit invalid values, giving them the opportunity to correct the values
themselves. This ensures that weights are not automatically normalised
by the back-end code, preserving the values as entered by the user.
This change enhances the user experience in the grade report grader by
moving grade item weight calculations to the front-end. Previously,
these calculations were done on form submission, resulting in slower
performance and less interactivity.
With this improvement, grade item weights are now calculated dynamically
in the browser as users make changes, providing instant feedback and a
more responsive interface. This change improves the usability and
efficiency of the grade report grader.
This is only applicable to natural aggregation type.
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.
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.
This is the first step taken to actively drop support for IE.
This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).
This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.
Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.
Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.
The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.
Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.