moodle.git
13 months agoMDL-69166 core_payment: archiving accounts, triggering events, tests
Marina Glancy [Fri, 2 Oct 2020 06:01:56 +0000 (16:01 +1000)]
MDL-69166 core_payment: archiving accounts, triggering events, tests

13 months agoMDL-69166 core_payment: Show cost on the modal when no gateway is chosen
Shamim Rezaie [Thu, 1 Oct 2020 14:53:54 +0000 (00:53 +1000)]
MDL-69166 core_payment: Show cost on the modal when no gateway is chosen

13 months agoMDL-69166 core_payment: improvements to api, small fixes
Marina Glancy [Wed, 30 Sep 2020 17:21:30 +0000 (19:21 +0200)]
MDL-69166 core_payment: improvements to api, small fixes

13 months agoMDL-69166 core_payment: add payment accounts
Marina Glancy [Tue, 29 Sep 2020 17:27:37 +0000 (19:27 +0200)]
MDL-69166 core_payment: add payment accounts

13 months agoMDL-69166 enrol_fee: Show a warning when no currency is supported
Shamim Rezaie [Wed, 30 Sep 2020 03:24:43 +0000 (13:24 +1000)]
MDL-69166 enrol_fee: Show a warning when no currency is supported

13 months agoMDL-69166 enrol_fee: Prevent adding instance if no currency is supported
Shamim Rezaie [Wed, 30 Sep 2020 01:48:58 +0000 (11:48 +1000)]
MDL-69166 enrol_fee: Prevent adding instance if no currency is supported

13 months agoMDL-69166 pg_paypal: only prevent closing during autorisation
Shamim Rezaie [Tue, 29 Sep 2020 11:33:16 +0000 (21:33 +1000)]
MDL-69166 pg_paypal: only prevent closing during autorisation

13 months agoMDL-69166 core-payment: Autoselect gateway when there is only one
Shamim Rezaie [Tue, 29 Sep 2020 11:32:13 +0000 (21:32 +1000)]
MDL-69166 core-payment: Autoselect gateway when there is only one

13 months agoMDL-69166 core_payment: payment gateways can have a surcharge
Shamim Rezaie [Tue, 30 Jun 2020 07:37:50 +0000 (17:37 +1000)]
MDL-69166 core_payment: payment gateways can have a surcharge

13 months agoMDL-69166 core_payment: show cost on the modal
Shamim Rezaie [Tue, 30 Jun 2020 07:14:38 +0000 (17:14 +1000)]
MDL-69166 core_payment: show cost on the modal

13 months agoMDL-69166 pg_paypal: capture payment directly
Shamim Rezaie [Fri, 17 Jan 2020 16:20:41 +0000 (03:20 +1100)]
MDL-69166 pg_paypal: capture payment directly

13 months agoMDL-69166 pg_paypal: New helper to get order details from PayPal
Shamim Rezaie [Fri, 17 Jan 2020 16:08:02 +0000 (03:08 +1100)]
MDL-69166 pg_paypal: New helper to get order details from PayPal

13 months agoMDL-69166 core_form: allow modals to prevent closing on accidental click
Marina Glancy [Fri, 17 Jan 2020 13:25:53 +0000 (00:25 +1100)]
MDL-69166 core_form: allow modals to prevent closing on accidental click

13 months agoMDL-69166 core_payment: ES6-ifying modal_gateways
Shamim Rezaie [Wed, 15 Jan 2020 13:22:05 +0000 (00:22 +1100)]
MDL-69166 core_payment: ES6-ifying modal_gateways

13 months agoMDL-69166 core_payment: Use a custom modal type for gateway selector
Shamim Rezaie [Wed, 15 Jan 2020 11:48:26 +0000 (22:48 +1100)]
MDL-69166 core_payment: Use a custom modal type for gateway selector

13 months agoMDL-69166 pg_paypal: Support multiple currencies on the same page
Shamim Rezaie [Wed, 15 Jan 2020 04:58:32 +0000 (15:58 +1100)]
MDL-69166 pg_paypal: Support multiple currencies on the same page

13 months agoMDL-69166 enrol_fee: use template for payment btn & properly format cost
Shamim Rezaie [Mon, 13 Jan 2020 17:37:01 +0000 (04:37 +1100)]
MDL-69166 enrol_fee: use template for payment btn & properly format cost

13 months agoMDL-69166 core_payment: es6-ify
Shamim Rezaie [Sun, 12 Jan 2020 14:31:44 +0000 (01:31 +1100)]
MDL-69166 core_payment: es6-ify

13 months agoMDL-69166 core_payment: add a callback for when payment is done
Shamim Rezaie [Sat, 11 Jan 2020 19:28:34 +0000 (06:28 +1100)]
MDL-69166 core_payment: add a callback for when payment is done

13 months agoMDL-69166 pg_paypal: Display PayPal buttons in a modal
Shamim Rezaie [Fri, 10 Jan 2020 18:34:47 +0000 (05:34 +1100)]
MDL-69166 pg_paypal: Display PayPal buttons in a modal

13 months agoMDL-69166 pg_paypal: handle paypal checkout callbacks
Shamim Rezaie [Fri, 10 Jan 2020 08:30:07 +0000 (19:30 +1100)]
MDL-69166 pg_paypal: handle paypal checkout callbacks

13 months agoMDL-69166 pg_paypal: Ability to connect to sandbox or live environment
Shamim Rezaie [Fri, 10 Jan 2020 07:59:58 +0000 (18:59 +1100)]
MDL-69166 pg_paypal: Ability to connect to sandbox or live environment

13 months agoMDL-69166 pg_paypal: Process after payment
Shamim Rezaie [Wed, 8 Jan 2020 17:06:44 +0000 (04:06 +1100)]
MDL-69166 pg_paypal: Process after payment

13 months agoMDL-69166 core_payment: Save general payment information
Shamim Rezaie [Wed, 8 Jan 2020 16:45:51 +0000 (03:45 +1100)]
MDL-69166 core_payment: Save general payment information

13 months agoMDL-69166 pg_paypal: paypal helper class to work with API
Shamim Rezaie [Wed, 8 Jan 2020 15:57:11 +0000 (02:57 +1100)]
MDL-69166 pg_paypal: paypal helper class to work with API

13 months agoMDL-69166 enrol_fee: Implement callback functions for payment subsystem
Shamim Rezaie [Wed, 8 Jan 2020 14:43:51 +0000 (01:43 +1100)]
MDL-69166 enrol_fee: Implement callback functions for payment subsystem

13 months agoMDL-69166 core_payment: helper methods to get cost and to deliver order
Shamim Rezaie [Wed, 8 Jan 2020 14:41:12 +0000 (01:41 +1100)]
MDL-69166 core_payment: helper methods to get cost and to deliver order

Also create the infrastructure to let components know when they have to
deliver what they sold. We are going to use namespace functions instead
of traditional callbacks.

13 months agoMDL-69166 enrol_fee: set a description for enrolment
Shamim Rezaie [Mon, 6 Jan 2020 08:48:08 +0000 (19:48 +1100)]
MDL-69166 enrol_fee: set a description for enrolment

13 months agoMDL-69166 core_payment: send a purchase description to payment gateways
Shamim Rezaie [Mon, 6 Jan 2020 08:54:31 +0000 (19:54 +1100)]
MDL-69166 core_payment: send a purchase description to payment gateways

We truncate description to 127 chars as per PayPal requirement

13 months agoMDL-69166 pg_paypal: render PayPal buttons and set up transaction
Shamim Rezaie [Fri, 3 Jan 2020 09:07:51 +0000 (20:07 +1100)]
MDL-69166 pg_paypal: render PayPal buttons and set up transaction

We truncate brand_name to 127 chars as per PayPal requirement.

13 months agoMDL-69166 pg_paypal: WS and AMD to return some settings to be used in js
Shamim Rezaie [Tue, 29 Sep 2020 11:21:33 +0000 (21:21 +1000)]
MDL-69166 pg_paypal: WS and AMD to return some settings to be used in js

13 months agoMDL-69166 core_payment: post to process payment
Shamim Rezaie [Fri, 27 Dec 2019 13:19:21 +0000 (00:19 +1100)]
MDL-69166 core_payment: post to process payment

13 months agoMDL-69166 core_payment: display an image for each gateway
Shamim Rezaie [Mon, 29 Jun 2020 20:34:14 +0000 (06:34 +1000)]
MDL-69166 core_payment: display an image for each gateway

13 months agoMDL-69166 core_payment: some basic styling
Shamim Rezaie [Fri, 27 Dec 2019 01:00:06 +0000 (12:00 +1100)]
MDL-69166 core_payment: some basic styling

13 months agoMDL-69166 core_payment: display the gateways modal
Shamim Rezaie [Wed, 29 Jan 2020 08:11:37 +0000 (19:11 +1100)]
MDL-69166 core_payment: display the gateways modal

13 months agoMDL-69166 core_payment: WS to get list of gateways supporting a currency
Shamim Rezaie [Wed, 29 Jan 2020 08:09:53 +0000 (19:09 +1100)]
MDL-69166 core_payment: WS to get list of gateways supporting a currency

13 months agoMDL-69166 enrol_fee: An enrolment plugin that supports payments
Shamim Rezaie [Mon, 16 Dec 2019 12:14:14 +0000 (23:14 +1100)]
MDL-69166 enrol_fee: An enrolment plugin that supports payments

13 months agoMDL-69166 pg_paypal: A new payment gateway is born
Shamim Rezaie [Mon, 16 Dec 2019 12:14:51 +0000 (23:14 +1100)]
MDL-69166 pg_paypal: A new payment gateway is born

13 months agoMDL-69166 core: list settings page in the admin tree
Shamim Rezaie [Mon, 16 Dec 2019 12:58:11 +0000 (23:58 +1100)]
MDL-69166 core: list settings page in the admin tree

13 months agoMDL-69166 core_payment: basic gateway skeleton
Shamim Rezaie [Mon, 16 Dec 2019 14:21:47 +0000 (01:21 +1100)]
MDL-69166 core_payment: basic gateway skeleton

13 months agoMDL-69166 core: define payment as a subsystem and pg as a plugin type
Shamim Rezaie [Mon, 16 Dec 2019 13:23:26 +0000 (00:23 +1100)]
MDL-69166 core: define payment as a subsystem and pg as a plugin type

13 months agoon-demand release 3.10dev+
Eloy Lafuente (stronk7) [Fri, 23 Oct 2020 12:41:20 +0000 (14:41 +0200)]
on-demand release 3.10dev+

13 months agoMerge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_310_STABLE' of https://github...
Adrian Greeve [Fri, 23 Oct 2020 01:01:59 +0000 (09:01 +0800)]
Merge branch 'MDL-67650-forced-checkbox-textarea-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-68664-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE
Víctor Déniz [Thu, 22 Oct 2020 11:25:51 +0000 (12:25 +0100)]
Merge branch 'MDL-68664-310' of git://github.com/lameze/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69553-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE
Sara Arjona [Thu, 22 Oct 2020 06:56:05 +0000 (08:56 +0200)]
Merge branch 'MDL-69553-m310' of https://github.com/NeillM/moodle into MOODLE_310_STABLE

13 months agoMDL-67650 admin: Consistently show forced config settings
Brendan Heywood [Tue, 18 Feb 2020 12:42:58 +0000 (23:42 +1100)]
MDL-67650 admin: Consistently show forced config settings

13 months agoMerge branch 'MDL-68438_310' of https://github.com/t-schroeder/moodle into MOODLE_310...
Jake Dallimore [Thu, 22 Oct 2020 01:30:48 +0000 (09:30 +0800)]
Merge branch 'MDL-68438_310' of https://github.com/t-schroeder/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69788-310' of https://github.com/paulholden/moodle into MOODLE_310_...
Adrian Greeve [Thu, 22 Oct 2020 01:07:54 +0000 (09:07 +0800)]
Merge branch 'MDL-69788-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-66392-310' of https://github.com/paulholden/moodle into MOODLE_310_...
Eloy Lafuente (stronk7) [Wed, 21 Oct 2020 17:45:26 +0000 (19:45 +0200)]
Merge branch 'MDL-66392-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE

13 months agoMDL-66392 analytics: make model output directory default to empty.
Paul Holden [Tue, 29 Sep 2020 07:57:56 +0000 (08:57 +0100)]
MDL-66392 analytics: make model output directory default to empty.

Falling back to path within $CFG->dataroot/models.

13 months agoMerge branch 'm310_MDL-68536_Notice_Undefined_Property_CFG_branch' of https://github...
Sara Arjona [Wed, 21 Oct 2020 16:32:47 +0000 (18:32 +0200)]
Merge branch 'm310_MDL-68536_Notice_Undefined_Property_CFG_branch' of https://github.com/scara/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-67673_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE
Sara Arjona [Wed, 21 Oct 2020 15:38:16 +0000 (17:38 +0200)]
Merge branch 'MDL-67673_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69392-310' of git://github.com/junpataleta/moodle into MOODLE_310_S...
Víctor Déniz [Wed, 21 Oct 2020 15:26:44 +0000 (16:26 +0100)]
Merge branch 'MDL-69392-310' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69513-dkim-settings-MOODLE_310_STABLE' of https://github.com/brenda...
Víctor Déniz [Wed, 21 Oct 2020 10:32:33 +0000 (11:32 +0100)]
Merge branch 'MDL-69513-dkim-settings-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE

13 months agoMDL-67673 phpunit: Document all the changes in upgrade.txt
Eloy Lafuente (stronk7) [Wed, 7 Oct 2020 19:33:38 +0000 (21:33 +0200)]
MDL-67673 phpunit: Document all the changes in upgrade.txt

This includes:

- Breaking changes (return void + PHP 7.1 min requirement).
- Deprecations and removals.
- Specifically DbUnit and its replacement.
- Printer showing how to rerun tests removed.

13 months agoMDL-67673 phpunit: Remove the rerun hint on failed test cases
Eloy Lafuente (stronk7) [Wed, 7 Oct 2020 18:41:44 +0000 (20:41 +0200)]
MDL-67673 phpunit: Remove the rerun hint on failed test cases

That custom printer was using some hacks to be able to intercept
configuration switches, reflection and other tricks to be able to
print the:

To re-run:
 vendor/bin/phpunit --verbose "core_setuplib_testcase" lib/tests/setuplib_test.php

line on every failed/exceptional/skipped test. After some internal
discussion it was agreed that the normal phpunit output:

1) core_setuplib_testcase::test_localcachedir
Time is lower that allowed start value
Failed asserting that 1601976686 is equal to 1601976687 or is greater than 1601976687.

/var/www/html/lib/phpunit/classes/advanced_testcase.php:446
/var/www/html/lib/tests/setuplib_test.php:170
/var/www/html/lib/phpunit/classes/advanced_testcase.php:80

has already all the information at hand about how to rerun a test:

- vendor/bin/phpunit lib/tests/setuplib_test.php
- vendor/bin/phpunit --filter core_setuplib_testcase::test_localcachedir
- vendor/bin/phpunit --filter ::test_localcachedir
- vendor/bin/phpunit --testsuite componentname_testsuite
- vendor/bin/phpunit --config <<compoenent directory>>
- use --cache-result to get failed tests rerun with ease.
- ...

So better, let's use standard phpunit output and done. Also, note that,
with the upgrade to phpunit 8.5, the printer was not working correctly
any more, causing some switches, like --verbose ... to be ignored. Sure
it could have been fixed but, as commented above, no real need for all
that "parapheranlia" to print the rerun information.

13 months agoMDL-67673 phpunit: deprecate old phpunit/dbunit stuff
Eloy Lafuente (stronk7) [Wed, 7 Oct 2020 10:02:19 +0000 (12:02 +0200)]
MDL-67673 phpunit: deprecate old phpunit/dbunit stuff

Apply the standard deprecation procedure to the old APIs, to
be removed in Moodle 4.2 (MDL-69882). Existing unit tests
cover the deprecation debugging.

Originally MDL-64600

13 months agoMDL-67673 phpunit: Move tests to use new phpunit_dataset
Eloy Lafuente (stronk7) [Sun, 4 Oct 2020 22:37:34 +0000 (00:37 +0200)]
MDL-67673 phpunit: Move tests to use new phpunit_dataset

- Make advanced_testcase old methods to use new ones internally.
- Fix advanced_testcase, statslib, mod/quiz and mod/data tests.

Originally MDL-64600

13 months agoMDL-67673 phpunit: Introduce a new, lightweight phpunit_dataset
Eloy Lafuente (stronk7) [Sun, 4 Oct 2020 15:30:44 +0000 (17:30 +0200)]
MDL-67673 phpunit: Introduce a new, lightweight phpunit_dataset

In charge of taking over the, now removed/archived, phpunit/dbunit
package. It supports loading of CSV/XML files and strings and
PHP arrays, allowing to send the loaded information to database.

Perform some basic controls about the consistency of information,
surely not super-exhaustive but fair enough.

100% covered with unit test.

Planned like an "interim" replacement for phpunit/dbunit uses in
core that, ideally, should be moved to generators stuff at some
point.

Note, expect a few tests in core to fail with this commit, I've
changed some fixtures around. Next commit will fix existing uses.

Originally MDL-64600

13 months agoMDL-67673 phpunit: Disable phpunit results cache by default
Eloy Lafuente (stronk7) [Tue, 15 Sep 2020 14:03:05 +0000 (16:03 +0200)]
MDL-67673 phpunit: Disable phpunit results cache by default

It can be enabled if desired from CLI using the --cache-result
option (or modifying the phpunit.xml cacheResult to true).

That will create the .phpunit.result.cache files that,
later, can be used to easily repeat failed (defects) tests or
run the slow ones first and more. See the --order-by option
to know more about all the available criteria. For example:

./vendor/bin/phpunit --order-by=defects --stop-on-defect

(will run all the failed ones first, stopping on problem, useful
for TDD and other scenarios, not so much for complete runs or CI).

Also, added to .gitignore so they won't be committed ever.

13 months agoMDL-67673 phpunit: Remove deprecated assertEquals() params
Eloy Lafuente (stronk7) [Tue, 1 Sep 2020 23:14:14 +0000 (01:14 +0200)]
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.

13 months agoMDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Eloy Lafuente (stronk7) [Mon, 31 Aug 2020 22:44:13 +0000 (00:44 +0200)]
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\('

13 months agoMDL-67673 phpunit: Remove deprecated non-public attribute assertions
Eloy Lafuente (stronk7) [Mon, 31 Aug 2020 22:07:51 +0000 (00:07 +0200)]
MDL-67673 phpunit: Remove deprecated non-public attribute assertions

With PHPUnit 8 a good number of assertions, all them related with
operations on non-public attributes have been deprecated. And will
be removed with PHPUnit 9.

The main point is that unit tests shouldn't be testing non-public
APIs (good practice) and those assertions were an error originally.

See https://github.com/sebastianbergmann/phpunit/issues/3338 for
the complete list and other details.

When possible (the attributes being checked are public), the change
is simple, just switching to normal assertions.

When the attributes are not public we need to find a workaround
to be able to test the same using public APIs, or use Reflection,
or remove the tests.

For the records, this is the regexp used to find all the cases:

ag '>(assertAttribute|attribute\(|readAttributte|getStaticAttribute| \
    getObjectAttribute)' -G "test.php"

13 months agoMDL-67673 phpunit: Remove expectedException annotations
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 23:19:50 +0000 (01:19 +0200)]
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)

13 months agoMDL-67673 phpunit: Remove deprecated assertArraySubset()
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 11:43:32 +0000 (13:43 +0200)]
MDL-67673 phpunit: Remove deprecated assertArraySubset()

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

assertArraySubset() is deprecated and will be removed in PHPUnit 9.

13 months agoMDL-67673 phpunit: Remove deprecated assertInternalType()
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 11:08:42 +0000 (13:08 +0200)]
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.

13 months agoMDL-67673 phpunit: phpunit_constraint_object_is_equal_with_exceptions
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 08:50:59 +0000 (10:50 +0200)]
MDL-67673 phpunit: phpunit_constraint_object_is_equal_with_exceptions

Constraints are now declared final, so we cannot extend them anymore.

Hence, instead of extending PHPUnit\Framework\Constraint\IsEqual we
are just wrapping it into our constraint.

13 months agoMDL-67673 phpunit: Fix the return type of template methods
Eloy Lafuente (stronk7) [Sun, 2 Aug 2020 08:59:12 +0000 (10:59 +0200)]
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...

13 months agoMDL-67673 phpunit: Bump to PHPUnit 8.5 and remove DBunit
Eloy Lafuente (stronk7) [Sat, 1 Aug 2020 16:15:28 +0000 (18:15 +0200)]
MDL-67673 phpunit: Bump to PHPUnit 8.5 and remove DBunit

This makes everything to break, but it's what we'll be fixing
in the next commits, heh. :-)

Generated with php72 (min version supported), following the
instructions @ https://docs.moodle.org/dev/Composer

13 months agoMDL-69788 admin: validate language menu configuration.
Paul Holden [Fri, 16 Oct 2020 07:59:53 +0000 (08:59 +0100)]
MDL-69788 admin: validate language menu configuration.

13 months agoMerge branch 'MDL-37226-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE
Jun Pataleta [Wed, 21 Oct 2020 09:46:48 +0000 (17:46 +0800)]
Merge branch 'MDL-37226-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE

13 months agoMDL-68438 message: fixed email format change with messaging disabled
Tim Schroeder [Thu, 16 Apr 2020 19:40:01 +0000 (21:40 +0200)]
MDL-68438 message: fixed email format change with messaging disabled

13 months agoMDL-69553 output: Handle pre-loading multiline string defines
Neill Magill [Mon, 24 Aug 2020 12:00:37 +0000 (13:00 +0100)]
MDL-69553 output: Handle pre-loading multiline string defines

Before this patch strings that were declared over multiple lines in
a template would not be parsed correctly.

{{#str}}value,
mod_forum{{/str}}

would have been been parsed to get_string('value', 'core')

{{#str}}
value, mod_forum
{{/str}}

would have been been parsed to get_string('', 'core')

13 months agoMDL-69553 output: Unit tests for loading multiline string defines
Neill Magill [Wed, 21 Oct 2020 07:16:35 +0000 (08:16 +0100)]
MDL-69553 output: Unit tests for loading multiline string defines

13 months agoMerge branch 'MDL-69945-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE
Jun Pataleta [Wed, 21 Oct 2020 08:03:14 +0000 (16:03 +0800)]
Merge branch 'MDL-69945-310' of git://github.com/lucaboesch/moodle into MOODLE_310_STABLE

13 months agoMDL-69392 mod_forum: Colour contrast check for locked discussions
Jun Pataleta [Mon, 5 Oct 2020 11:05:17 +0000 (19:05 +0800)]
MDL-69392 mod_forum: Colour contrast check for locked discussions

13 months agoMDL-69392 block_myoverview: Basic contrast check for the dashboard
Jun Pataleta [Mon, 5 Oct 2020 11:04:16 +0000 (19:04 +0800)]
MDL-69392 block_myoverview: Basic contrast check for the dashboard

13 months agoMDL-69392 question: Fix Try again button styling
Jun Pataleta [Mon, 5 Oct 2020 09:38:22 +0000 (17:38 +0800)]
MDL-69392 question: Fix Try again button styling

13 months agoMDL-69392 theme_boost: Improve question colour contrast
Jun Pataleta [Thu, 27 Aug 2020 14:54:48 +0000 (22:54 +0800)]
MDL-69392 theme_boost: Improve question colour contrast

* Lighten info container.
* Fix colour contrast for the question container by
  - Lightening the background a bit
  - Darkening the text colour a bit
  - Making sure the link colour has good colour contrast against the
  question text.
* Fix colour contrast for the comments container by
  - Lightening the text colour a bit
  - Darkening the link colour a bit for better colour contrast against
  the feedback text.

13 months agoMDL-69392 theme_classic: Darken red, blue and green colours
Jun Pataleta [Fri, 4 Sep 2020 03:12:16 +0000 (11:12 +0800)]
MDL-69392 theme_classic: Darken red, blue and green colours

The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)

13 months agoMDL-69392 theme_boost: Darken red, blue and green colours
Jun Pataleta [Thu, 27 Aug 2020 14:50:52 +0000 (22:50 +0800)]
MDL-69392 theme_boost: Darken red, blue and green colours

The current red, blue, and green colours achieve the minimum colour
contrast against a white background. However, when they're against
coloured background, text with these colours will easily fail the
4.5:1 contrast ratio requirement for Level AA.
The updated colours now have the following contrast ratio against a
white background:
* Blue  - #0f6fc5 (5.12:1, from 4.58:1)
* Green - #357a32 (5.27:1, from 4.63:1)
* Red   - #ca3120 (5.29:1, from 4.59:1)

13 months agoMerge branch 'MDL-69807-310' of https://github.com/paulholden/moodle into MOODLE_310_...
Adrian Greeve [Wed, 21 Oct 2020 06:18:02 +0000 (14:18 +0800)]
Merge branch 'MDL-69807-310' of https://github.com/paulholden/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-68766-M310' of https://github.com/michael-milette/moodle into MOODL...
Adrian Greeve [Wed, 21 Oct 2020 04:54:02 +0000 (12:54 +0800)]
Merge branch 'MDL-68766-M310' of https://github.com/michael-milette/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-68983-recent-session-lock-ro-MOODLE_310_STABLE' of https://github...
Jake Dallimore [Wed, 21 Oct 2020 04:45:55 +0000 (12:45 +0800)]
Merge branch 'MDL-68983-recent-session-lock-ro-MOODLE_310_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69902-310' of https://github.com/marinaglancy/moodle into MOODLE_31...
Jake Dallimore [Wed, 21 Oct 2020 02:57:35 +0000 (10:57 +0800)]
Merge branch 'MDL-69902-310' of https://github.com/marinaglancy/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-69751-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE
Jake Dallimore [Wed, 21 Oct 2020 02:02:08 +0000 (10:02 +0800)]
Merge branch 'MDL-69751-310' of git://github.com/mihailges/moodle into MOODLE_310_STABLE

13 months agoon-demand release 3.10dev+
Eloy Lafuente (stronk7) [Tue, 20 Oct 2020 22:51:10 +0000 (00:51 +0200)]
on-demand release 3.10dev+

13 months agoMDL-65448 block_site_main_menu: Restyle moving.
Luca Bösch [Mon, 19 Oct 2020 07:52:54 +0000 (09:52 +0200)]
MDL-65448 block_site_main_menu: Restyle moving.

13 months agoMerge branch 'MDL-67695-MOODLE_310_STABLE_get_lti_proxies' of https://github.com...
Jake Dallimore [Tue, 20 Oct 2020 03:08:46 +0000 (11:08 +0800)]
Merge branch 'MDL-67695-MOODLE_310_STABLE_get_lti_proxies' of https://github.com/andrewmadden/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MOODLE_310_STABLE-MDL-68284' of https://github.com/yao9394/moodle into...
Adrian Greeve [Tue, 20 Oct 2020 00:49:06 +0000 (08:49 +0800)]
Merge branch 'MOODLE_310_STABLE-MDL-68284' of https://github.com/yao9394/moodle into MOODLE_310_STABLE

13 months agoMDL-69751 core: Restore deleted guest user and add missing context
Mihail Geshoski [Tue, 6 Oct 2020 05:30:45 +0000 (13:30 +0800)]
MDL-69751 core: Restore deleted guest user and add missing context

This upgrade step fixes the cases where the current guest user is
labelled as 'deleted' and the related user context is missing.

13 months agoMDL-69751 course: Handle missing guest user context
Mihail Geshoski [Tue, 6 Oct 2020 05:24:05 +0000 (13:24 +0800)]
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.

13 months agoMDL-68664 theme: remove right margin from form-inline class
Simey Lameze [Tue, 20 Oct 2020 00:23:24 +0000 (08:23 +0800)]
MDL-68664 theme: remove right margin from form-inline class

13 months agoMDL-69962 tool_usertours: Fix increase in included files
Katie Ransom [Mon, 19 Oct 2020 09:45:26 +0000 (10:45 +0100)]
MDL-69962 tool_usertours: Fix increase in included files

13 months agoMerge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_...
Andrew Nicols [Tue, 20 Oct 2020 00:02:22 +0000 (08:02 +0800)]
Merge branch 'MDL-69687-m310' of https://github.com/sammarshallou/moodle into MOODLE_310_STABLE

13 months agoMDL-69726 calendar: fix raw event fetcher under postgres
Jenkins Automation [Fri, 18 Sep 2020 01:04:10 +0000 (10:34 +0930)]
MDL-69726 calendar: fix raw event fetcher under postgres

Without this, there's a code path that under the right circumstances is hit and
results in a query with `FROM (mdl_event) ev` in it - which is not valid syntax
under postgres.

13 months agoMDL-69807 blocks: remove redundant sesskey loading edit/delete page.
Paul Holden [Fri, 16 Oct 2020 13:54:25 +0000 (14:54 +0100)]
MDL-69807 blocks: remove redundant sesskey loading edit/delete page.

13 months agoMerge branch 'MDL-69906-310-searchsimpledb' of git://github.com/mudrd8mz/moodle into...
Eloy Lafuente (stronk7) [Mon, 19 Oct 2020 20:56:31 +0000 (22:56 +0200)]
Merge branch 'MDL-69906-310-searchsimpledb' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE

13 months agoMerge branch 'MDL-57756-text-customparams-310' of https://github.com/cengage/moodle...
Eloy Lafuente (stronk7) [Mon, 19 Oct 2020 20:32:02 +0000 (22:32 +0200)]
Merge branch 'MDL-57756-text-customparams-310' of https://github.com/cengage/moodle into MOODLE_310_STABLE

13 months agoMDL-67695 mod_lti: Use correct return structure for get_tool_proxies.
Andrew Madden [Mon, 19 Oct 2020 03:35:19 +0000 (14:35 +1100)]
MDL-67695 mod_lti: Use correct return structure for get_tool_proxies.

* Deprecated serialise_tool_proxy() as no longer used.
* Use tool_proxy_return_structure for each proxy.
* Added tests for getting all proxies and orphaned proxies.