2483 Commits

Author SHA1 Message Date
Jun Pataleta
545d848064 Merge branch 'MDL-72193' of https://github.com/paulholden/moodle 2022-06-10 13:11:25 +02:00
Shamim Rezaie
a239d8e182 Merge branch 'MDL-74699-master' of https://github.com/snake/moodle 2022-06-03 14:45:30 +10:00
Dmitrii Metelkin
a6cad23b1a MDL-73431 enrol: Introduce a sync interval 2022-05-30 15:58:22 +10:00
Jun Pataleta
e60e8bc629 Merge branch 'MDL-73423-master' of https://github.com/marinaglancy/moodle 2022-05-26 00:18:35 +08:00
Ilya Tregubov
7a635606e0 MDL-72256 enrol_fee: Fix indentaion for Behat. 2022-05-18 13:13:02 +06:00
Dan Marsden
b51d8d9a7a MDL-72256 enrol_fee: add payment information to course/info.php 2022-05-18 18:55:29 +12:00
Jake Dallimore
4b93776f4b MDL-74699 enrol_lti: fix clientid retrieval from aud during launches 2022-05-12 09:20:02 +08:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Jun Pataleta
53ad985457 Merge branch 'MDL-74576-master' of https://github.com/snake/moodle 2022-05-05 09:55:37 +08:00
Jun Pataleta
96ffb21ca6 Merge branch 'MDL-74546-master' of https://github.com/snake/moodle 2022-05-05 09:41:28 +08:00
Jake Dallimore
8f59d0b937 MDL-74576 enrol_lti: allow unsupported scopes in ags_info
Instead of hard blocking launches with extension scopes, just ignore
the unsupported scopes and continue.
2022-05-02 15:37:52 +08:00
Marina Glancy
a0398fdde8 MDL-73423 core_privacy: Calling reset() on objects deprecated PHP8.1 2022-04-29 16:16:07 +02:00
Jun Pataleta
c0466920b3 Merge branch 'MDL-74537-master-enfix' of https://github.com/vmdef/moodle 2022-04-27 15:56:00 +06:00
Helen Foster
a1699a58f4 MDL-74537 lang: Import fixed English strings (en_fix) 2022-04-26 11:21:12 +01:00
Paul Holden
14422572b9 MDL-72193 enrol_manual: support custom user profile fields. 2022-04-25 18:18:00 +01:00
Eloy Lafuente (stronk7)
76f5445451 MDL-74510 upgrade: add the 4.0.0 separation line to all upgrade scripts 2022-04-22 18:45:10 +02:00
Jake Dallimore
3b4ef7b71d MDL-74546 enrol_lti: add missing d-flex to table to fix safari layout 2022-04-22 10:17:13 +08:00
Jake Dallimore
9343f94131 MDL-74312 enrol_lti: fix copytoclipboard trigger element
This should be a button given it's an action, and making it a button
means it can be activated using either the space or enter keys, instead
of just enter.
2022-04-20 09:31:48 +08:00
Jun Pataleta
70f6b1605b MDL-74471 versions: bump all versions and requires near release 2022-04-13 10:37:36 +08:00
Shamim Rezaie
a9a9d8e5c2 Merge branch 'MDL-74463-master' of https://github.com/snake/moodle 2022-04-11 11:55:18 +10:00
Jake Dallimore
75328ec1a8 MDL-74463 enrol_lti: fix location of scopes in registration json 2022-04-08 14:45:30 +08:00
Eloy Lafuente (stronk7)
70e29b77f0 Merge branch 'MDL-74330-master-enfix' of https://github.com/vmdef/moodle 2022-04-05 18:39:23 +02:00
Sara Arjona
2a50ee4464 NOBUG: Fixed SVG browser compatibility 2022-04-01 16:41:04 +02:00
Víctor Déniz
a51d24c8a8 MDL-74330 lang: Replace modified strings in tests 2022-04-01 13:17:18 +01:00
Helen Foster
3719878cbf MDL-74330 lang: Import fixed English strings (en_fix) 2022-04-01 13:17:08 +01:00
Jake Dallimore
706d7885b4 MDL-74221 enrol_lti: revert order change for action buttons 2022-04-01 17:33:54 +08:00
Jun Pataleta
fc1f7014c1 Merge branch 'MDL-74221-master' of https://github.com/andrewnicols/moodle 2022-04-01 10:13:46 +08:00
Jun Pataleta
a3958a297e Merge branch 'MDL-74221-master' of https://github.com/andrewnicols/moodle 2022-04-01 10:12:58 +08:00
Jake Dallimore
f739a10700 MDL-74221 enrol_lti: fix upgrade code to set correct status default 2022-04-01 10:12:57 +08:00
Andrew Nicols
3ba580e3f2 Merge branch 'MDL-74221-master' of https://github.com/snake/moodle 2022-04-01 10:12:56 +08:00
Andrew Nicols
fa6920327e MDL-74221 enrol_lti: Update tests to match new icon and strings 2022-03-31 23:29:02 +08:00
Andrew Nicols
73ffa2e067 MDL-74221 enrol_lti: Fix misuse of moodle_url constructor 2022-03-31 21:37:51 +08:00
Jake Dallimore
662c659324 MDL-74221 enrol_lti: change registration workflow to support drafts
This changes the admin pages such that to see the endpoints required
by the platform, an admin user must first create a draft registration.
This allows the registration uniqueid to be generated and included in
the initiate login and dynamic registration URLs.
2022-03-31 12:15:46 +08:00
Eloy Lafuente (stronk7)
8f414e42a9 MDL-74279 phpunit: Tests using sqlsrv AdoDB must reset settings
AdoDB SQL*Server drivers use to modify some error and
logging preferences. As far as the connection is shared
with the main one, that implies that those settings
remain for the whole remaining execution.

We don't want his in tests, because can affect to other
tests at distance.

We are fixing this here, only for tests, because it
doesn't affect normal requests and because, once we
remove AdoDB this won't be needed anymore.
2022-03-26 18:40:11 +01:00
Jake Dallimore
86f08a393f MDL-74221 enrol_lti: db changes supporting draft registrations
Summary:
- Allows nulls for a number of fields meaning largely empty drafts can
be stored.
- Adds 'uniqueid', an id unique to each issuer which is intended
to be used as a parameter in both the initiate login and dynamic
registration urls provided to platforms, as a means to identify specific
registrations for the issuer, in the absense of client_id (optional in
the 1.3 spec).
- Add 'status', used to denote draft or active registrations.
2022-03-24 14:12:24 +08:00
Víctor Déniz
7a65b2a3c7 Merge branch 'MDL-74288-master' of https://github.com/snake/moodle 2022-03-23 15:25:38 +00:00
Jake Dallimore
afbf15cd97 MDL-74288 enrol_lti: fix cross-origin postMessage call in registration
This isn't using the targetOrigin, which should be passed as 2nd param.
2022-03-22 11:06:23 +08:00
Sara Arjona
375cdaa6a5 Merge branch 'MDL-73950-master' of https://github.com/snake/moodle 2022-03-21 15:38:21 +01:00
Jun Pataleta
d93739be3f Merge branch 'MDL-73520_replace-deprecated-php_errormsg-with-error_get_last' of https://github.com/ziegenberg/moodle 2022-03-10 12:28:28 +08:00
Eloy Lafuente (stronk7)
a5c91474ee MDL-71807 cleanup: Replace deprecated codingStandardsIgnore annotations
The PHP_CodeSniffer @codingStandardsIgnore annotations are deprecated
and, since version 3.x, the new // phpcs:ignore comments should be used
instead.

This commits just reviews all the uses in core, replacing them for
the better new candidate, or removing when no longer needed.
2022-03-08 10:48:53 +01:00
Daniel Ziegenberg
f60f6dfade
MDL-73520 general: replace deprecated php_errormsg with error_get_last()
For a better PHP8 compatibility this commit replaces the deprecated $php_errormsg
with error_get_last().

The PHP 8.0 migration guide (https://www.php.net/manual/de/migration80.incompatible.php) says:
    The track_errors ini directive has been removed.
    This means that php_errormsg is no longer available.
    The error_get_last() function may be used instead.
Also the documentation on $php_errormsg (https://www.php.net/manual/en/reserved.variables.phperrormsg.php) says:
    This feature has been DEPRECATED as of PHP 7.2.0.
    Relying on this feature is highly discouraged.
    Use error_get_last() instead.

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2022-03-05 14:19:48 +01:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +01:00
Mihail Geshoski
8968b51c6b MDL-73645 core_enrol: Update breadcrumb nodes 2022-03-02 13:00:25 +08:00
Andrew Nicols
e1b9d5f3cd MDL-73915 js: Drop support for IE and android
Moodle announced that support for IE would be dropped back in August
2020 with Moodle 3.9 but not active steps were taken at that time. That
decision was made in MDLSITE-6109 and this particular step was meant to
be taken in Moodle 3.10.

This is the first step taken to actively drop support for IE.

This commit also bumps the browser support pattern from 0.25% to 0.3%.
The percentage here includes any browser where at least this percentage
of users worldwide may be using a browser. In this case it causes
support for Android 4.3-4.4 to be dropped, which relate to Android
KitKat (released 2013).

This combination of changes means that all of the supported browsers in
our compatibility list support modern features including async,
for...of, classes, native Promises, and more which has a huge impact on
the ease of debugging code, and drastically reduces the minified file
size because a number of native Polyfills included by Babel are no
longer included.
2022-02-23 08:55:20 +08:00
Andrew Nicols
0a4047ab31 MDL-73915 js: Switch amd minification to terser
Unfortunately the babel minify-mangle plugin seems to be abandoned and
in certain circumstances can be very buggy. The only safe options are to
disable it, or to switch to a different minification library.

Not minifying our javascript is not ideal, so this commit updates the
javascript tasks to use a rollup, combined with babel, and terser.

Babel still converts code from ES/UMD/AMD to AMD modules with the
relevant browser support, whilst terser minifies the code.

The rollup bundler handles tracking and creation of sourcemaps, and
supports better parallelisation of the tasks.

Since the upgrade to Node LTS/Gallium requires an upgrade to @babel/core
and eslint, which change the built files anyway, this seems like the
ideal time to make this change.
2022-02-23 08:55:09 +08:00
Andrew Nicols
aa7f7957ea MDL-73915 js: Upgrade babel and eslint 2022-02-23 08:53:54 +08:00
Jake Dallimore
ae5aaf9b82 MDL-73950 enrol_lti: fix icon spacing in dynamic registration URL 2022-02-21 16:02:12 +08:00
Sara Arjona
18631ff886 Merge branch 'MDL-73873-master' of https://github.com/aanabit/moodle 2022-02-17 10:44:10 +01:00
Amaia Anabitarte
760747b5dc MDL-73873 enrol_cohort: Fix warning when editing cohort enrolment 2022-02-14 17:59:28 +01:00
Sara Arjona
ef8015baca MDL-69542 enrol_lti: Add missing index to install
A foreign-key from enrol_lti_users->ltideploymentid to
enrol_lti_deployment->id was defined in upgrade but missing in
install.xml.
2022-02-11 17:56:15 +01:00