1108 Commits

Author SHA1 Message Date
Andrew Nicols
c48c431374 MDL-75244 form: Change checker should check existence of tinyMCE API
The window.tinyMCE.editors API was present in version 3 of TinyMCE, but
is not present in later versions. As a result, this check tries to loop
over a variable which does not exist and throws an error in the process.

We should check that window.tinyMCE *and* window.tinyMCE.editors both
exist before attempting to loop over them.
2022-07-28 16:09:21 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Andrew Nicols
319e14e6cf Merge branch 'MDL-74972-master' of https://github.com/marinaglancy/moodle 2022-07-06 10:58:03 +08:00
Paul Holden
240085fd1d MDL-74287 forms: request changesmade string as required.
Unconditionally requesting the string was triggering exceptions
during installation, before the required external functions had
been populated.
2022-06-16 08:07:51 +01:00
Marina Glancy
d6540ddfda MDL-74972 core_form: frozen autocomplete element does not display values 2022-06-14 13:27:01 +02:00
Paul Holden
6e85e01d3b MDL-74459 forms: replace import of jqueryui with native code.
We used the import for ensuring collapsible section elements
contained an ID attribute (efbe1530). This conflicted with use
of Bootstrap tooltips.
2022-04-07 22:38:46 +01:00
Paul Holden
efbe15306a MDL-74222 forms: add aria-controls attribute to expand/collapse all. 2022-04-01 18:44:24 +01:00
Paul Holden
ec89abc5bf MDL-74110 forms: disable calendar link when date selector disabled. 2022-03-19 14:24:23 +00:00
Sara Arjona
08bae4cce8 Merge branch 'MDL-74214' of https://github.com/paulholden/moodle 2022-03-17 13:11:47 +01:00
Jun Pataleta
7dfb64c7cb MDL-74073 core: Fix collapsesections accessibility
* Fix focus outline
* Set aria-expanded state accordingly
* Set aria-expanded in the template to false by default as the default
mode of the link is to expand all the sections.

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure
2022-03-16 14:09:14 +08:00
Paul Holden
29c00fc100 MDL-74214 forms: re-calculate calendar panel zIndex each time.
The previous iteration only calculated it's zIndex value on
initial load. This meant that any nodes added subsequent to this
would not be taken into account (e.g. modal forms).
2022-03-15 13:41:42 +00:00
Víctor Déniz
2ac75e55a9 Merge branch 'MDL-74090-master' of https://github.com/junpataleta/moodle 2022-03-08 00:00:19 +00:00
Jun Pataleta
3314000eaf MDL-74090 core: Proper RTL/LTR display of collapsed icons 2022-03-05 00:45:32 +08: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
Jun Pataleta
0dca278d71 MDL-72737 core: Rebuild JS modules 2022-03-01 19:22:24 +08:00
Bas Brands
2faf5e8e48 MDL-72737 theme_boost: update for section header styles 2022-03-01 12:01:59 +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
Sara Arjona
1c33782d73 Merge branch 'MDL-73189-master' of https://github.com/nguyenphuctien/moodle 2021-12-28 11:41:54 +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
Tien Nguyen
24edbcc782 MDL-73189 File upload: Fix bug can upload more than maximum no. of files 2021-12-14 15:09:13 +07: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
Sujith Haridasan
d6ead553f5 MDL-71915 core_form: Update behat tests
Update behat tests to accommodate changes made
for tertiary navigation.
2021-12-06 10:26:40 +05:30
Jun Pataleta
bc6385cc6c Merge branch 'MDL-73142-master' of https://github.com/susyzan/moodle 2021-12-02 14:30:16 +08:00
Paul Holden
b1204acbf0 MDL-73205 forms: handle AJAX error in dynamic/modal form submission. 2021-11-29 18:28:44 +00:00
Susanna Zanatta
7825f31607 MDL-73142 filepicker: improved contrast in allowed file types list
Changed bootstrap class from text-muted to text-dark to bring the
contrast of listed file extensions above the Level AA pass mark.
2021-11-24 16:11:58 +00:00
Jun Pataleta
c988241f42 Merge branch 'MDL-72966-master' of https://github.com/NashTechOpenUniversity/moodle 2021-11-16 11:38:35 +08:00
Thong Bui
ec160a91cb MDL-72966 File upload: Uncaught Error from JS when uploading the file 2021-11-15 07:28:50 +07:00
Jun Pataleta
e1c9c7b007 Merge branch 'MDL-73007' of https://github.com/paulholden/moodle 2021-11-11 23:45:12 +08:00
Sara Arjona
d650e65265 Merge branch 'MDL-71751-master' of https://github.com/nguyenphuctien/moodle 2021-11-11 12:44:25 +01:00
Andrew Nicols
600b049def MDL-71751 js: Do not stop propagation on drop, and handle it properly 2021-11-11 15:52:35 +07:00
abgreeve
7b935ca87b MDL-71912 behat: Assignment navigation related behat fixes. 2021-11-10 16:26:57 +08:00
Paul Holden
0d3f58db0a MDL-73007 output: trigger form changechecker when switching tabs.
Co-authored-by: Odei Alba <odeialba@gmail.com>
2021-11-09 17:20:23 +00:00
Eloy Lafuente (stronk7)
19576e54b3 MDL-71912 behat: Temporarily skip some troubled scenarios - js
That way we get everything else passing, because @skip_interim
scenarios are skipped by default. And can focus on the failing
ones apart.
2021-11-09 16:08:48 +01:00
Adrian Greeve
b72fa5fbae MDL-71912 behat: Updating various tests using assign steps. 2021-11-09 11:24:08 +08:00
Eloy Lafuente (stronk7)
3873af5626 Merge branch 'MDL-72655-master' of https://github.com/andelacruz/moodle 2021-11-03 19:03:22 +01:00
Angelia Dela Cruz
89c4c803e8 MDL-72655 behat: Use assign generators
Replace steps that manually add assignment instances via the UI
and use Behat generators. This improves the speed of Behat test
runs.
2021-11-03 11:34:26 +08:00
Simey Lameze
6c515b820b MDL-72687 form: only add legend tag if a label is set 2021-11-02 11:19:24 +08:00
Jake Dallimore
6266b198ed Merge branch 'MDL-71914-master-v3' of git://github.com/peterRd/moodle 2021-10-27 10:39:09 +08:00
Peter Dias
f3ee54ae04 MDL-71914 mod_glossary: Updated glossary behat tests 2021-10-26 11:21:32 +08:00
Andrew Nicols
9e9b7bb20d Merge branch 'MDL-71750-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-25 13:18:21 +08:00
Thong Bui
76c0a743bf MDL-71750 File upload: Disable submittion when uploading multiple files
Fixed issue "Save" and "Submit and finish" button is not disabled when file uploading in the ticket MDL-71644
2021-10-22 13:26:02 +07:00
Andrew Nicols
349312143d MDL-72013 js: Fix jsdocs to meet stricter eslint 2021-10-21 13:28:00 +08:00
Andrew Nicols
05e6d69e4c Merge branch 'MDL-72507-master' of https://github.com/NashTechOpenUniversity/moodle 2021-10-21 12:56:23 +08:00
Thong Bui
3c19cbbb18 MDL-72507 Quiz: Quiz auto-save does not detect uploaded files 2021-10-19 16:10:15 +07:00
Mihail Geshoski
6c0e1eee94 MDL-71913 mod_data: Update behat tests 2021-10-13 11:05:30 +08:00
Paul Holden
d1b1b94fb4 MDL-71306 cohort: ignore empty values in form autocomplete element. 2021-10-04 21:09:56 +01:00
Paul Holden
cf99ea1a46 MDL-72462 forms: style checkbox/radio field labels consistently.
Fixes small regression from 942dc9de that moved indentation of form
fields to the label node, but only for those labels with specific
class.
2021-09-27 18:23:51 +01:00