1868 Commits

Author SHA1 Message Date
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
46eb8da969 Merge branch 'MDL-69643' of https://github.com/paulholden/moodle 2023-01-19 09:05:46 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
af8da7c737 MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:37 +00:00
Paul Holden
0e742a2fc9 MDL-69643 message: final removal of deprecated 310 methods. 2023-01-06 09:28:40 +00:00
Ilya Tregubov
05535e38df Merge branch 'MDL-76497-master' of https://github.com/junpataleta/moodle 2022-12-01 08:56:09 +03:00
Andrew Nicols
0646f7ea5a Merge branch 'MDL-76183-master' of https://github.com/davewoloszyn/moodle 2022-12-01 08:55:34 +03:00
David Woloszyn
126028cc76 MDL-76183 lib: Update Github URLs 2022-11-30 14:01:31 +11:00
Andrew Nicols
ab44f00548 Merge branch 'MDL-76058-master' of https://github.com/lameze/moodle 2022-11-29 15:36:55 +08: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
Simey Lameze
ff4292501c MDL-76058 behat: send message using data generator 2022-11-09 09:50:06 +08:00
Mihail Geshoski
ee2d1f806d MDL-75513 message: Enable optional text display in the contact toggle 2022-11-02 17:45:52 +08:00
Andrew Nicols
dc50ea7d3a MDL-75936 core_message: Migrate message_drawer_helper to ESM 2022-10-24 14:29:32 +08:00
Andrew Nicols
723d450c8c MDL-75936 core_message: Drawer must be ready before firing drawer events
This commit addresses a race condition when showing the message drawer
and opening the settings page from the Message preferences page.

In that situation, the message/edit.php page calls the
message_drawer_helper.showSettings function, which publishes a request
to show the drawer.

In some conditions (notably faster machines, or after MDL-66107) this
event is fired before the message_drawer.init has listened to it.

The solution here is to delay firing of the event until the drawer
announces itself as ready.

This ensures that the event is subscribed to before it is fired.
2022-10-24 14:29:32 +08:00
Neill Magill
8029023ed5 MDL-66955 messages: Improve speed of message search
The OR conditions in the WHERE clause prevented the query from
effectively filtering the messages related to the user quickly, this
change helps gets around this by allowing the database to limit
the rows in the messages table it needs to scan significantly.
2022-09-30 08:29:08 +01:00
Sara Arjona
eef0a430be Merge branch 'MDL-75548' of https://github.com/timhunt/moodle 2022-09-05 13:09:09 +02:00
Sara Arjona
8cbc603ec9 Merge branch 'MDL-74873-master' of https://github.com/dthies/moodle 2022-08-30 16:10:08 +02:00
Tim Hunt
797b9fbd62 MDL-75548 misc: final Required parameter follows optional notices 2022-08-22 15:20:13 +01:00
Daniel Thies
9a349468cc MDL-74873 core_message: Disable notification preferences controls 2022-08-11 12:32:45 -05:00
Ferran Recio
2493b4f01a MDL-74800 message: fix invalid aria-label attributes 2022-08-08 14:46:42 +02:00
Jun Pataleta
3c6fdb1993 Merge branch 'MDL-71062-master' of https://github.com/sharidas/moodle 2022-07-13 11:39:08 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Jun Pataleta
c09f96c8ef Merge branch 'MDL-67347-master' of https://github.com/mihailges/moodle 2022-07-12 17:17:08 +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
Alfonso Salces
db7178edca MDL-74674 core: create notification generators 2022-06-29 10:31:40 +02:00
Neill Magill
6fb4a3b56e MDL-72948 messaging: Minimise fields used in query
Most of the fields in the query are not needed and are discarded
soon after visibility checks are made.
2022-06-22 10:11:18 +01:00
Mihail Geshoski
4ef7fc3895 MDL-67347 lang: Final removal of deprecated strings in 3.9 2022-06-15 16:46:16 +08:00
Paul Holden
28e95ef63c MDL-71276 message_email: include alternate email in privacy export. 2022-05-16 09:41:32 +01:00
Eloy Lafuente (stronk7)
caf55abf17 MDL-74413 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Moved to the level2 "privacy" namespace:
  - \mod_assign\privacy\feedback_legacy_polyfill_test
  - \mod_assign\privacy\submission_legacy_polyfill_test

- Moved to the level2 "task" namespace:
  - \core_message\task\migrate_message_data_test
  - \ltiservice_gradebookservices\task\cleanup_test
  - \message_email\task\send_email_test
  - \mod_lti\task\clean_access_tokens_test
  - \mod_workshop\task\cron_task_test

- Moved to the level2 "event" namespace:
  - \core_h5p\event\deleted_test
  - \core_h5p\event\viewed_test

- Renamed to a better name:
  - backup_forum_activity_task_test.php (missing "task")
2022-05-07 20:32:30 +02: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
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +08:00
Frédéric Massart
bee1bb317e MDL-74169 core_message: Hide preferences link when permissions lacking 2022-03-21 18:37:45 +08:00
Jun Pataleta
a1b520e38c Merge branch 'MDL-73895' of https://github.com/paulholden/moodle 2022-03-11 11:17:28 +08:00
Eloy Lafuente (stronk7)
dd24a77b01 Merge branch 'MDL-73917-master' of https://github.com/sarjona/moodle 2022-02-27 22:38:32 +01:00
Sara Arjona
d4ebb3988a MDL-73917 message: Remove labels from notification preferences
In MDL-67853, the "Enabled" label was added to all the toggle switches in the
user notification preferences page. This string is confusing, so this issue
is to remove it (and leave it as it was in 3.11).

Apart from that, following Helen's suggestion, I've renamed "Disallowed" to
"Locked off" and "Locked" to "Locked on", in order to help users to understand
better their meaning.
2022-02-23 17:42:48 +01: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
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Paul Holden
44ce37902d MDL-73895 message: hide empty component notification categories.
If a component has no available notification types (because they're
disabled), then it (the component) should be hidden entirely from
the user notification preferences page.
2022-02-16 10:31:07 +00:00
Eloy Lafuente (stronk7)
3bb4a4009c MDL-73764 tool_xmldb: Regenerate all the files detected by the report
Note that, instead of going one by one to them from the XMLDB Editor
(load, makes some tiny change, save, revert the change, save), the
report includes a commented line that, once uncommented, does regenerate
the file while reporting.

I've left it there as a commodity for the developer.
2022-02-08 19:25:03 +01:00
Eloy Lafuente (stronk7)
7a0d024e60 MDL-73659 phpunit: restore_date, api, rule, plugin, manager & helper
All restore_date_test, api_test, rule_test, plugin_test,
manager_test, helper_test testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- All restore_date_test cases have been put under xxx\backup
  level 2 (valid API) namespace.
2022-02-05 00:03:32 +01:00
Ilya Tregubov
57fe1a3099 Merge branch 'MDL-67853-master' of https://github.com/crazyserver/moodle 2022-01-27 16:41:19 +02:00
Pau Ferrer Ocaña
b4c75986ad MDL-67853 message: Adapt tests removing online/offline settings 2022-01-27 15:22:15 +01:00
Pau Ferrer Ocaña
d74bd798b6 MDL-67853 message: Remove on/offline settings on message preferences 2022-01-27 15:22:15 +01:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01: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