2562 Commits

Author SHA1 Message Date
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
Sara Arjona
ee289b4286 Merge branch 'MDL-69542-master-fixes-historyfix' of https://github.com/snake/moodle 2022-02-11 17:07:43 +01:00
Jake Dallimore
e399b3995e MDL-69542 enrol_lti: behat feature covering tool registration 2022-02-11 11:07:26 +08:00
Jake Dallimore
66b76c4545 MDL-69542 enrol_lti: remaining changes for dynamic registration support
- Allow the tool to generate secure, one time, dynamic registration
URLs for use in supporting platforms.
- Registration endpoint, which validates the one time URL, makes
the registration requqest to the platform and adds the approriate
tool registration changes in the tool on success.
- Admin settings pages make use of the 'copy to clipboard' module
which is now in core.
2022-02-11 11:06:05 +08:00
Jake Dallimore
d5ed4a3184 MDL-69542 enrol_lti: add LTI Advantage grade sync task
This change adds a new grade sync task for LTI Advantage and updates
the legacy task such that it only operates on legacy tools. This uses
the assignment and grades service 2.0.
2022-02-11 11:03:32 +08:00
Jake Dallimore
1f27bad809 MDL-69542 enrol_lti: add LTI Advantage member sync task
This change adds a new member sync task for LTI Advantage and updates
the legacy task such that it only operates on legacy tools. This uses
the names and roles provisioning service 2.0.
2022-02-11 11:03:00 +08:00
Jake Dallimore
4d8a078154 MDL-69542 enrol_lti: backup changes for LTI Advantage 2022-02-11 10:52:40 +08:00
Jake Dallimore
6fbd30e15d MDL-69542 enrol_lti: add deep linking support 2022-02-11 10:52:31 +08:00
Jake Dallimore
2516938537 MDL-69542 enrol_lti: add version based resource publication
Adds tabs and a new table allowing LTI Advantage published resources
to be viewed.
2022-02-11 10:51:59 +08:00
Jake Dallimore
c6c7b1dadc MDL-69542 enrol_lti: add generators for use in LTI Advantage behat 2022-02-11 10:50:06 +08:00
Jake Dallimore
f0092f94d8 MDL-69542 enrol_lti: add OIDC endpoints for resource link launch 2022-02-11 10:49:40 +08:00
Jake Dallimore
983038161a MDL-69542 enrol_lti: add message_helper utility class 2022-02-11 10:49:30 +08:00
Jake Dallimore
9d5264d500 MDL-69542 enrol_lti: add tool launch service 2022-02-11 10:47:12 +08:00
Jake Dallimore
92195d97c0 MDL-69542 enrol_lti: add admin page for deployment management 2022-02-11 10:43:00 +08:00
Jake Dallimore
c41ff5161d MDL-69542 enrol_lti: add tool deployments service 2022-02-11 10:38:41 +08:00
Jake Dallimore
8c62efe74e MDL-69542 enrol_lti: admin page providing platform registration 2022-02-11 10:36:01 +08:00
Jake Dallimore
1f3d37390d MDL-69542 enrol_lti: add tool endpoint page to admin settings 2022-02-11 10:35:51 +08:00
Jake Dallimore
0f6239a054 MDL-69542 enrol_lti: add application registration service 2022-02-11 10:32:49 +08:00
Jake Dallimore
948746eae7 MDL-69542 enrol_lti: make lib changes supporting LTI Advantage
This change includes:
- LTI Advantage specific code in delete_instance().
- LTI version field added to publish as lti tool form.
- LTI Advantage specific uuid added to add_instance().
- Moved secret validation (LTI1.1/2.0) to server side, allowing
the element to be hidden in LTI Advantage cases.
2022-02-11 10:24:49 +08:00
Jake Dallimore
dad46e813b MDL-69542 enrol_lti: implement classes required by the lti13 library 2022-02-11 10:23:31 +08:00
Jake Dallimore
5649c72d43 MDL-69542 enrol_lti: add published resource view object support
The view objects introduced here will be used as a representation of
data during the content selection process.
2022-02-11 10:22:24 +08:00
Jake Dallimore
4049c08998 MDL-69542 enrol_lti: add entity repositories 2022-02-11 10:20:21 +08:00