122 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
1093256560
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 12:18:04 +02:00
Jun Pataleta
8b976e77ce MDL-81616 upgrade: add the 4.4.0 separation line to all upgrade scripts 2024-04-23 15:24:02 +10:00
Jun Pataleta
a180dba314
MDL-81549 versions: bump all versions and requires near release 2024-04-17 00:03:29 +08:00
Paul Holden
011619dbd3
MDL-71734 lang: final removal of deprecated 400 strings. 2024-03-21 09:44:15 +00:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Sara Arjona
8cdd62ca88
MDL-78284 theme: Add new interactive content and update styles 2024-02-15 17:49:43 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
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