111 Commits

Author SHA1 Message Date
Andrew Nicols
82d7635d52
MDL-62859 block_timeline: Rewrite view navigation as ESM 2023-05-22 13:51:39 +01:00
Paul Holden
c5d1f72dca
MDL-62859 javascript: replace user preference calls with new methods. 2023-05-22 13:51:39 +01:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Jun Pataleta
97215704d3 MDL-77105 block_timeline: Add 'nofilter' class when necessary
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.
2023-03-27 13:54:36 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Paul Holden
75ab52d902 MDL-76878 user: amend permission callbacks for preference definitions.
Ensure those preferences that are used for storing state can always be
updated via web service requests for the current user.
2023-01-20 10:05:21 +00:00
David Woloszyn
6dc10b6241 MDL-76607 timeline: Reordered message to account for long course name 2023-01-05 12:11:42 +11:00
Jackson D'souza
771b587a54 MDL-75571 block_timeline: Display custom activity icon if available. 2022-12-09 15:53:23 +00:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Andrew Nicols
18a4241fee MDL-75962 js: Fix jsdoc violations 2022-10-12 10:06:40 +08:00
Eloy Lafuente (stronk7)
58b56e2395 MDL-71747 upgrade: remove all the < 3.9.0 upgrade steps
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
2022-07-07 19:16:37 +02:00
Huong Nguyen
e29cbbc715 MDL-73774 timeline: Prevent ID duplication 2022-06-07 11:47:49 +07:00
Huong Nguyen
4342e774d8 MDL-73654 timeline: Improve search for course name and activity name 2022-05-31 11:05:44 +07:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Andrew Nicols
fb0b57f4ab MDL-74506 block: Correct parentcontextid for blocks in dashboard 2022-04-16 17:49:18 +08:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Andrew Nicols
14dca23e1f MDL-74271 core: Replace upgrade steps for blocks to be more performant
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.
2022-04-06 23:40:15 +08:00
Víctor Déniz
7fbd4942a6 Merge branch 'MDL-73865-master' of https://github.com/rezaies/moodle 2022-03-15 15:13:48 +00:00
Sara Arjona
2d0675e986 Merge branch 'MDL-73979-master' of https://github.com/HuongNV13/moodle 2022-03-15 12:28:56 +01:00
Shamim Rezaie
bc52715d75 MDL-73865 blocks_timeline: Increase debounce wait to 1 second 2022-03-15 12:46:22 +11:00
Huong Nguyen
f136ae7149 MDL-73979 timeline: Views should display consistent information
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
2022-03-11 09:30:20 +07:00
Bas Brands
322f13207a MDL-73908 block_calendar_upcoming: new mod icons 2022-03-08 11:07:38 +01:00
Eloy Lafuente (stronk7)
9dde12dc99 Merge branch 'MDL-72092-master' of https://github.com/Chocolate-lightning/moodle 2022-03-01 14:55:02 +01:00
Peter Dias
a190e2defc MDL-72092 timeline: Change the default location for the block
Add/Change the default location of the block on /my pages
2022-03-01 19:13:20 +08:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
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.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
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.
2022-02-23 08:55:09 +08:00
Michael Hawkins
bd1b6b772c MDL-73613 block_timeline: Fix courses view where event due later today
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.
2022-02-21 14:51:41 +08:00
Michael Hawkins
22eacb1590 MDL-73068 timeline: Make dates view consistent where no courses enrolled
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.
2022-01-18 18:22:45 +08:00
Michael Hawkins
e01f2d514a MDL-73068 timeline: Update courses view to omit courses without events
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.
2022-01-18 18:22:45 +08:00
Sara Arjona
7e559628dc Merge branch 'MDL-72581-master' of https://github.com/junpataleta/moodle 2021-12-28 09:23:11 +01:00
Shamim Rezaie
dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Jun Pataleta
f3324d208b MDL-72581 block_timeline: Update with the new activity icons 2021-12-21 18:04:25 +08:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
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.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
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.
2021-12-17 14:21:02 +01:00
Huong Nguyen
1f6a45ba21 MDL-72650 Blocks: Use search_input_auto for Course overview and Timeline 2021-12-06 10:49:48 +07:00
Sara Arjona
bc93e8438d Merge branch 'MDL-72790-master-3' of git://github.com/mickhawkins/moodle 2021-11-29 12:07:56 +01:00
Michael Hawkins
c18fe5ecf6 MDL-72790 block_timeline: Set content width consistent with other blocks
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.
2021-11-24 14:09:57 +08:00
Michael Hawkins
873262bbaa MDL-72790 block_timeline: Ensure overdue badge visible at all widths
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.
2021-11-24 14:09:57 +08:00
Huong Nguyen
1a75b75b52 MDL-72790 block_timeline: Fix button layout and row wrapping on mobile
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>
2021-11-24 14:09:57 +08:00
Michael Hawkins
921eb5ce0e MDL-72790 block_timeline: Improve padding and background in Classic
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).
2021-11-24 14:09:50 +08:00
Huong Nguyen
f1c0c2905d MDL-72893 Behat: Fix Behat failures for Timeline block 2021-11-22 11:50:25 +07:00
Sara Arjona
dc0e7a45df Merge branch 'MDL-70721-master' of git://github.com/rezaies/moodle 2021-11-18 15:18:51 +01:00
Shamim Rezaie
652392d932 MDL-70721 output: remove {{#quote}} wherever it was misused
Also use the new {{#cleanstr}} helper where it was more appropriate
than the {{#str} helper.
2021-11-16 10:08:06 +11:00
Huong Nguyen
c2979ff1cc MDL-72603 timeline: Lazy loading for timeline block
Replace timeline block pagination with "Show more activities" lazy loading
2021-10-28 09:12:14 +07:00
Ilya Tregubov
584bc8cf7e MDL-72878 behat: Fix behat failing in chrome.
Element is on edge of browser. Changing window size.
2021-10-21 14:59:20 +02:00