Add the `.nofilter` class for activity icons when the icon URL's
`filtericon` parameter is not set, so they get rendered as they are on
the timeline block.
This just deletes all the upgrade steps previous to 3.9.0. Some
small adjustments, like tweaking globals can also be applied
when needed.
Also includes an upgrade step to prevent upgrading from any
version < 2020061500 (v3.9.0) as anti-cheating measure.
The next commits will proceed to deprecate / remove functions
that were exclusively (usually belonging to upgradelib) being
used by those, now removed, upgrade steps. This is the list
of code to remove and document in upgrade.txt files:
- upgrade_analytics_fix_contextids_defaults()
- upgrade_convert_hub_config_site_param_names()
- upgrade_rename_prediction_actions_useful_incorrectly_flagged()
- \mod_forum\task\refresh_forum_post_counts adhoc task.
And these is the code that has NOT been removed
because it may be needed later (no matter there aren't uses now):
- \core_search\manager::clean_up_non_existing_area(), used by
- \core\task\clean_up_deleted_search_area_task adhoc task
The previous upgrade step was both duplicating a lot of code, and also
very non-performant as each record was fetched from the DB into PHP and
updated there.
Most of the operations can be performed straight into the database
without requiring any fetch to PHP at all.
This change includes unit tests for the new upgrade steps to ensure that
only the relevant data is created, updated, or deleted.
The course view is updated to display the events that match
the filter condition, no matter the course start date is in the future
or the course end date is in the past
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.
If a course only had events due later in the current day when filtering
by overdue, it was possible we would show a course name with nothing
below it, because we fetched all events to the end of the day. This fix
means we only load courses with events due before the current time and
avoid the issue.
Updating the dates view of the block so it shows the same message as
courses view if the user is not enrolled in any courses. The block also
no longer tries to fetch any content in this case, since we know they
have no courses to fetch events from.
Previously, the timeline block courses view included all courses in
alphabetical order, whether they contained any events matching the
relevant filters or not. This could be tedious and misleading if there
were many courses with no events appearing before a course which did
have matching events. Now, courses are only included if they contain
events matching the currently set time filter and search term. When
those values are modified, the block will be refreshed and fetch
results for the current values, and also takes these into
consideration when determining whether to display the show more courses
button.
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)
Also, change some relative paths and comments to point to new
locations.
All privacy_test and privacy_provider_test classes:
- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
Previously the margins were set with the container class, which meant
the content was narrower than other blocks. This does not need to be
managed by the block since the dashboard will soon manage this with
its own max width.
This ensures on narrower screens, the activity title still truncates
but the overdue pill always remains visible where present. There is no
visual change where an item is not overdue, or on wider screens where
there is room to display the full content.
This ensures all row content wraps nicely on smaller screen sizes, and
forces all action buttons to be displayed in a consistent position
indepdendent of the length of the activity name etc. Buttons are also
now aligned under the text on small screens, to maximise space for the
text content.
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
This ensures in the Classic theme that some padding is appled to both
sides of each item, so titles and action buttons are not flush against
the margin. Dropdowns/inputs in the block are also aligned to this
content, so everything aligns in both Boost and Classic.
This commit also groups related elements with a solid background colour
(eg within the same course in courses view), rather than having
individual row items broken up, to improve readability (and look nicer).