Commit Graph

5611 Commits

Author SHA1 Message Date
Tuan.Dinh 8ae7019cf8 MDL-70124 course: Activity names are now trimmed. 2021-02-11 11:12:59 +08:00
Amaia Anabitarte 248d4ff200 MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:22 +01:00
Sara Arjona 7d24686e59 Merge branch 'MDL-69308' of https://github.com/stronk7/moodle 2021-01-14 12:03:30 +01:00
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
Jake Dallimore 893411c673 Merge branch 'MDL-69431-master' of git://github.com/watson8/moodle 2021-01-12 17:08:29 +08:00
David Watson ddc0da4b31 MDL-69431 course: validate section url param against maxsections 2021-01-10 17:26:31 +00:00
Sara Arjona 6231d34a03 Merge branch 'MDL-70102-master' of https://github.com/sammarshallou/moodle 2021-01-08 15:50:08 +01:00
sam marshall b5568aad80 MDL-70102 PHPunit: Core test fails with weird added modules
Specifically it fails if the modules have unusual default capabilities
so that editingteacher doesn't have addinstance.
2021-01-07 16:09:57 +00:00
Amaia Anabitarte bafdfedf9d MDL-57552 core_course: Typo in view-combined class 2021-01-04 09:48:14 +01:00
Sara Arjona 8099deda48 Merge branch 'MDL-69107-master-2' of git://github.com/andrewnicols/moodle 2020-12-18 15:22:09 +01:00
Andrew Nicols 31402aa406 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Ilya Tregubov 3952391706 MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:39:31 +02:00
Shamim Rezaie 7bd6145d13 MDL-69301 course: Remove custom keyboard navigation code 2020-12-02 22:57:44 +11:00
Andrew Nicols 0d580d2b3e MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:01:19 +08:00
Andrew Nicols ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Marina Glancy 7fb6ce765f MDL-70023 core_course: improve performance of recently accessed courses 2020-11-05 09:56:01 +01:00
Michael Hawkins d1f0ca6e3c MDL-70033 course: Update download content event handling for Classic 2020-11-03 11:53:57 +08:00
Michael Hawkins 4a81496e28 MDL-69559 course: Fix course download cap checks when creating courses 2020-10-27 12:04:42 +08:00
Michael Hawkins c2b115f829 MDL-69559 course: Fixed behat navigation in download course content 2020-10-27 07:52:18 +08:00
Adrian Greeve e1eba7fa9b MDL-69559 core_course: Fix to bad behat test formatting. 2020-10-26 13:24:12 +08:00
Michael Hawkins 840bcd8810 MDL-69559 course: Add course setting and cap to control course downloads 2020-10-26 10:00:47 +08:00
Michael Hawkins d661b1148b MDL-69559 course: Add course content download UI and execution page 2020-10-26 10:00:47 +08:00
Michael Hawkins 11456d71f0 MDL-69559 admin: Add course download admin settings and lang strings 2020-10-26 10:00:47 +08:00
Sara Arjona ca2db4be71 Merge branch 'MDL-67673' of https://github.com/stronk7/moodle into master 2020-10-21 17:38:05 +02: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) 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
Jake Dallimore 127befd73b Merge branch 'MDL-69902' of https://github.com/marinaglancy/moodle 2020-10-21 10:57:15 +08:00
Jake Dallimore 3d0f28ebb8 Merge branch 'MDL-69751-master' of git://github.com/mihailges/moodle 2020-10-21 10:05:16 +08:00
Mihail Geshoski 2939efff84 MDL-69751 course: Handle missing guest user context
Makes sure the guest user context exists when fetching
the recommended modules. If the context does not exist
an exception is being thrown describing the problem.
2020-10-20 08:31:43 +08:00
Luca Bösch 531ce52940 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-16 14:50:21 +02:00
Marina Glancy be53990301 MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:53:24 +02:00
Sara Arjona f25dba2de1 Merge branch 'MDL-64657-master' of git://github.com/jleyva/moodle into master 2020-10-08 14:15:26 +02:00
Víctor Déniz 7a8950c172 Merge branch 'MDL-69625' of https://github.com/paulholden/moodle 2020-10-05 19:22:03 +01:00
Jun Pataleta cc7c3b3e25 Merge branch 'MDL-69704-master' of git://github.com/sarjona/moodle 2020-10-05 23:13:08 +08:00
Paul Holden d178779851 MDL-69625 course: return raw custom field value in external method.
For clients that wish to consume the original value of the custom
field (e.g. timestamps for date fields), rather than the formatted
version, add a new "valueraw" property to the returned data.
2020-10-05 10:39:31 +01:00
Sara Arjona 64fbd346ba MDL-69704 course: catch exception when calling get_course_content_items
When plugins are removed from disk, an exception is thrown when
calling component_callback_exists.
This exception should be catched here in order to load properly
the activity chooser (otherwise, the exception will be displayed
and no activity will appear).
2020-10-01 19:54:35 +02:00
Sara Arjona 6bb0262ed8 Merge branch 'MDL-68098-master' of git://github.com/dpalou/moodle into master 2020-10-01 12:56:16 +02:00
Nathan Nguyen 10db3a0b0a MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable 2020-09-30 16:02:39 +10:00
Sara Arjona 8223718081 Merge branch 'MDL-68935-master' of git://github.com/jleyva/moodle into master 2020-09-28 11:40:37 +02:00
Juan Leyva d6c289c5e3 MDL-64657 course: Return hidden section names when configured 2020-09-22 11:52:18 +02:00
Dani Palou 8c84eeeeac MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-22 09:43:03 +02:00
Bas Brands c549ca5d35 MDL-69454 core_search: consistent activity chooser search 2020-09-21 11:54:53 +02:00
Bas Brands d5593b18c2 MDL-69454 core_search: consistent course management search 2020-09-21 10:15:11 +02:00
Bas Brands 968cd48336 MDL-69454 core_search: consistent frontpage course search 2020-09-21 10:15:11 +02:00
Juan Leyva 35101a6a2c MDL-68935 course: Return context data in get_content WS 2020-09-16 12:32:22 +02:00
Stephen Bourget 1a453e4d8d MDL-69630 format_social: Add ajax support 2020-09-10 19:04:34 -04:00
Eloy Lafuente (stronk7) 432b9a9075 MDL-69521 core: Move all comments in code from 4.3 to 4.1 2020-09-08 18:59:46 +02:00