Commit graph

1021 commits

Author SHA1 Message Date
Andrew Nicols
fa58d33b66 Merge branch 'MDL-71039-311' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-03-23 11:18:24 +08:00
Marina Glancy
8274935cb1 MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:45 +01:00
Ilya Tregubov
4bc3faf193 MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:06 +08:00
Marina Glancy
b2d8938431 MDL-70966 various: Under PHP8 empty string is no longer equals to 0 2021-02-28 19:16:53 +01:00
Marina Glancy
5e343e277b MDL-64554 form: reset form change checker before triggering submit event 2021-02-18 13:08:33 +01:00
Andrew Nicols
319a5f42af Merge branch 'MDL-64554-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-02-18 11:16:58 +08:00
Andrew Nicols
f5e4e9cdbc MDL-64554 core_form: Rename class for dynamic form 2021-02-18 11:16:21 +08:00
Andrew Nicols
0b09c2556f Merge branch 'MDL-64554-311' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2021-02-18 10:22:45 +08:00
Andrew Nicols
aac6ad5f93 MDL-64554 core_form: CI fixes 2021-02-18 10:10:43 +08:00
Marina Glancy
1d33351fbb MDL-64554 core_form: new API for modal forms 2021-02-17 18:09:38 +01:00
Andrew Nicols
5e99241c0c Merge branch 'MDL-47410-311' of git://github.com/mihailges/moodle into MOODLE_311_STABLE 2021-02-17 09:40:14 +08:00
Mihail Geshoski
ac28d4fc96 MDL-47410 behat: Support selection from the datetime selector element
Adds behat support for selecting date and time from a datetime selector
element. The passed values should represent a textual date and time
description wrapped in '##' (e.g. '##first day of January 2020 08:00##',
'##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be
used to disable the datetime selector element.
2021-02-11 12:11:06 +08:00
Mihail Geshoski
8d7a6f740d MDL-47410 behat: Support date selection from the date selector element
Adds behat support for selecting a date from the date selector element.
The passed values should represent a textual date description wrapped
in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also,
the value 'disabled' is valid and can be used to disable the date
selector element.
2021-02-11 12:11:06 +08:00
Mihail Geshoski
72ad6a2b2c MDL-47410 form: Add data-fieldtype attribute to checkbox inline element
Includes the data-fieldtype attribute to the checkbox inline form
element. This element does not extend the parent inline element
template due to its specific nature and therefore this attribute was
missing.
2021-02-11 12:11:05 +08:00
Sara Arjona
878aaf5d7c Merge branch 'MOODLE_311_STABLE-MDL-65390' of https://github.com/yao9394/moodle into MOODLE_311_STABLE 2021-02-09 15:10:50 +01:00
Jun Pataleta
9730348163 MDL-70288 core: Remove duplicate labels for checkbox elements
* If there's a label, the text will serve as the description of  the
element.
2021-02-02 14:22:15 +08:00
John Yao
1a013d3fee MDL-65390 accessibility: correct focus after "Show more" clicked 2021-01-27 11:21:52 +11:00
Jake Dallimore
cf02c19b01 Merge branch 'MDL-69422-311-2' of git://github.com/junpataleta/moodle into MOODLE_311_STABLE 2020-12-22 15:58:45 +08:00
sam marshall
4045bfd723 MDL-65818 Security: Encryption API and admin setting for secure data 2020-12-04 14:40:18 +00:00
Jun Pataleta
5f040a5ac8 MDL-69422 core: Convert required and help button container to div
* A span element cannot have a div as a child.
2020-11-27 23:28:25 +08:00
Bas Brands
e6ebfa4baa MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 14:04:54 +01:00
Mihail Geshoski
35364e22fc MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 12:06:34 +08:00
Eloy Lafuente (stronk7)
35bc26b516 MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8
for operations on strings. Also the optional case parameter is. All uses
must be changed to one of:

- assertStringContainsString()
- assertStringContainsStringIgnoringCase()
- assertStringNotContainsString()
- assertStringNotContainsStringIgnoringCase()

More info: https://github.com/sebastianbergmann/phpunit/issues/3422

Regexp to find all uses:

ag 'assert(Not)?Contains\('
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
ddf72dd60d MDL-67673 phpunit: Remove expectedException annotations
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

The annotations `@expectedException`, `@expectedExceptionCode`,
`@expectedExceptionMessage`, and `@expectedExceptionMessageRegExp`
are now deprecated.
Using these annotations will trigger a deprecation warning
in PHPUnit 8 and in PHPUnit 9 these annotations will be removed.

Also, all uses of expectExceptionMessageRegExp() has been moved
to expectExceptionMessageMatches(). See https://github.com/sebastianbergmann/phpunit/issues/3957

TODO: Various weirdness found while doing the changes with these tests:
- vendor/bin/phpunit lib/tests/exporter_test.php (created MDL-69700)
- vendor/bin/phpunit competency/tests/external_test.php (same issue than prev one)
- vendor/bin/phpunit question/engine/tests/questionengine_test.php (created MDL-69624)
- vendor/bin/phpunit lib/tests/event_test.php (created MDL-69688)
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
a6674bf8a4 MDL-67673 phpunit: Remove deprecated assertInternalType()
While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
2020-10-21 12:46:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:46:04 +02:00
Sara Arjona
33c7881448 Merge branch 'MDL-69897-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-19 18:14:54 +02:00
Adrian Greeve
6f86e933ed Merge branch 'MDL-69649-310' of git://github.com/rezaies/moodle into MOODLE_310_STABLE 2020-10-12 10:15:41 +08:00
Paul Holden
31efbf2e0e MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:29:48 +01:00
Andrew Nicols
c562848596 MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:43 +08:00
Shamim Rezaie
adac2a9e55 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:43:01 +10:00
David Mudrák
781545d34d MDL-69050 lang: Rename and deprecate filetypes_util methods 2020-09-24 19:33:32 +02:00
David Mudrák
fd18dc14ff MDL-69050 lang: Rename the filetypesnotwhitelisted string
Rename the string identifier to filetypesnotallowed, copy all the
existing translations in AMOS and deprecate the original string to be
eventually removed.

AMOS BEGIN
 CPY [filetypesnotwhitelisted,core_form],[filetypesnotallowed,core_form]
AMOS END
2020-09-24 19:32:40 +02:00
David Mudrák
41ad54e182 MDL-69050 lang: Fix placeholder in the err_wrongfileextension string
The name of the placeholder has been found exclusive and potentially
derogatory. Also the name of variable that was used to populate the
placeholder value. That was not the intention.
2020-09-24 19:32:39 +02:00
Mihail Geshoski
e2a11dc2aa MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:33 +02:00
Thong Bui
2301f9bfaa MDL-68344 filepicker: File Picker focus lost on upload 2020-09-08 08:45:09 +02:00
Andrew Nicols
0713666486 Merge branch 'MDL-69507_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-09-01 11:15:55 +08:00
Jake Dallimore
fbcc91236e MDL-69505 core_form: fix js min/max date restriction in dateselector
This was using the yui2-calendar attribute, not the yui 3 attribute.
2020-08-31 07:57:50 +08:00
Tim Hunt
0c6f661def MDL-69507 duration form field: should return an int number of seconds 2020-08-20 11:31:28 +01:00
Tim Hunt
24d0335a0a MDL-69507 duration form field: modernise coding style 2020-08-20 11:31:28 +01:00
Sara Arjona
24ce9b8a10 MDL-61215 core_files: add new optimised_image group
Currently, PHP getimagesize method doesn't support SVG images.
As some features, such as badges, processs and optimise the images
before using them, a new filetype group has been created to exclude
SVG from there: optimised_image.
SVG can't be removed from web_image because then users won't be
able to add SVG images to their courses using labels, pages...
2020-08-20 07:16:41 +08:00
Bas Brands
49f1803c9d MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-19 08:29:50 +08:00
Mihail Geshoski
8cdb2fcc0e MDL-62982 core_form: Final deprecation of the htmleditor form element 2020-07-06 10:02:58 +08:00
hiendinh
de6b084925 MDL-68890 progressbar: prevent display exist file's progress bar 2020-06-15 10:55:06 +07:00
Eloy Lafuente (stronk7)
b2cc7d93f3 Merge branch 'MDL-68844-master' of https://github.com/roland04/moodle 2020-06-02 00:08:35 +02:00
Jun Pataleta
96dc92f099 Merge branch 'MDL-68353-master' of git://github.com/rezaies/moodle 2020-05-29 22:26:03 +08:00
Shamim Rezaie
9c60fd18a7 MDL-68353 form: filepicker label fix 2020-05-29 14:50:32 +10:00
Shamim Rezaie
4ceff26fdf MDL-68353 admin: Not use label tag in admin setting elements when needed 2020-05-29 14:37:05 +10:00
Shamim Rezaie
f792b0ace4 MDL-68353 form: filemanager label fix 2020-05-29 14:37:01 +10:00
Shamim Rezaie
5dad4a95ac MDL-68353 form: Only include the size attribute if there is a size set 2020-05-29 13:17:08 +10:00