1661 Commits

Author SHA1 Message Date
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
Huong Nguyen
46bbf6e74b MDL-73854 Calendar: Fix calendar controls cannot be translated
Fix the issue that calendar page and block are showing only English names
of next and previous months despite switching the language
2022-02-15 12:16:32 +07:00
Eloy Lafuente (stronk7)
83497580cb Merge branch 'MDL-73669-master' of https://github.com/marinaglancy/moodle 2022-02-10 16:39:06 +01:00
Marina Glancy
c5c33d8eba MDL-73669 core_calendar: move deprecated behat steps to own file
Steps were initially deprecated in  MDL-72810
2022-02-04 17:17:08 +01:00
Jun Pataleta
33208c84f3 Merge branch 'MDL-73651-master' of git://github.com/rezaies/moodle 2022-02-04 10:36:50 +08:00
Shamim Rezaie
a159527748 MDL-73651 calendar: search in localised module type names as well 2022-02-04 10:06:05 +11:00
Paul Holden
85f2c044c0 MDL-73730 calendar: more precise matching of calendar day partial. 2022-02-02 10:19:26 +00: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
Dongsheng Cai
2ee27313ce MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:34:16 +01:00
Huong Nguyen
db56452269 MDL-73297 Calendar: Display improvement in small screen
- Changed the breakpoint for responsiveness from 1200px to 768px
 - Added "dots" to indicate days with events for the large block and main calendar page
 - Added popovers for the main calendar page
 - Added new Behat scenarios to test the responsiveness
2022-01-07 14:41:32 +07:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/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 login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Sara Arjona
995ed32cf5 Merge branch 'MDL-71818-master-test4' of git://github.com/rezaies/moodle 2021-12-29 09:13:12 +01:00
Shamim Rezaie
379f15f3b4 MDL-71818 calendar: Fix detection of a click on day link 2021-12-29 19:02:55 +11:00
Shamim Rezaie
ffe65c9a2b Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle into MDL-71818-master-test4 2021-12-29 18:59:46 +11:00
Sara Arjona
d870aae9c7 Merge branch 'MDL-71818-master' of https://github.com/dcai/moodle 2021-12-28 17:32:18 +01:00
Sara Arjona
7e559628dc Merge branch 'MDL-72581-master' of https://github.com/junpataleta/moodle 2021-12-28 09:23:11 +01:00
Jun Pataleta
be2ff9eea0 MDL-72581 calendar: Add purpose template context data
* Add a purpose template context data for activity events that
support the FEATURE_MOD_PURPOSE feature. This can be used to determine
the style to be used when rendering the activity icon for a calendar
event.
2021-12-21 17:56:35 +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
Dongsheng Cai
41587ffb43 MDL-71818 core_calendar: fix accessibility issues 2021-12-13 00:19:05 +11:00
Sara Arjona
23dea97a6c Merge branch 'MDL-61554-40' of https://github.com/nwp90/moodle 2021-12-09 17:50:58 +01:00
Nick Phillips
e252390284 MDL-61554 calendar: Set $PAGE context in calendar export. 2021-12-07 12:30:23 +13:00
Ilya Tregubov
7548cbfcf6 Merge branch 'MDL-72237-master' of https://github.com/dcai/moodle 2021-12-06 14:22:12 +02:00
Dongsheng Cai
cffefca11c MDL-72237 core_calendar: limit number of day events on calenar view 2021-12-03 16:21:30 +11:00
Sara Arjona
40818b5212 Merge branch 'MDL-72834-master' of https://github.com/HuongNV13/moodle 2021-12-01 08:59:47 +01:00
Jun Pataleta
a119f8e09c MDL-73066 calendar: Behat test fixes
* Specify which close button is being clicked
* Fill out course field when creating a group event
2021-11-30 17:18:42 +08:00
Huong Nguyen
7de559fa2f MDL-72834 Calendar: Move the calendar into the user menu 2021-11-30 10:22:07 +07:00
Eloy Lafuente (stronk7)
113ced6c0d Merge branch 'MDL-73066-master' of https://github.com/lameze/moodle 2021-11-29 20:11:24 +01:00
Jun Pataleta
5438a3944a Merge branch 'MDL-72810-master' of git://github.com/mickhawkins/moodle 2021-11-29 17:19:28 +08:00
Ferran Recio
26d0e51d91 MDL-72456 mod_assign: fix behats 2021-11-25 15:29:54 +01:00
Simey Lameze
dba805c552 MDL-73066 calendar: remove course and cat params from footer links 2021-11-23 19:11:34 +08:00
Michael Hawkins
0d644fe4e0 MDL-72810 core_calendar: Remove the three-month pseudo block
This removes the three-month pseudo block from along the side of the
main calendar, and deprecates relevant files/methods which will no
longer be in use.
2021-11-19 18:33:46 +08:00
Eloy Lafuente (stronk7)
1bdb9cafd6 Merge branch 'MDL-72470-master' of https://github.com/sharidas/moodle 2021-11-18 18:37:09 +01:00
Shamim Rezaie
96f910b62f Merge branch 'MDL-73040-master' of git://github.com/HuongNV13/moodle 2021-11-12 12:05:42 +11:00
Huong Nguyen
7d3d855193 MDL-73040 timeline: Update core_calendar_get_action_events_by_course API
This API now accepts an optional parameter 'searchvalue' to search the events
2021-11-11 12:26:40 +07:00
Mathew May
573c50bde8 MDL-65799 calendar: Final removal of constant 2021-11-10 15:14:05 +08:00
Sujith Haridasan
81b0d0533f MDL-72470 calendar: Add breadcrumbs to calendar page
Add breadcrumbs to the calendar page.
2021-11-08 16:53:39 +05:30
Huong Nguyen
48158134a0 MDL-71918 Calendar: Improve capability checks when fetching events 2021-11-05 13:15:01 +08:00
Huong Nguyen
1382607708 MDL-71953 calendar: Fix behat failures 2021-10-21 14:51:32 +07:00
Eloy Lafuente (stronk7)
6863a92722 Merge branch 'MDL-72013-master-int' of git://github.com/andrewnicols/moodle 2021-10-21 09:25:58 +02:00
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Huong Nguyen
bca6b06a1c MDL-71953 calendar: Accessibility improvement for manage subscription
- Create new web services for manage subscription (Update calendar subscription)
 - Modified delete subscription feature to use Web service.
 - Midified update subscription feature to use in-place editbale
 - Delete subscription feature now have a confirmation box before processing.
 - Fixed some accessibility issues
 - Used 'Delete' instead of 'Remove' for deleting subscriptions
2021-10-21 11:02:34 +07:00
Andrew Nicols
d07a2bc105 Merge branch 'MDL-71810-master-3' of git://github.com/HuongNV13/moodle 2021-10-15 11:30:55 +08:00
Huong Nguyen
0328241373 MDL-71810 calendar: responsiveness for calendar block
Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>>
2021-10-15 10:24:34 +07:00
Michael Hawkins
262d0e07b6 MDL-72594 calendar: Add overdue status to event exporter
A new "overdue" value will be returned when exporting events, which
evaluates to true if the event has passed (eg assignment is past due).
2021-10-13 15:58:52 +08:00
Ilya Tregubov
e36772cd31 Merge branch 'MDL-72295-master' of git://github.com/HuongNV13/moodle 2021-10-11 11:51:59 +07:00
Huong Nguyen
cf34245d6d MDL-72295 timeline: Add text search to the timeline block
AMOS BEGIN
 CPY [clearsearch,tool_moodlenet],[clearsearch,block_timeline]
AMOS END
2021-10-11 10:04:45 +07:00