1002 Commits

Author SHA1 Message Date
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
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
Shamim Rezaie
c2e48a1d85 MDL-68353 form: Removed the size attribute
The size attribute does not work with the checkbox input type.
2020-05-29 13:17:08 +10:00
Shamim Rezaie
e2aefa3ba8 MDL-68353 core: do not output empty labels 2020-05-29 13:17:08 +10:00
Eloy Lafuente (stronk7)
6f56e743ed Merge branch 'MDL-68753-master-enfix' of git://github.com/mudrd8mz/moodle 2020-05-28 13:01:39 +02:00
Mikel Martín
22a80863d5 MDL-68844 formslib: Fix inline layout for static elements 2020-05-27 13:18:35 +02:00
David Mudrák
2615e429f4 MDL-68753 lang: Remove a redundant okay string and use "OK" everywhere
The "Ok" (with lower-case "k") string was added in MDL-68409 to keep
backwards compatibility with YUI alerts that had it hard-coded. But we
should not need to explain to translators why we have two OK strings
like this and why they use different wording.

Additionally, there would be inconsistency in Behat tests and everywhere
depending on which "OK" or "Ok" string is used for buttons.

So instead, this patch changes the hard-coded 'Ok' string in the YUI and
we should stick to "OK" from now on everywhere.
2020-05-27 09:59:44 +02:00
Bas Brands
91de0ed823 MDL-67874 theme_boost: make focus outline accessible 2020-05-26 09:54:12 +02:00
Jun Pataleta
8aa0f2c4d8 Merge branch 'MDL-45184-master' of git://github.com/junpataleta/moodle 2020-05-26 12:39:24 +08:00
Tom Dickman
4399e4759a MDL-45184 tool_licenses: Add custom licenses
This feature adds an admin tool for creating custom licenses.
Now custom licenses can be added and amended in Moodle, and the site
default can be set to a custom license.

Core licenses remain hard-coded and are uneditable, so they will always
require update within Moodle core updates, and maintain their
internationalisation through core language strings.

This also includes fundamental changes to the license API including
the addition of license caching and deprecation of no longer required
admin settings for license management.
2020-05-26 12:08:05 +10:00
Sara Arjona
968016a38d Merge branch 'MDL-68592-master' of https://github.com/kabalin/moodle 2020-05-22 17:55:23 +02:00
Andrew Nicols
29c5fafff5 MDL-66109 js: Fix Shifter linting issues 2020-05-11 11:07:49 +08:00
Sara Arjona
271d08f37b Merge branch 'MDL-68315-master' of https://github.com/kabalin/moodle 2020-05-04 10:37:17 +02:00
Ruslan Kabalin
50bf320f4d MDL-68592 formslib: Fix inline layout for nested groups 2020-05-03 21:02:30 +01:00
Andrew Nicols
8d186121ab Merge branch 'MDL-57680' of https://github.com/timhunt/moodle 2020-05-01 11:00:19 +08:00
Davo Smith
9da975fe21 MDL-43156 core_form: fix handling of fixture form
Also moving it from behat_forms to behat_navigation
2020-04-30 20:39:24 +02:00
Davo Smith
5079271b39 MDL-43156 formslib: newly-created repeat elements get the default values 2020-04-30 20:16:07 +02:00
Tim Hunt
848a29cf51 MDL-57680 form autocomplete: extend Behat tests 2020-04-26 15:11:25 +01:00
Tim Hunt
588b86fd49 MDL-57680 form autocomplete: let singleselects be cleared.
This was already working after ajax had refreshed the choices, it was just
broken on first page load.
2020-04-26 13:23:42 +01:00
Ruslan Kabalin
52a268a09d MDL-68315 formslib: Fix completion attribute in course form element.
This fixes 'onlywithcompletion' attribute in course form element.
2020-04-03 20:33:38 +01:00
Shamim Rezaie
27d4e606de MDL-68269 form: fieldset in group elements should be full width 2020-03-30 18:29:23 +11:00