109 Commits

Author SHA1 Message Date
meirzamoodle
1927c6f668 MDL-78096 editor_tiny: Scenario updates for TinyMCE image enhancements 2024-04-04 15:31:08 +07:00
Sara Arjona
6256d7c238
Merge branch 'MDL-80865' of https://github.com/paulholden/moodle 2024-03-13 12:18:46 +01:00
Eloy Lafuente (stronk7)
361dfe8145
MDL-75952 general: Since php81, refection->setAccessible() is no-op
Refereces:
- https://wiki.php.net/rfc/make-reflection-setaccessible-no-op
- https://www.php.net/manual/en/reflectionproperty.setaccessible.php
- https://www.php.net/manual/en/reflectionmethod.setaccessible.php

As of PHP 8.1.0, calling this method has no effect; all methods are
invokable by default. So, let's remove all uses from core, they are
no-op.
2024-03-10 21:15:00 +01:00
Jun Pataleta
3278ce7aba
Merge branch 'MDL-65292' of https://github.com/stronk7/moodle 2024-03-08 08:00:41 +08:00
Sara Arjona
fed26847b4
MDL-80460 behat: Fix tests to replace Topic with Section
The behat tests using the course format topics have been reviewed to:
- Add the 'inisections' parameter where necessary, facilitating automatic
renaming of section names.
- Evaluate failing tests due to slight changes in ordering. Notably, in
the topics format, sections are now uniformly named 'New section' without
any numbering.
2024-03-06 15:25:22 +01:00
Eloy Lafuente (stronk7)
29a541724f
MDL-65292 style: Fix all the function declaration ordering
This has been generated running the following Sniff,
part of the Moodle's CodeSniffer standard:
- PSR2.Methods.MethodDeclaration

It just ensures all the function declarations have
the correct order for:
- abstract and final.
- visibility (public, protected, private).
- static.

So, all the lines modified by this commit are function declarations
and the only changes are in the positions of those keywords.
2024-02-28 23:47:47 +01:00
Eloy Lafuente (stronk7)
ba1f804ffa
MDL-65292 style: Fix all function declarations white space
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing

All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.

Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.
2024-02-28 23:33:26 +01:00
Sara Arjona
8ebd1e5cd2
MDL-79151 customfield: Remove illegal whitespace 2024-02-21 17:46:12 +01:00
Paul Holden
270da62394
MDL-80865 customfield_textarea: empty check prior to exporting value.
Co-authored-by: Sara Bozzini <s.bozzini@cineca.it>
2024-02-20 10:42:56 +00:00
Alexander Van der Bellen
0aea55c3e6 MDL-79151 backup: Add custom field backup and restore API 2024-02-20 15:28:28 +08:00
Jun Pataleta
b51e037308
Merge branch 'MDL-70058' of https://github.com/paulholden/moodle 2024-02-07 12:31:44 +08:00
Huong Nguyen
c35f04c255 Merge branch 'MDL-80706' of https://github.com/marinaglancy/moodle 2024-02-01 10:43:37 +07:00
Marina Glancy
610f4a55b9 MDL-80706 customfield: php8.1 warning about passing null to strlen 2024-01-23 14:45:59 +00:00
Paul Holden
e23fbd1cc1
MDL-79256 customfield_textarea: don't autoclean content when editing. 2024-01-23 08:18:58 +00:00
Paul Holden
d0cab9a4a0
MDL-79256 customfield: add new valuetrust to data table schema. 2024-01-23 08:18:58 +00:00
Paul Holden
b530b1f436
MDL-70058 customfield: reference field element names correctly.
In the course external create/update methods, we must ensure that
the correct form element names are used. Specifically because the
textarea field type uses non-standard name.
2024-01-12 10:29:19 +00:00
Paul Holden
bfbee3a279
MDL-79365 customfield_textarea: ensure field uniqueness is correct. 2023-10-13 14:29:57 +01:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Paul Holden
08e66a5691
MDL-68435 customfield: fix plugin file serving callbacks.
Incorrect parameter/method call was previously serving files with
wrong filenames.
2023-09-04 10:45:16 +01:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Amaia Anabitarte
baecc57095 MDL-78531 administration: New default course settings section 2023-08-18 08:49:09 +02:00
Paul Holden
20280c0405
MDL-77180 customfield: allow entry of formatted category names.
Change the param type of the category name when editing to allow
for entry of multilang tags, the formatting of which is already
supported when returning category name.

Co-authored-by: Hiroto Kagotani <hiroto.kagotani@gmail.com>
2023-07-07 14:59:44 +01:00
David Woloszyn
802ff3e2e3 MDL-75913 behat: Use alternatives to Atto in tests 2023-06-19 16:35:46 +10:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Jun Pataleta
6baff9e550 Merge branch 'MDL-77541' of https://github.com/paulholden/moodle 2023-03-21 15:46:29 +01:00
Jun Pataleta
7e8212c7ab Merge branch 'MDL-77533' of https://github.com/paulholden/moodle 2023-03-09 16:35:40 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Paul Holden
39f6f7324e
MDL-77541 customfield_select: final removal of deprecated 310 method. 2023-03-06 12:45:34 +00:00
Paul Holden
e084865f19
MDL-77533 customfield: fix exception thrown during handler retrieval. 2023-03-06 09:05:52 +00:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Andrew Nicols
3286f9ba71 MDL-75959 customfield: Correct inappropriate class import
I suspect this was an incorrect tab completion import by an IDE which
was missed.
2022-10-12 06:39:38 +08:00
Simey Lameze
a91499c9f1 MDL-75922 behat: Apply @editor_atto tag to tests requiring Atto
These steps are currently using Atto-specific UI features and must
therefore make use of the @editor_atto tag to ensure that they continue
to run using Atto.

A new issue will be raised to migrate each of these to be
editor-agnostic.
2022-10-09 20:26:01 +08:00
Sujith Haridasan
73d604369d MDL-71062 core: Step 1 deprecation of print_error function 2022-07-13 08:20:54 +05:30
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 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:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +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
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
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
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
David Matamoros
ba15586806 MDL-71461 core_customfield: Add missing library in textarea export value 2022-01-11 11:16:07 +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