Commit graph

5610 commits

Author SHA1 Message Date
Marina Glancy
9f47d93ba6 MDL-64554 core_customfield: use modal forms for fields 2021-02-17 18:09:41 +01:00
Tuan.Dinh
8aab39c1d2 MDL-70124 course: Activity names are now trimmed. 2021-02-11 11:11:12 +08:00
Amaia Anabitarte
a3d8c4a54c MDL-70732 behat: Adding second parameter to ExpectationException() 2021-02-05 11:01:31 +01:00
Sara Arjona
1520ae2cbd Merge branch 'MDL-69308_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE 2021-01-14 12:03:36 +01:00
Eloy Lafuente (stronk7)
5aed7f4217 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:28:39 +01:00
David Watson
ad590f99db MDL-69431 course: validate section url param against maxsections 2021-01-12 17:08:44 +08:00
Sara Arjona
57f38e3de2 Merge branch 'MDL-70102-m311' of https://github.com/sammarshallou/moodle into MOODLE_311_STABLE 2021-01-08 15:50:18 +01:00
sam marshall
13f8798c79 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:11:10 +00:00
Jun Pataleta
b9ca4b0e7e Merge branch 'MDL-57552-311' of git://github.com/aanabit/moodle into MOODLE_311_STABLE 2021-01-05 22:20:24 +08:00
Sara Arjona
cbee3f569c Merge branch 'MDL-69107-311-2' of git://github.com/andrewnicols/moodle into MOODLE_311_STABLE 2020-12-18 15:22:16 +01:00
Amaia Anabitarte
c94cb31678 MDL-57552 core_course: Typo in view-combined class 2020-12-17 17:12:25 +01:00
Andrew Nicols
6dae4aa3ad MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Ilya Tregubov
ef27ea9f90 MDL-70261 course: Allow update locked course custom fields
on course upload.
2020-12-15 14:39:56 +02:00
Shamim Rezaie
049e9e835c MDL-69301 course: Remove custom keyboard navigation code 2020-12-03 04:21:53 +11:00
Andrew Nicols
94a492a0f4 MDL-67668 behat: Update tests for inplace editable field type 2020-11-23 09:00:46 +08:00
Andrew Nicols
5b9b1f07e6 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Eloy Lafuente (stronk7)
28b14d17c2 Merge branch 'MDL-70023-310' of git://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-11-11 23:57:25 +01:00
Eloy Lafuente (stronk7)
4aa83d92bf MDL-70146 upgrade: add 3.10.0 separation line to all upgrade scripts 2020-11-07 23:26:09 +01:00
Marina Glancy
65d419b204 MDL-70023 core_course: improve performance of recently accessed courses 2020-11-05 09:55:15 +01:00
Eloy Lafuente (stronk7)
b0a1b4ce8b MDL-70089 versions: bump all versions and requires near release
version = 2020110900 release version
requires= 2020110300 current beta+ (week6roll1) version

Note that, because we are under parallel development period,
this is being done in the branch that is going to be released
(MOODLE_310_STABLE already existing) for Moodle 3.10.0 and
not in master, that is the one getting the bump under normal
(non-parallel) periods.
2020-11-03 19:34:52 +01:00
Michael Hawkins
60585523ad MDL-70033 course: Update download content event handling for Classic 2020-11-03 11:54:56 +08:00
Michael Hawkins
fbac2e9296 MDL-69559 course: Fix course download cap checks when creating courses 2020-10-27 12:01:09 +08:00
Michael Hawkins
7d52d5def6 MDL-69559 course: Fixed behat navigation in download course content 2020-10-27 08:01:48 +08:00
Adrian Greeve
750fe24949 MDL-69559 core_course: Fix to bad behat test formatting. 2020-10-26 13:28:10 +08:00
Michael Hawkins
d358b91e2b MDL-69559 course: Add course setting and cap to control course downloads 2020-10-26 10:25:37 +08:00
Michael Hawkins
c053b93f0c MDL-69559 course: Add course content download UI and execution page 2020-10-26 10:19:39 +08:00
Michael Hawkins
fab34222ca MDL-69559 admin: Add course download admin settings and lang strings 2020-10-26 10:19:27 +08:00
Sara Arjona
b13ec3c353 Merge branch 'MDL-67673_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-10-21 17:38:16 +02:00
Eloy Lafuente (stronk7)
46606b3ddd 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:05 +02:00
Eloy Lafuente (stronk7)
35bc26b516 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:05 +02:00
Eloy Lafuente (stronk7)
ddf72dd60d 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:05 +02:00
Eloy Lafuente (stronk7)
a6674bf8a4 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:46:05 +02:00
Eloy Lafuente (stronk7)
d81a94807b 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:46:04 +02:00
Jake Dallimore
2ced8c6674 Merge branch 'MDL-69902-310' of https://github.com/marinaglancy/moodle into MOODLE_310_STABLE 2020-10-21 10:57:35 +08:00
Jake Dallimore
17056bf206 Merge branch 'MDL-69751-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE 2020-10-21 10:02:47 +08:00
Mihail Geshoski
3c315a874a 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:39:17 +08:00
Luca Bösch
91557080d7 MDL-65448 core_course: Restyle non-JS activity moving. 2020-10-16 14:50:10 +02:00
Marina Glancy
d103bdba3d MDL-69902 core_search: fix error in the custom fields indexing 2020-10-09 08:52:47 +02:00
Sara Arjona
8e5b007c3e Merge branch 'MDL-64657-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-10-08 14:15:38 +02:00
Víctor Déniz
3277fc9db6 Merge branch 'MDL-69625-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-10-05 19:21:12 +01:00
Jun Pataleta
41bc6b9400 Merge branch 'MDL-69704-310' of git://github.com/sarjona/moodle into MOODLE_310_STABLE 2020-10-05 23:12:57 +08:00
Paul Holden
b9f8e3e114 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:40:33 +01:00
Sara Arjona
d12c1406df 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:56:34 +02:00
Sara Arjona
e2a73965ca Merge branch 'MDL-68098-310' of git://github.com/dpalou/moodle into MOODLE_310_STABLE 2020-10-01 12:56:23 +02:00
Nathan Nguyen
85f136094b MDL-69573 core_course: Make MAX_COURSES_IN_CATEGORY configurable 2020-09-30 16:04:55 +10:00
Sara Arjona
27b1425eb2 Merge branch 'MDL-68935-310' of git://github.com/jleyva/moodle into MOODLE_310_STABLE 2020-09-28 11:41:01 +02:00
Bas Brands
9d82cdb62e MDL-69454 core_search: consistent activity chooser search 2020-09-23 17:36:15 +02:00
Bas Brands
b5e39191fc MDL-69454 core_search: consistent course management search 2020-09-23 17:36:14 +02:00
Bas Brands
42c1cf3b03 MDL-69454 core_search: consistent frontpage course search 2020-09-23 17:36:14 +02:00
Dani Palou
f4bdb898c7 MDL-68098 ws: Fix WebServices broken by filters HTML 2020-09-23 12:08:40 +02:00