2364 Commits

Author SHA1 Message Date
Andrew Nicols
4f422785c6 MDL-71113 javascript: Improve basic JS Documentation 2021-06-18 09:38:05 +08:00
Andrew Nicols
92179b7057 MDL-71113 js: Fix all jsdoc warnings 2021-06-18 09:38:05 +08:00
sam marshall
171313781d MDL-71836 core_enrol: Cannot search for users by username 2021-06-02 14:52:43 +01:00
Luca Bösch
19d7c11b60 MDL-71373 core_enrol: localize "close" in role manager. 2021-05-14 14:18:52 +02: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
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
Adrian Greeve
98edee3c4a Merge branch 'MDL-71235-master' of https://github.com/dcai/moodle 2021-04-29 14:42:35 +08:00
Dongsheng Cai
36bc7b07db MDL-71235 webservices: add activity completion data to web services 2021-04-29 13:52:32 +10:00
Sara Arjona
0084f9c762 Merge branch 'MDL-71244-master' of git://github.com/lucaboesch/moodle 2021-04-28 09:17:28 +02:00
Andrew Nicols
c53d6ffdbe Merge branch 'MDL-70909-master' of git://github.com/ferranrecio/moodle 2021-04-28 10:20:03 +08:00
Luca Bösch
6ab749558e MDL-71244 enrol_manual: Add bootstrap classes to buttons 2021-04-27 17:29:20 +02:00
Ferran Recio
45048b8796 MDL-70909 core: add cannotmatchanyrows to capabilities join 2021-04-22 13:16:35 +02:00
abgreeve
8a53fe7f6b Merge branch 'MDL-28452-master' of git://github.com/bmbrands/moodle 2021-04-22 09:38:50 +08:00
Bas Brands
f9e1c2587a MDL-28452 core_user: migrate social profile fields
Create a new profile field type, move all existing content of the fields
'icq', 'skype', 'aim', 'yahoo', 'msn' and 'url' in the mdl_user table to
theses new profile fields if needed.

AMOS BEGIN
MOV [aimid,core],[aimid,courseimage,profilefield_social]
MOV [yahooid,core],[yahooid,profilefield_social]
MOV [skypeid,core],[skypeid,profilefield_social]
MOV [icqnumber,core],[icqnumber,profilefield_social]
MOV [msnid,core],[msnid,profilefield_social]
MOV [webpage,core],[webpage,profilefield_social]
AMOS END
2021-04-21 11:22:25 +02:00
Eloy Lafuente (stronk7)
b60fbb9cd4 Merge branch 'MDL-70099' of git://github.com/paulholden/moodle 2021-04-17 09:40:19 +02:00
Paul Holden
b5267b7b38 MDL-70099 enrol: increase accuracy of current enrolments by date.
By rounding the current time it was possible that the most recently
created user enrolments (e.g. self enrolments) were being excluded.

This would manifest itself in a user being enrolled on a course,
but it not appearing under "My courses" navigation or on their own
Dashboard until the rounded time had caught up with the current
time.
2021-04-05 19:32:33 +01:00
sam marshall
611e2569aa MDL-71215 core_user: User fields - remaining deprecated functions
This change removes references in code and comments to a few
deprecated functions that were accidentally missed in the larger
change.

The code changes only affect service_users.php. I made it support
custom user profile fields in this query, because it was easy
enough, rather than adding another TODO to fix later.
2021-03-31 11:12:16 +01: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
Eloy Lafuente (stronk7)
8a14a7bd22 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:04:31 +01:00
Eloy Lafuente (stronk7)
4f0b58714c Merge branch 'MDL-70967-master' of git://github.com/marinaglancy/moodle 2021-03-10 23:39:25 +01:00
Sara Arjona
2c0038f7f9 Merge branch 'MDL-70287-master-3' of git://github.com/rezaies/moodle 2021-03-10 20:48:44 +01:00
sam marshall
987e55452f MDL-45242 Course: Enrol feature supports custom profile fields 2021-03-10 10:57:11 +00: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
Eloy Lafuente (stronk7)
8cf7878e18 Merge branch 'MDL-70424-auth-avoid-changes' of https://github.com/brendanheywood/moodle 2021-03-04 00:27:53 +01:00
Paul Holden
a251c260c4 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:24 +01:00
David Mudrák
0c9eaeff59 MDL-70964 lang: Use the fixed strings in tests 2021-02-25 16:20:58 +01:00
Shamim Rezaie
9317849257 MDL-70287 core_payment: Redirect user to the successurl after payment 2021-02-24 22:44:10 +11:00
Shamim Rezaie
51b73e431e MDL-70287 core_payment: Add get_success_url to service_provider 2021-02-24 22:44:10 +11:00
Shamim Rezaie
03b9d60b8e MDL-70287 core_payment: Improving existing and missing phpdocs 2021-02-24 22:42:03 +11:00
Brendan Heywood
300213ee2e MDL-70424 auth: Avoid random changes to $CFG->auth 2021-02-23 11:40:57 +11:00
Marina Glancy
ef99a587d3 MDL-70967 enrol_meta: fix error in unittest 2021-02-22 18:04:14 +01:00
Andrew Nicols
74a86acc8d 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:10 +08: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
814f60a438 Merge branch 'MDL-70459-master' of git://github.com/rezaies/moodle 2020-12-22 16:50:41 +08:00
Shamim Rezaie
22dfcb1029 MDL-70459 enrol_fee: Sort the list of currencies when displaying 2020-12-16 22:26:44 +11:00
Andrew Nicols
31402aa406 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Víctor Déniz
8027c25085 Merge branch 'MDL-63683-master' of https://github.com/dravek/moodle 2020-12-09 12:48:34 +00:00
Ilya Tregubov
aa1691d811 MDL-69869 enrol: Fixing intendation for travis. 2020-12-08 09:15:15 +02:00
Ilya Tregubov
65a1d6e8e0 MDL-69869 enrol: Clean up - switch to [] from array(). 2020-12-08 09:15:15 +02:00
Ilya Tregubov
e53bc6a1f8 MDL-69869 enrol: Add ability to get suspended users through
core_enrol_get_enrolled_users webservice.
2020-12-08 09:15:15 +02:00
David Matamoros
9b5eb38f55 MDL-63683 enrol: Fix plugin settings when no role has student archetype 2020-12-04 09:09:37 +01:00
Andrew Nicols
a57de96846 Merge branch 'MDL-63266-master' of git://github.com/peterRd/moodle 2020-11-26 12:46:11 +01:00
Adrian Greeve
3f5489e014 Merge branch 'MDL-56653_enrol_meta_edit_instance_validation' of https://github.com/vtos/moodle 2020-11-19 11:07:27 +08:00
Andrew Nicols
ba34d6e225 MDL-70148 behat: Update steps for keyboard 2020-11-17 15:14:43 +08:00
Peter Dias
487c6f67b5 MDL-63266 core: Final deprecation enrol/cli/sync.php 2020-11-16 23:11:17 +08:00
Vitaly
d7d1ed65a5 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-12 15:14:44 +03:00
Mihail Geshoski
253af8711d MDL-67837 backup: Add unit tests 2020-11-03 12:34:28 +01:00
Eloy Lafuente (stronk7)
d59487ded3 Merge branch 'MDL-69998-master-enfix' of git://github.com/mudrd8mz/moodle into master 2020-10-28 00:41:53 +01:00
Eloy Lafuente (stronk7)
96c572c5f3 NOBUG: Fixed SVG browser compatibility 2020-10-27 23:47:24 +01:00
Sara Arjona
54d718b2b0 MDL-69166 enrol_fee: fix behat string from fee to enrolment by payment 2020-10-27 15:00:30 +01:00