80 Commits

Author SHA1 Message Date
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_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 lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Eloy Lafuente (stronk7)
81407f18ec MDL-71036 phpunit: Mock->setMethods() silently deprecated
The current ->setMethods() has been silently (won't emit any
warning) in PHPUnit 9. And will stop working (current plans)
in PHPUnit 10.

Basically the now deprecated method has been split into:

- onlyMethods(): To point to existing methods in the mocked artifact.
- addMethods(): To point to non existing (yet) methods in the mocked
  artifact.

In practice that means that all our current setMethods() calls can be
converted to onlyMethods() (existing) and done. The addMethods() is
mostly useful on development phases, not final testing.

Finally note that <null> isn't accepted anymore as parameter to
double all the methods. Instead empty array [] must be used.

Link: https://github.com/sebastianbergmann/phpunit/issues/3770
2021-03-11 23:04:31 +01:00
Sara Arjona
1fa9fe25dc Merge branch 'MDL-70608-master-langimportasync' of git://github.com/mudrd8mz/moodle 2021-03-09 16:42:52 +01:00
David Mudrák
af9ad8b2b6 MDL-70608 lang: Recommend running the scheduled task to update packs 2021-02-19 16:02:02 +01:00
David Mudrák
c85215e955 MDL-70608 lang: Install langpacks asynchronously via ad hoc task
When multiple language packs are selected for installation, perform the
installation asynchronously in the background via ad hoc task.
2021-02-19 16:02:02 +01:00
Brendan Heywood
17e465ca85 MDL-70768 tool_langimport: Make installed admin UI more consistent 2021-02-11 10:43:19 +11:00
Paul Holden
3f36a7da98 MDL-70632 tool_langimport: search for available language packs. 2021-02-03 10:03:37 +00:00
Paul Holden
cbd719556e MDL-70558 tool_langimport: sort available language packs. 2021-01-04 23:53:05 +00: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)
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
Andrew Nicols
f24aae4cad Merge branch 'MDL-67735-master' of git://github.com/bmbrands/moodle 2020-08-19 08:28:49 +08:00
Eloy Lafuente (stronk7)
fbb0767536 MDL-69475 versions: bump all versions and requires in master
version = 2021052500 release version
requires= 2021052500 same than version

Why 20210525? (25th May 2021) ?

Because master is going to be Moodle 4.0, to be released
on November 2021. And, until then, we are going to have
a couple of "intermediate" releases:

- Moodle 3.10 to be released 9th November 2020. (2020110900)

  This version will be using versions from today to 2020110900
  (once it's released the YYYYMMDD part stops advancing).

- Moodle 3.11 to be released 10th May 2021. (2021051000)

  This version will be using versions from 3.10 release to 2021051000
  (once it's released the YYYYMMDD part stops advancing).

That means that all versions from today to 2021051000 are going
to be used by those 2 "intermediate" releases (3.10 and 3.11).

And we cannot use them in master, because it's forbidden to have
any overlapping of versions between branches (or different upgrade
paths will fail).

So, get that 2021051000, let's add it a couple of weeks to cover
the on-sync period (or a 2 weeks delay max!) and, the first version
that master can "own" in exclusive (without any overlap) is, exactly,
25th May 2021, hence our 20210525.
2020-08-18 00:47:15 +02:00
Bas Brands
4394f9e358 MDL-67735 theme_boost: remove bs2 and bs4alpha compatibility css 2020-08-17 08:16:42 +00:00
Eloy Lafuente (stronk7)
115cc0214f MDL-68973 versions: bump all versions and requires near release
version = 2020061500 release version
requires= 2020060900 current rc1 (week7roll1) version
2020-06-09 16:23:09 +02:00
Eloy Lafuente (stronk7)
d5be859063 MDL-67199 versions: bump all versions and requires near release
version = 2019111800 release version
requires= 2019111200 current beta (week7roll1) version
2019-11-12 17:57:08 +01:00
Eloy Lafuente (stronk7)
c9a1a6341c MDL-65571 versions: bump all versions and requires near release
version = 2019052000 release version
requires= 2019051100 current beta (week6roll2) version
2019-05-12 23:46:34 +02:00
Mathew May
5cac5fa428 MDL-64506 templates: BS2 m-x-x to BS4 mx-x 2019-04-03 19:47:11 +08:00
Mathew May
29551c4b1a MDL-64506 templates: Move BS2 btns' to BS4 btns'
well bs2 class is now card in bs4
2019-04-03 19:34:20 +08:00
Mathew May
6ecc445939 MDL-64506 templates: Remove BS2 spans from elements. 2019-04-03 19:34:20 +08:00
Julien Boulen
1a549472fa MDL-62728 lang: display a warning when missing some locales on server 2019-02-15 09:53:00 +01:00
Eloy Lafuente (stronk7)
085353b315 MDL-64282 versions: bump all versions and requires near release
version = 2018120300 release version
requires= 2018112800 current rc2 (week7roll1) version
2018-11-29 18:24:08 +01:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
Eloy Lafuente (stronk7)
57ea6753d3 MDL-62361 versions: bump all versions and requires near release
version = 2018051400 release version
requires= 2018050800 current beta+ (week4roll1) version
2018-05-09 02:46:30 +02:00
Zig Tan
de33cd0cab MDL-61892 admin/tools: Implement null privacy providers 2018-04-20 11:41:20 +08:00
Eloy Lafuente (stronk7)
ba854606e6 MDL-60764 versions: bump all versions and requires near release
version = 2017111300 release version
requires= 2017110800 current rc2 version
2017-11-10 02:52:53 +01:00
David Mudrák
64b6651cfa MDL-59269 lang: Fix ability to uninstall certain language packs
In the issue MDL-39319 (6ddf92c77), the ability to uninstall multiple
language packs at once was added. By a mistake, the PARAM_ALPHAEXT was
used as paramater type for the dash-separated list of language packs to
be uninstalled. Language packs with a number in the name (such as
en_us_k12) do not pass the ALPHAEXT cleaning.

This patch changes the parameter cleaning to PARAM_SAFEPATH which is
more appropriate for the given scenario as language code themselves must
be SAFEDIRs.
2017-06-16 14:15:25 +02:00
Eloy Lafuente (stronk7)
d989ee1e03 MDL-58853 versions: bump all versions and requires near release
version = 2017051500 release version
requires= 2017050500 current rc1 version
2017-05-09 02:58:28 +02:00
Eloy Lafuente (stronk7)
777361983c Merge branch 'wip-mdl-56519-m' of https://github.com/rajeshtaneja/moodle 2017-01-11 02:42:29 +01:00
Jun Pataleta
3adf4b1837 MDL-57149 admin: Make langimport page Bootstrap-compatible
* Create template for the language import page.
* Apply Bootstrap classes to form elements.
* Use core notifications for displaying error/success messages.
2017-01-10 10:24:17 +08:00
Rajesh Taneja
57bee542ab
MDL-56519 behat: Fixed lint errors 2017-01-03 09:12:54 +08:00
David Mudrák
cb425a917f MDL-56527 admin: Improve the error message if download is not available
The previous string did not actually contain a link where the lang pack
could be downloaded from.
2016-12-09 11:22:12 +01:00
Eloy Lafuente (stronk7)
04649747a4 MDL-57197 versions: bump all versions and requires near release
version = 2016120500 release version
requires= 2016112900 current rc4 version
2016-11-29 22:57:05 +01:00
Neill Magill
6a6f2e1ca6 MDL-56133 tool_langimport: Changes should be visible after import
Before this change if a language pack was updated by the
\tool_langimport\task\update_langpacks_task scheduled task, changes
would not be available to users until an admin manually cleared the
strings cache.

This change causes the cache to purged when a language pack it update,
this will cause it to rebuild so users will start seeing updates
automatically.
2016-11-08 10:56:56 +00:00
Dan Poltawski
bc33e9bd3f MDL-55168 css: reformat plain css with stylefmt 2016-09-30 09:25:23 +01:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
Rajesh Taneja
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
Dan Poltawski
0a7051ff5a MDL-50829 lang: fix to RTL/LTR bracket confusion
Thanks to ISHIKAWA Takayuki for the initial patch
2015-12-29 12:30:18 +00:00
Eloy Lafuente (stronk7)
2e144835bb MDL-52059 versions: bump all versions and requires near release
version = planned 2015111600 release version
requires= current 2015111000 rc3 version
2015-11-10 12:33:52 +01:00
David Mudrák
e8b75e6292 MDL-52018 lang: Fix behat tests to use the new strings 2015-11-02 22:30:46 +01:00
Helen Foster
da6ecfd8c1 MDL-52018 lang: Merge English strings from the en_fix language pack 2015-11-02 22:12:06 +01:00
Mark Nelson
607021c14b MDL-46455 events: added more mapping
Also fixed a few bugs.
2015-10-11 18:52:36 -07:00
David Mudrák
f729af1609 MDL-51148 tool_langimport: Use the amended string in Behat test 2015-08-26 17:03:36 +02:00
Helen Foster
ce2c0f3a74 MDL-51148 lang: Merge English strings from the en_fix language pack 2015-08-26 16:46:43 +02:00
Dan Poltawski
559c0f09bd MDL-39319 langimport: fix language file ordering and trailing whitespace 2015-07-01 11:06:33 +02:00
Martin Mastny
96a2e00d42 MDL-39319 langimport: Javascript confirmation when uninstalling 2015-05-29 13:08:33 +08:00
Martin Mastny
6ddf92c774 MDL-39319 langimport: Able to delete more languages at once 2015-05-29 13:08:33 +08:00