1622 Commits

Author SHA1 Message Date
Mathew May
b983003e2e MDL-70197 navigation: Remove old navigation elements and migrate behat 2021-11-29 15:47:42 +08:00
Peter Dias
f3ee54ae04 MDL-71914 mod_glossary: Updated glossary behat tests 2021-10-26 11:21:32 +08:00
Peter Dias
10b7badd61 MDL-71914 mod_glossary: Add tertiary nav in glossary 2021-10-26 11:21:32 +08:00
Peter
7a9e3db9dc MDL-52206 completion: Behat test
Co-authored-by: aanabit
2021-10-07 10:17:25 +08:00
Peter Dias
2c7893cf9f MDL-52206 core: Update new activity_custom_completion
Update the custom_completion classes to accept the new completion
criteria
2021-10-04 19:45:47 +08:00
Andrew Nicols
a096fb5998 Merge branch 'MDL-72673-master' of git://github.com/junpataleta/moodle 2021-10-01 10:21:30 +08:00
Bas Brands
350797397e MDL-71610 core_behat: access site admin manage tags link 2021-09-29 09:25:36 +02:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Jun Pataleta
8c180760eb MDL-72673 mod_glossary: Generate unique ID for Keywords select element 2021-09-24 18:30:49 +08:00
Mathew May
1f6bcd7eae MDL-69588 accessibility: Address review points 2021-08-23 17:47:24 +08:00
Adrian Greeve
f28535082c MDL-70196 behat: Add a new step for navigating with the navbar.
- Part of: MDL-69588
A lot of tests work on the basis that you can follow the last item
of the breadcrumb nav bar. This is not the case. This step will first
check to see if the page is already the one requested. If it is then
nothing further needs to happen, otherwise we follow the link in the
navbar.
2021-08-23 17:46:38 +08:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +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
Jake Dallimore
c7c186681a Merge branch 'MDL-27193_glossaryDB' of https://github.com/andyjdavis/moodle 2021-05-06 09:49:14 +08:00
Andrew Davis
e34553d1b8 MDL-27193 mod_glossary: reducing system setting db queries 2021-05-05 23:13:53 +08:00
Eloy Lafuente (stronk7)
9b522367a0 Merge branch 'MDL-71425-master-enfix' of git://github.com/mudrd8mz/moodle 2021-05-04 23:39:32 +02:00
Eloy Lafuente (stronk7)
21e3cf71bc Merge branch 'MDL-71397-master' of git://github.com/marinaglancy/moodle 2021-05-04 23:37:33 +02:00
David Mudrák
ad30fde448 MDL-71425 lang: Fix reworded strings in tests 2021-05-04 17:45:18 +02:00
Jun Pataleta
fd8544b37c Merge branch 'MDL-71401-master-3' of git://github.com/mickhawkins/moodle 2021-05-04 12:26:34 +08:00
Michael Hawkins
7c368add9c MDL-71401 mod_glossary: Update completion behat to test all changes 2021-05-04 12:19:29 +08:00
Víctor Déniz
6d3107641d Merge branch 'MDL-71189-master-3' of git://github.com/mickhawkins/moodle 2021-05-03 08:08:34 +01:00
Michael Hawkins
b77c66ac10 MDL-71189 core_completion: Adding completion sort order to activities
This implements sort ordering for all completion conditions, in
activities which support custom completion conditions.
2021-05-03 13:36:11 +08:00
Ilya Tregubov
cf1cf222e7 MDL-66431 core: Fix behat tests.
Move activity creation to data generators. Only fixing those
tests failing due to removing usemodchooser preference.
2021-05-01 16:22:03 +02:00
Michael Hawkins
4bf3b7a48d MDL-71162 mod_glossary: Add behat testing for completion conditions 2021-04-29 00:41:07 +08:00
Sara Arjona
12f64a02c9 Merge branch 'MDL-71144-master' of git://github.com/rezaies/moodle 2021-04-23 13:16:01 +02:00
Marina Glancy
4d2c96861d MDL-71397 mod_glossary: empty category is the same as all categories
In PHP8 empty string is not equal to zero
2021-04-23 11:46:01 +02:00
Shamim Rezaie
5f9aa4d35f MDL-71144 mod_glossary: Deprecate glossary_get_completion_state() 2021-04-22 10:08:10 +10:00
Luca Bösch
aee27d0a9b MDL-71118 core: Add grade (verb) string.
AMOS BEGIN
 CPY [grade,core],[gradenoun,core]
 CPY [grade,core],[gradeverb,core]
AMOS END
2021-04-17 11:46:09 +02:00
Andrew Nicols
c10791cab9 Merge branch 'MDL-71169-master-execute' of git://github.com/mudrd8mz/moodle 2021-04-14 08:35:07 +08:00
Adrian Greeve
83b71194cd Merge branch 'MDL-71161-master-4' of git://github.com/junpataleta/moodle 2021-04-13 11:42:30 +08:00
Simey Lameze
1e459102e4 MDL-71161 mod_glossary: show glossary activity info 2021-04-13 01:21:12 +08:00
Simey Lameze
d8e2ca0aae MDL-70820 mod_glossary: custom completion implementation 2021-04-07 12:17:30 +08:00
sam marshall
5e72715e4f MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API
(core_user) instead of within the 'core' API, since it is
directly related to user data.

Since the class has only just been added to Moodle, now is a good
time to move it.
2021-03-25 13:47:23 +00:00
David Mudrák
22ecf2f9b8 MDL-71169 external: Do not explicitly specify the default methodname 2021-03-22 15:56:46 +01:00
Eloy Lafuente (stronk7)
cfba0366db Merge branch 'MDL-70893-master' of git://github.com/marinaglancy/moodle 2021-03-18 00:23:26 +01:00
Eloy Lafuente (stronk7)
ba5b6089d5 MDL-71036 phpunit: Renamed various regexp-related assertions
In PHPUnit 9.1, the following regexp-related assertions
have been deprecated and there are new alternatives for
all them:
    - assertRegExp()     -> assertMatchesRegularExpression()
    - assertNotRegExp()  -> assertDoesNotMatchRegularExpression()

This is about to, simply, move all cases to the new alternatives.

Source: https://github.com/sebastianbergmann/phpunit/blob/9.1.0/ChangeLog-9.1.md

Regexp to find all them:

    ag 'assertRegExp|assertNotRegExp' -li
2021-03-11 19:22:24 +01:00
sam marshall
558cc1b85e MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making
the code completely horrible. For example, there are many instances
where it would probably be better to rewrite a query entirely, but
I have not done that (in order to reduce the risk of changes).
2021-03-10 10:57:10 +00:00
Marina Glancy
0eada7a5f9 MDL-70893 various: optional function arguments must be in the end 2021-02-15 16:53:37 +01:00
Luca Bösch
f37dbcc15b MDL-70621 mod_glossary: use glossary rsstype string. 2021-02-03 08:33:54 +01:00
Sujith Haridasan
7b3f43db95 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:07:53 +05:30
Eloy Lafuente (stronk7)
77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Eloy Lafuente (stronk7)
3a5641cb74 MDL-67673 phpunit: Remove deprecated assertEquals() params
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):

- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.

More info @ https://github.com/sebastianbergmann/phpunit/issues/3341

Initial search done with:

ag 'assert(Not)?Equals\(.*,.*,' --php

Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02: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)
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
Juan Leyva
1a09fc8d34 MDL-63805 glossary: New WS mod_glossary_prepare_entry_for_edition 2020-10-14 12:46:41 +02:00
Juan Leyva
b4a30d7acc MDL-63805 glossary: New WS mod_glossary_update_entry 2020-10-14 12:46:41 +02:00
Juan Leyva
3f5d99063b MDL-63805 glossary: Glossary API refactor 2020-10-14 12:46:41 +02:00
Juan Leyva
8441d551ea MDL-63806 glossary: New WS mod_glossary_delete_entry 2020-10-09 09:42:56 +02:00
Juan Leyva
f9b56649e7 MDL-63806 glossary: Return user permissions for entries in WS 2020-10-09 09:42:56 +02:00