Commit graph

2349 commits

Author SHA1 Message Date
sam marshall
3dee5cd74c 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:48:04 +00:00
Eloy Lafuente (stronk7)
3dd26fe334 MDL-71036 phpunit: assertContains() now performs strict comparison
The methods assertContains() and assertNotContains() now perform
strict (type and value) comparison, pretty much like assertSame()
does.

A couple of new assertContainsEquals() and assertNotContainsEquals()
methods have been created to provide old (non-strict) behavior, pretty
much like assertEquals() do.

Apart from replacing the calls needing a relaxed comparison to those
new methods, there are also a couple of alternative, about how to
fix this, depending of every case:

- If the test is making any array_values() conversion, then it's better
  to remove that conversion and use assertArrayHasKey(), that is not
  strict.
- Sometimes if may be also possible to, simply, cast the expectation
  to the exact type coming in the array. I've not applied this technique
  to any of the cases in core.

Link: https://github.com/sebastianbergmann/phpunit/issues/3426
2021-03-11 23:07:31 +01:00
Eloy Lafuente (stronk7)
58afea8c59 Merge branch 'MDL-70967-311' of git://github.com/marinaglancy/moodle into MOODLE_311_STABLE 2021-03-10 23:39:15 +01:00
Sara Arjona
266742e6b4 Merge branch 'MDL-70287-311-3' of git://github.com/rezaies/moodle into MOODLE_311_STABLE 2021-03-10 20:48:57 +01:00
sam marshall
3cc4d3d2e2 MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:58:09 +00:00
sam marshall
0919a04311 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:58:09 +00:00
Eloy Lafuente (stronk7)
67c851ff81 Merge branch 'MDL-70424-auth-avoid-changes-MOODLE_311_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_311_STABLE 2021-03-04 00:29:07 +01:00
Paul Holden
8a738cbf52 MDL-70822 enrol: respect capability to view other users profile.
When retrieving courses of another user via web services, we should
respect the capability to view that users profile in a given course.
2021-03-02 23:44:43 +01:00
David Mudrák
deb99d0c7e MDL-70964 lang: Use the fixed strings in tests 2021-02-25 16:32:11 +01:00
Shamim Rezaie
4b73612459 MDL-70287 core_payment: Redirect user to the successurl after payment 2021-02-24 22:47:22 +11:00
Shamim Rezaie
058e57bc88 MDL-70287 core_payment: Add get_success_url to service_provider 2021-02-24 22:47:21 +11:00
Shamim Rezaie
e37e06d194 MDL-70287 core_payment: Improving existing and missing phpdocs 2021-02-24 22:47:21 +11:00
Brendan Heywood
e4f011cf78 MDL-70424 auth: Avoid random changes to $CFG->auth 2021-02-23 11:41:34 +11:00
Marina Glancy
e334bd9921 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:06:38 +01:00
Andrew Nicols
740c2e80d8 MDL-66979 behat: Use tab to blur current focus
The focus should be on something, rather than removed.

The way in which focus removal works can lead to side effects.
2021-01-22 14:52:17 +08: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
Jake Dallimore
6c5fc83f17 Merge branch 'MDL-70459-311' of git://github.com/rezaies/moodle into MOODLE_311_STABLE 2020-12-22 16:51:15 +08:00
Shamim Rezaie
ff67cd2b87 MDL-70459 enrol_fee: Sort the list of currencies when displaying 2020-12-16 22:30:40 +11:00
Andrew Nicols
6dae4aa3ad MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Víctor Déniz
46acc5d7ff Merge branch 'MDL-63683-311' of https://github.com/dravek/moodle into MOODLE_311_STABLE 2020-12-09 12:25:40 +00:00
Ilya Tregubov
4afa3bfda4 MDL-69869 enrol: Fixing intendation for travis. 2020-12-08 09:15:35 +02:00
Ilya Tregubov
a2d652e332 MDL-69869 enrol: Clean up - switch to [] from array(). 2020-12-08 09:15:35 +02:00
Ilya Tregubov
3401b6fb42 MDL-69869 enrol: Add ability to get suspended users through
core_enrol_get_enrolled_users webservice.
2020-12-08 09:15:35 +02:00
David Matamoros
10fa98fcf4 MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:24:56 +01:00
Andrew Nicols
0873a544ed Merge branch 'MDL-63266-311' of git://github.com/peterRd/moodle into MOODLE_311_STABLE 2020-11-26 12:51:53 +01:00
Peter Dias
b505b893fc MDL-63266 core: Final deprecation enrol/cli/sync.php 2020-11-19 16:22:14 +08:00
Adrian Greeve
b4d21549b5 Merge branch 'MDL-56653-311' of git://github.com/lameze/moodle into MOODLE_311_STABLE 2020-11-19 11:09:59 +08:00
Vitaly
88d12b5dff MDL-56653 enrol_meta: a single DB query in edit_instance_validation
The 'edit_instance_validation()' method checks for existing meta enrolment instances.
The fix replaces DB queries in a loop for each course with a single query for all courses.
Also, a new testing method 'test_edit_instance_validation_with_existing_courses()'
was added to /enrol/meta/tests/plugin_test.php to test if the new implementation
returns an error in case of trying to save the already linked courses in the 'customint1' field.
2020-11-18 15:10:46 +08:00
Andrew Nicols
5b9b1f07e6 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08: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
Jun Pataleta
940ed72017 Merge branch 'MDL-70089_310' of https://github.com/stronk7/moodle into MOODLE_310_STABLE 2020-11-04 13:05:47 +08: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
Mihail Geshoski
3d9175f6f1 MDL-67837 backup: Add unit tests 2020-11-03 12:34:28 +01:00
Eloy Lafuente (stronk7)
323ea697c3 Merge branch 'MDL-69998-310-enfix' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-10-28 00:42:05 +01:00
Eloy Lafuente (stronk7)
0715960dd8 NOBUG: Fixed SVG browser compatibility 2020-10-27 23:48:43 +01:00
Sara Arjona
65084e7371 MDL-69166 enrol_fee: fix behat string from fee to enrolment by payment 2020-10-27 15:01:47 +01:00
Sara Arjona
da4b94e012 MDL-69166 enrol_fee: define default value to currency setting 2020-10-27 15:01:47 +01:00
Helen Foster
0a64b2ed99 MDL-69998 lang: Import fixed English strings (en_fix) 2020-10-27 11:20:03 +01:00
Shamim Rezaie
25cf4fa5ca MDL-69166 core_payment: Add privacy implementation 2020-10-27 15:45:25 +11:00
Shamim Rezaie
b63f17b5f1 MDL-69166 core_payment: Addressing various integration points
- Add help for 'payment account' field in the enrol instance form
- Remove MOODLE_INTERNALs when not necessary
- Add $userid to deliver_order
- Check if provider classes implement the provider interface
- Rename get_cost to get_payable
- get_payable returns payable object
- Improve registerEventListeners and added init
- Rename payment\provider to payment\service_provider
2020-10-27 15:45:25 +11:00
Shamim Rezaie
52305c9a2e MDL-69166 core_payment: Rename componentid to itemid 2020-10-27 15:45:25 +11:00
Marina Glancy
efc576fc5c MDL-69166 core_payment: addressing integration review 2020-10-27 15:45:00 +11:00
Shamim Rezaie
7d10f35278 MDL-69166 core_payment: Add paymentarea to the payment subsystem 2020-10-27 15:45:00 +11:00
Marina Glancy
9476b48942 MDL-69166 core_payment: archiving accounts, triggering events, tests 2020-10-27 15:45:00 +11:00
Shamim Rezaie
7e11261633 MDL-69166 core_payment: Show cost on the modal when no gateway is chosen 2020-10-27 15:45:00 +11:00
Marina Glancy
15a4e4c87c MDL-69166 core_payment: improvements to api, small fixes 2020-10-27 15:45:00 +11:00
Marina Glancy
895f38cc76 MDL-69166 core_payment: add payment accounts 2020-10-27 15:45:00 +11:00
Shamim Rezaie
acd1c82403 MDL-69166 enrol_fee: Show a warning when no currency is supported 2020-10-27 15:44:59 +11:00
Shamim Rezaie
c9271eba7c MDL-69166 enrol_fee: Prevent adding instance if no currency is supported 2020-10-27 15:44:59 +11:00
Shamim Rezaie
2427b92114 MDL-69166 enrol_fee: use template for payment btn & properly format cost 2020-10-27 15:44:59 +11:00