3558 Commits

Author SHA1 Message Date
Mihail Geshoski
32754bdf2a MDL-74434 block_tag_youtube: Update instances only if category is set
Modifies the existing upgrade step to only take into consideration
block instances that have a specific category set prior to determening
if a legacy category is being used and updating them. Instances that do
not have any category set should be ignored.
2022-04-07 13:24:08 +08:00
Andrew Nicols
4b388fc239 MDL-74235 core: Update core uses of activity icons to monologo 2022-04-07 12:56:14 +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
Eloy Lafuente (stronk7)
70e29b77f0 Merge branch 'MDL-74330-master-enfix' of https://github.com/vmdef/moodle 2022-04-05 18:39:23 +02:00
Jake Dallimore
bd58b70e66 Merge branch 'MDL-74276-master-linkfarm' of https://github.com/peterRd/moodle 2022-04-04 15:59:19 +08:00
Helen Foster
3719878cbf MDL-74330 lang: Import fixed English strings (en_fix) 2022-04-01 13:17:08 +01:00
Peter Dias
2c27a33213 MDL-74276 report: Update behat tests to account for new page. 2022-04-01 12:44:04 +08:00
Andrew Nicols
80ec9a1c92 Merge branch 'MDL-74367-master' of https://github.com/vmdef/moodle 2022-04-01 10:13:44 +08:00
Jun Pataleta
cd1cec7529 MDL-73900 block_recentlyaccesseditems: Behat fix for "Show more items" 2022-03-31 10:08:17 +08:00
Víctor Déniz
c32c3e89ef MDL-74367 recentlyaccesseditems: full name in item card tooltip 2022-03-30 11:28:21 +01:00
Víctor Déniz
c6c99abe7a Merge branch 'MDL-74205-master' of https://github.com/ilyatregubov/moodle 2022-03-30 09:51:50 +01:00
Ilya Tregubov
053785ff5f MDL-74205 navigation: Don't show participants link to user if he has no permission. 2022-03-30 10:42:11 +06:00
Víctor Déniz
e5d207a518 MDL-73900 recentlyaccesseditems: vertical display in blocks drawer 2022-03-29 11:50:17 +01:00
Marina Glancy
09446a2934 MDL-74254 course: User may not have capability to browse courses 2022-03-21 14:44:14 +01:00
Jun Pataleta
1e533995dd Merge branch 'MDL-73233-master' of https://github.com/sarjona/moodle 2022-03-18 00:35:11 +08:00
Sara Arjona
47550abe6b Merge branch 'MDL-74080-master' of https://github.com/aanabit/moodle 2022-03-17 17:21:23 +01:00
Eloy Lafuente (stronk7)
89e020a872 Merge branch 'MDL-74114-master' of https://github.com/aanabit/moodle 2022-03-16 22:13:57 +01:00
Sara Arjona
42c96d1708 MDL-73233 navigation: Remove dashboard when it is disabled
- Only add Dashboard to 'home' the root node if the $CFG->enabledashboard
setting is enabled.
- The "More..." link displayed in the "My courses" section from the
navigation block was pointing to the dashboard. However, now that we have
the "My courses" page, it makes more sense to change it and link to it.
- For the User preferences, I've changed breadcrumbs from "Dashboard" to
"Home" because they are more generic (and don't strictly belong to the
dashboard).
2022-03-16 11:35:09 +01: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
Shamim Rezaie
06b64c8284 MDL-73865 blocks_myoverview: Increase debounce wait to 1 second 2022-03-15 12:45:35 +11:00
Amaia Anabitarte
9bfefc4975 MDL-74114 block_myoverview: Fix set favourite changes 2022-03-14 17:19:49 +01:00
Amaia Anabitarte
89849347e5 MDL-74080 block_myoverview: Fix create course link based on permissions 2022-03-14 09:21:22 +01: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
Jun Pataleta
972b5a2d3f Merge branch 'MDL-73908-master' of https://github.com/bmbrands/moodle 2022-03-10 17:15:34 +08:00
Amaia Anabitarte
7d5190433a MDL-72504 block_myoverview: Show starred course changes 2022-03-08 13:40:43 +01:00
Bas Brands
322f13207a MDL-73908 block_calendar_upcoming: new mod icons 2022-03-08 11:07:38 +01:00
Bas Brands
1c3e12e71b MDL-73908 block_recentlyaccassitems: new mod icons 2022-03-08 11:02:46 +01:00
Jun Pataleta
e9ee905619 Merge branch 'MDL-73785' of https://github.com/stronk7/moodle 2022-03-04 14:36:47 +08:00
Sara Arjona
4f95c39ef0 Merge branch 'MDL-73841-master' of https://github.com/bmbrands/moodle 2022-03-03 16:31:15 +01:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 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:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +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
Mathew May
b0532aedd8 MDL-72092 behat: Add private files block where needed 2022-03-01 19:13:20 +08:00
Peter Dias
f456c349a0 MDL-72092 recentlyaccesseditems: Change the default block location
Add/Change the default location of the block on /my pages
2022-03-01 19:13:20 +08: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
Peter Dias
b12508c19a MDL-72092 calendar_month: 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
Bas Brands
137b2dd638 MDL-73841 block_myoverview: use text for selectors 2022-03-01 09:18:37 +01:00
Ilya Tregubov
e3306d7833 Merge branch 'MDL-73733' of https://github.com/Chocolate-lightning/moodle 2022-02-28 16:56:12 +02:00
Mathew May
dd392db7a1 MDL-73733 myoverview: Improve upgrade progress reporting and queries 2022-02-25 15:19:48 +08:00
Juan Leyva
3a305dd4d1 MDL-72092 blocks: Force course overview fake block 2022-02-25 15:15:07 +08:00
Mathew May
f0cedb93e8 MDL-72092 core: Re-arrange the default dashboard 2022-02-25 15:12:50 +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
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +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
Jun Pataleta
9af545659c Merge branch 'MDL-72928-rebase' of https://github.com/Chocolate-lightning/moodle 2022-02-11 22:28:11 +11:00
Jun Pataleta
ae14ff321b MDL-72928 core: Remove Remember username 2022-02-11 12:01:26 +08: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