1023 Commits

Author SHA1 Message Date
Andrew Nicols
91bd6289e2 Merge branch 'MDL-70962' of git://github.com/paulholden/moodle 2021-03-29 11:58:05 +08:00
Paul Holden
11099c15bb MDL-70962 forms: catch modal exceptions when getting body content.
They are thrown in the following circumstances:

 * The dynamic form class doesn't exist;
 * It does exist but it's `check_access` method throws exception

Co-Authored-By: Andrew Nicols <andrew@nicols.co.uk>
2021-03-25 17:26:36 +00:00
Andrew Nicols
9a9bf7f116 Merge branch 'MDL-71039-master' of git://github.com/marinaglancy/moodle 2021-03-23 11:17:44 +08:00
Marina Glancy
960bb02482 MDL-71039 core_form: support valuehtmlcallback in autocomplete inline 2021-03-04 13:39:05 +01:00
Ilya Tregubov
eaf40e050e MDL-69680 lib: Replace deprecated jQuery functions 2021-03-04 12:48:26 +08:00
Marina Glancy
612c230709 MDL-70966 various: Under PHP8 empty string is no longer equals to 0 2021-02-28 19:16:09 +01:00
Marina Glancy
1e03a240b5 MDL-64554 form: reset form change checker before triggering submit event 2021-02-18 13:04:14 +01:00
Andrew Nicols
7d5b808e3e Merge branch 'MDL-64554-master' of git://github.com/andrewnicols/moodle 2021-02-18 11:16:40 +08:00
Andrew Nicols
79731372c3 MDL-64554 core_form: Rename class for dynamic form 2021-02-18 11:16:21 +08:00
Andrew Nicols
d6e50d14d2 Merge branch 'MDL-64554-master' of git://github.com/andrewnicols/moodle 2021-02-18 10:21:55 +08:00
Andrew Nicols
ab70110a74 MDL-64554 core_form: CI fixes 2021-02-18 10:10:08 +08:00
Marina Glancy
72be49c473 MDL-64554 core_form: new API for modal forms 2021-02-17 18:06:49 +01:00
Andrew Nicols
ab024ac209 Merge branch 'MDL-47410-master' of git://github.com/mihailges/moodle 2021-02-17 09:34:22 +08:00
Mihail Geshoski
3ac452047f 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:04:46 +08:00
Mihail Geshoski
b7bef8f297 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 11:58:44 +08:00
Mihail Geshoski
d46f1a3ef4 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 11:36:27 +08:00
John Yao
b964ba6373 MDL-65390 accessibility: correct focus after "Show more" clicked 2021-02-05 12:15:21 +11:00
Jun Pataleta
e3457dc4aa 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 13:11:58 +08:00
Jake Dallimore
b2382c7d38 Merge branch 'MDL-69422-master-2' of git://github.com/junpataleta/moodle 2020-12-22 15:58:21 +08:00
sam marshall
ddbafce0e0 MDL-65818 Security: Encryption API and admin setting for secure data 2020-12-04 14:41:21 +00:00
Jun Pataleta
1d685419d4 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:16:03 +08:00
Bas Brands
4d181cafa5 MDL-69453 core_form: improve form UI icons and alignment 2020-11-11 13:46:00 +01:00
Mihail Geshoski
81d0642b6c MDL-70041 filepicker: Make sure the user has a recently used license 2020-10-28 11:48:33 +08:00
Eloy Lafuente (stronk7)
40de097e65 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:00 +02:00
Eloy Lafuente (stronk7)
d95c378771 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:00 +02:00
Eloy Lafuente (stronk7)
f94195c320 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:45:59 +02:00
Eloy Lafuente (stronk7)
f6711bb394 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:45:59 +02:00
Sara Arjona
d09980a8b0 Merge branch 'MDL-69897' of https://github.com/paulholden/moodle into master 2020-10-19 18:14:45 +02:00
Adrian Greeve
6fb8242e93 Merge branch 'MDL-69649-master' of git://github.com/rezaies/moodle 2020-10-12 10:14:53 +08:00
Paul Holden
9cbce6858f MDL-69897 repository: add heading to delete file modal. 2020-10-08 20:28:40 +01:00
Andrew Nicols
f908e8beef MDL-69192 mod_assign: Stop clicking OK on non-existent modal 2020-10-08 08:04:10 +08:00
Shamim Rezaie
424e61d559 MDL-69649 form: Fix labels for defaultcustom form elements 2020-09-28 23:41:29 +10:00
David Mudrák
00b6772114 MDL-69050 lang: Rename and deprecate filetypes_util methods 2020-09-24 19:41:58 +02:00
David Mudrák
f278c69c83 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:41:58 +02:00
David Mudrák
d9dc9ae891 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:41:57 +02:00
Mihail Geshoski
cb72d845f5 MDL-65115 repository: Prevent unzipping if it will exceed allowed quota 2020-09-08 08:54:26 +02:00
Thong Bui
fb75fd0396 MDL-68344 filepicker: File Picker focus lost on upload 2020-09-04 09:30:59 +07:00
Andrew Nicols
7df5b8ed1c Merge branch 'MDL-69507' of https://github.com/timhunt/moodle 2020-09-01 11:11:07 +08:00
Jake Dallimore
9ccf833ec1 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 08:03:33 +08:00
Tim Hunt
58b7986776 MDL-69507 duration form field: should return an int number of seconds 2020-08-20 11:30:41 +01:00
Tim Hunt
e5a0f11b5e MDL-69507 duration form field: modernise coding style 2020-08-20 11:30:40 +01:00
Andrew Nicols
d48a0a9a5d Merge branch 'MDL-61215-master' of git://github.com/sarjona/moodle 2020-08-20 07:14:15 +08:00
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Sara Arjona
c6bd7bd0ab 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-14 17:06:23 +02: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