164 Commits

Author SHA1 Message Date
Ferran Recio
4d5395d27b MDL-74324 contentbank: fix RTL dropdown menu 2022-03-30 12:40:00 +02:00
Mihail Geshoski
c427883cb7 MDL-73169 contentbank: Update the breadcrumb nodes and nav highlighting 2022-03-02 17:34:13 +08:00
Jake Dallimore
c08caf57c5 Merge branch 'MDL-73645-master-1' of git://github.com/mihailges/moodle 2022-03-02 14:10:19 +08:00
Mihail Geshoski
e7d9be51ab MDL-73645 core_contentbank: Update breadcrumb nodes 2022-03-02 13:00:25 +08: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
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
Peter Dias
240da1b186 MDL-73370 contentbank: Update behat tests 2022-02-16 17:49:00 +08:00
Peter Dias
57f1bd3a01 MDL-73370 contentbank: Move settings cog to tertiary navigation
* Add headings to subpages
* Update context header based on current context
* Tweak layout.
2022-02-16 17:49:00 +08:00
Eloy Lafuente (stronk7)
5aa93e3066 Merge branch 'MDL-72466-master' of https://github.com/bmbrands/moodle 2022-02-02 12:10:18 +01:00
Bas Brands
7c76e1c349 MDL-72466 core_output: dropdown menu alignment 2022-01-27 17:24:20 +01:00
Sara Arjona
1b7c63b191 Merge branch 'MDL-73562-master' of https://github.com/bmbrands/moodle 2022-01-27 11:24:30 +01:00
Bas Brands
068bb8ae8b MDL-73562 core_contentbank: alignment fixes 2022-01-25 09:35:07 +01:00
Jake Dallimore
041b1beb46 Merge branch 'MDL-73347-master' of https://github.com/sarjona/moodle 2022-01-24 13:40:57 +08:00
Sara Arjona
53fe23d8b5 MDL-73347 behat: Add blocks hidden by default for boost
For the boost them, a few themes have been hidden by default.
The unaddable setting should be set to let admins add them again,
because some behat tests need them.
2022-01-14 13:08:48 +01:00
Mathew May
76eaf6ee5f MDL-73316 contentbank: Add in secondary navigation 2022-01-12 13:54:57 +08:00
Mathew May
a9952cfe4c MDL-73316 navigation: Add homepagesecondary nav 2022-01-12 13:54:57 +08:00
Jun Pataleta
80c17cd2a0 Merge branch 'MDL-72701-master' of https://github.com/andrewnicols/moodle 2021-12-23 12:10:46 +08:00
Shamim Rezaie
dacfebedf3 Merge branch 'MDL-73348' of https://github.com/stronk7/moodle 2021-12-22 21:19:52 +11:00
Jun Pataleta
c6c2ad8360 Merge branch 'MDL-73369-master' of https://github.com/bmbrands/moodle 2021-12-21 16:36:51 +08:00
Jun Pataleta
e9bd499fb1 Merge branch 'MDL-72867-master' of https://github.com/HuongNV13/moodle 2021-12-21 11:23:09 +08:00
Andrew Nicols
bb9741d472 MDL-72701 unit tests: Fix broken @covers annotations 2021-12-21 09:24:00 +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
Bas Brands
476ab1275f MDL-73369 theme_boost: contentbank toolbar narrow view 2021-12-16 10:39:09 +01:00
Huong Nguyen
8c336899a9 MDL-72867 Navigations: User menu improvements 2021-12-15 13:54:45 +07:00
Ilya Tregubov
9e5ffa2229 Merge branch 'MDL-72095-master-3' of https://github.com/bmbrands/moodle 2021-12-13 18:46:16 +02:00
Ilya Tregubov
6f44f008d8 Merge branch 'MDL-73278' of https://github.com/stronk7/moodle 2021-12-10 18:51:40 +02:00
abgreeve
fcd4de8639 MDL-72090 navigation: Update to behat feature files for navigation.
This updates feature files to use the new steps to navigate to certain
pages.
2021-12-09 11:13:35 +08:00
Bas Brands
946fd915e2 MDL-72095 theme_boost: max width for activity pages 2021-12-08 17:29:49 +01:00
Eloy Lafuente (stronk7)
deb0e76eee MDL-73278 phpunit: Rename already namespaced classes to match file name
These are the only cases 100% safe to apply the renaming of the
testcase class names to match the file names.

All other cases are not safe, because they are missing namespace
and may enter into name conflicts. Adding namespaces is not as
simple as imagined because it implies to, also, add a good number
of modifications to core. See the issue for more details.
2021-12-07 23:54:29 +01:00
Mathew May
f65b92577a MDL-70197 navigation: Update classic goutte tests 2021-11-30 08:13:49 +02:00
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Shamim Rezaie
399b2d4772 MDL-72688 contentbank: Some accessibility improvements described below
- Label the table/list with aria-label
- Hide sort buttons from screen-readers and use aria-sort instead
- Remove the redundant title from decorative thumbnails
2021-11-05 12:45:27 +11:00
Shamim Rezaie
0063ed3e76 MDL-72688 contentbank: Add and maintain appropriate aria roles
Also moved header text into the sorting button as per the example at
https://dequeuniversity.com/library/aria/table-sortable
2021-11-04 15:12:18 +11:00
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Amaia Anabitarte
1d4edcb57b MDL-72099 core_contenbank: Add context navigation 2021-10-14 13:04:13 +02:00
Eloy Lafuente (stronk7)
87e7bcb12a Merge branch 'MDL-71970-master' of git://github.com/sarjona/moodle 2021-09-29 23:27:15 +02:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Sara Arjona
f47a327290 MDL-71970 h5plib_v124: Replace references to new Moodle\H5Pxxx namespace
The joubel/core and joubel/editor libraries have been moved to Moodle
namespace.
This commit adds the new namespace to the places where these classes
are used.
Besides, a couple of minor changes have been done to replace the _test.php
classname and remove some unnecessary defined('MOODLE_INTERNAL').
2021-09-27 11:41:48 +02:00
Sara Arjona
ab7ee8fa1d MDL-72358 contenttype_h5p: Improve error handling
In MoodleCloud it was raised that, in some cases, loading the content
bank, from a course page, gives an "Invalid H5P content URL", not
offering any way to delete the offending content or create new one.
An extra-check has been added to the "is_view_allowed" method to
guarantee the H5P API is called only if the H5P content has a file.
2021-08-27 10:39:39 +02:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Sara Arjona
ef557b970f MDL-69331 core_h5p: fix behat errors 2021-04-16 11:09:02 +02:00
Sara Arjona
39263ddb62 MDL-69331 core_h5p: Add missing @core_h5p tag 2021-04-15 09:16:36 +02:00
Sara Arjona
f3d43c76bc MDL-69331 core_h5p: Add missing library files to behat tests
Some of the pre-existing behat tests were creating content into the
content bank using the generator but the H5P content-type libraries
weren't uploaded.
Since MDL-69331, libraries need to be deployed previously (so fake
H5P content-type won't be displayed if these libraries don't exist).
2021-04-15 09:16:36 +02:00
Sara Arjona
39fa45e299 MDL-69331 core_contentbank: Hide disabled H5P content-types
If a H5P content-type is disabled:
- The content bank won't display existing contents having it as a
main library.
- The content bank won't allow to create new contents using it.
2021-04-15 09:16:32 +02:00
Sara Arjona
e5872a3b45 MDL-67999 contentbank: Remove contentbank/upload.php
As the form to upload files to the content bank has been moved to
modal, this file is not required any more, so it has been removed.
2021-04-14 18:10:04 +02:00