249 Commits

Author SHA1 Message Date
Sara Arjona
8b36abdb9d
Merge branch 'MDL-80259-main' of https://github.com/roland04/moodle 2024-01-24 09:16:12 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Jake Dallimore
0e74284dfc
MDL-78219 enrol_lti: fix auth method usage in base testcase 2024-01-15 15:41:52 +08:00
Andrew Nicols
525212f2d2
MDL-78496 core: Address phpcs issues with upgrade.php files 2023-11-19 21:20:53 +08:00
Andrew Nicols
545b36cd4a
MDL-78496 upgrade: remove all the < 4.1.0 upgrade steps
Also includes an upgrade step to prevent upgrading from any
version < 2021112802 (v4.1.0) as anti-cheating measure.
2023-11-17 23:25:36 +08:00
Jun Pataleta
9beff03a96
MDL-79626 upgrade: add the 4.3.0 separation line to all upgrade scripts 2023-10-10 10:44:17 +08:00
Jun Pataleta
94bc2cd38b
MDL-79551 versions: bump all versions and requires near release 2023-10-04 13:57:17 +08:00
Sara Arjona
ff844ab7bd
MDL-78993 theme: Remove $CFG->svgicons
The $CFG->svgicons setting was introduced in Moodle 2.4 due to incomplete
SVG support in certain web browsers.
The landscape has evolved significantly since then, and all modern browsers
now handle SVG files correctly.
The $CFG->svgicons settings has been removed and the supports_svg() method
has been updated with currently supported browsers (IE support was removed
in Moodle 3.10).
2023-09-12 15:28:03 +02:00
Andrew Nicols
4fcf078ef9
MDL-76557 enrol_lti: Fix unit test docs and convert to provider 2023-08-17 09:12:36 +02:00
ishatalkin
d9e182b5c6 MDL-76557 enrol_lti: sync_grades accepts status codes 200,201,202,204 2023-08-15 12:25:06 +03:00
Huong Nguyen
1e804cdb6a
Merge branch 'MDL-78578-master' of https://github.com/snake/moodle 2023-07-04 15:15:33 +07:00
Jake Dallimore
83d34cd1cc
MDL-78599 enrol_lti: fix SQL syntax error in course grade sync 2023-06-28 12:39:03 +08:00
Jake Dallimore
013e6fd32e
MDL-78599 enrol_lti: test covering decoupled, course context grade syncs
This covers the case where a course is published and the launch data
doesn't include the 'lineitem' property of the ags claim, meaning the
tool can manage its own line items.
2023-06-28 12:38:54 +08:00
Jake Dallimore
1e6a7b2b63
MDL-78578 enrol_lti: permit launch cache access during launch redirects
This handles things like site policies, which store the current URL,
redirect to the policy agreement, then redirect back the current URL
afterwards. In such cases, we want to redirect back with 'launchid' set
so that we can fetch the id_token from the session cache. This is the
same thing we already do during account binding, so the patch only
makes sure the PAGE->url is properly set before calling require_login.
2023-06-27 10:01:49 +08:00
Jake Dallimore
b42e47fb4a
MDL-78066 enrol_lti: fix deep linking error in multiple grade items case
If an activity, like workshop or forum, has multiple grade items,
declarative binding of the grade item (line item) isn't supported.
Instead of throwing an exception, handle the case more elegantly
and just omit the 'add to gradebook' option for these activities.
2023-06-15 09:38:43 +08:00
Jake Dallimore
8da6304e0e
MDL-78066 enrol_lti: test showing multi-grade-items failure
This test demonstrates the failure of the repository to properly fetch
published resources which are compatible with declarative line item
binding.
2023-06-15 09:38:31 +08:00
Andrew Nicols
b610b9adbe
Merge branch 'MDL-77933-master' of https://github.com/snake/moodle 2023-06-08 12:02:58 +08:00
Andrew Nicols
212e27c5ac
Merge branch 'MDL-76821-master' of https://github.com/snake/moodle 2023-06-08 11:28:55 +08:00
Jake Dallimore
6f54ece655
MDL-77933 enrol_lti: return site name and logo during registration
Instead of the Moodle icon and the 'moodle' lang string, return the
site fullname and compact logo during dynamic registration.
2023-06-08 11:28:26 +08:00
Jake Dallimore
22b0565ef1
MDL-76842 enrol_lti: fix user record updates in user_repository
Only call user_update_user when the relevant user data has changed,
preventing unnecessary user_updated events. This also removes the
line setting timemodified on the user since user_update_user already
handles this.
2023-06-08 10:27:16 +08:00
Jake Dallimore
b1e550a229
MDL-76842 enrol_lti: test confirming the erroneous user_updated events
This test will fail until the fix - only updating users when data has
changed - is put in place in the following commit.
2023-06-08 09:29:56 +08:00
Sara Arjona
36de54c1f8 Merge branch 'MDL-77350-master' of https://github.com/meirzamoodle/moodle 2023-05-17 08:27:26 +02:00
Ilya Tregubov
38230b57e4
Merge branch 'MDL-77840-master' of https://github.com/davewoloszyn/moodle 2023-05-16 09:46:05 +08:00
Meirza
66858f7f6c MDL-77350 enrol: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-16 00:33:19 +07:00
Jake Dallimore
a34d5ee92b MDL-76821 enrol_lti: prevent legacy launches via upgraded enrolment
If the enrolment instance (the 'published resource') has been upgraded
from LTI 1.1/2.0 to LTI 1.3 (i.e. a new instance was not created),
prevent legacy launches which may occur from old resource links. Only
LTI Advantage launches should be permitted through the method.
2023-05-05 17:07:21 +08:00
Jake Dallimore
faa3878abb MDL-76821 enrol_lti: fix bug in repo causing return of legacy lti users
If the enrolment method is updated from an LTI 1.1/2.0 tool to an LTI
1.3 tool, it may have associated enrol_lti_users records not having
ltideploymentid values. These are legacy users and must not be returned
by the repository, which deals only with LTI 1.3 LTI users.
2023-05-05 17:07:12 +08:00
David Woloszyn
c713e970a6 MDL-77840 enrol_lti: Avoid passing nulls to base64_encode 2023-05-03 09:32:18 +10:00
Jun Pataleta
9095bb0ef9 MDL-78000 upgrade: add the 4.2.0 separation line to all upgrade scripts 2023-04-22 23:17:50 +08:00
Eloy Lafuente (stronk7)
061c9d7ba0 MDL-77940 versions: bump all versions and requires near release
version = 2023042400 release version
requires= 2023041800 current rc1 version
2023-04-18 18:08:09 +02:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
9ffbcce0ac MDL-77164 various: fix mustache template name 2023-04-13 09:43:15 +01:00
Jake Dallimore
2c38a73fe7 MDL-76926 enrol_lti: remove guzzle shim code as guzzle now in core 2023-03-13 10:42:56 +08:00
Jun Pataleta
8441270181 Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/moodle 2023-03-09 16:02:01 +08:00
Andrew Nicols
511401f4f6 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
74a44f78a3 Merge branch 'MDL-77232' of https://github.com/davidpesce/moodle 2023-03-03 14:39:32 +08:00
David Pesce
ab1b671110 MDL-77232 enrol_lti: Parallelize lti (1.3) gradesync using adhoc tasks 2023-03-02 09:33:20 -05:00
Andrew Nicols
33b1e41f13 MDL-75012 js: Full build of all grunt things 2023-03-02 11:55:32 +08:00
Eloy Lafuente (stronk7)
240b193603 MDL-76362 enrol_lti: Prevent calling to DataConnector with null keys
While it could have been fixed in DataConnector (3rd part lib), better
prevent in our code to call to it with null keys.

Covered by unit tests.
2023-01-23 09:17:48 +08:00
Marina Glancy
b0a83aa7bd MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
2023-01-23 09:15:54 +08:00
Paul Holden
6bd76e2a4d Merge branch 'MDL-76803-master' of https://github.com/junpataleta/moodle 2023-01-10 16:24:09 +00:00
Jun Pataleta
2924075480 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:18 +08:00
Jake Dallimore
969a392cf1 MDL-75532 enrol_lti: fix optional lineitemsurl in grade sync task
As in MDL-74691, we need either or both of these fields, meaning either
one could be omitted. This just supports that as per the fix made in
MDL-74691.
2023-01-09 11:36:04 +08:00
Jake Dallimore
6331a834a4 MDL-75532 enrol_lti: add tests for coupled and decoupled line items
This covers the following cases:
1. Where only the 'lineitem' service endpoint is provided
2. Where only the 'lineitems' service endpoint is provided.
Existing tests already cover the case where both are provided.
2023-01-09 11:36:04 +08:00
Jun Pataleta
c6ab792ddf MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-11-28 14:43:04 +08:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00
Paul Holden
bec6f3d8a5 MDL-76310 enrol_lti: fix consumer key upgrade steps for Oracle.
Avoids CLOB comparison exceptions, related to ORA-00932.
2022-11-15 11:48:16 +00:00
Jake Dallimore
3e17cf68a4 MDL-76170 enrol_lti: fix missing secret in enrol_lti_users
If member sync runs before the user launches the tool, a partial record
is created, without consumer secret. Subsequent launches of the tool by
that member don't resolve this and this results in grade sync failing
for any affected users. This patch:
- data fixes the existing affected rows
- fixes the launch code, ensuring secret is recorded on launch,
irrespective of whether the user info record has been created already
or not.
2022-11-09 10:02:22 +08:00
Jake Dallimore
1b9ebba57b MDL-76113 enrol_lti: Fix secret on lti user for LTI 2.0 consumers
Fixes the enrol_lti_users.consumersecret field for LTI 2.0 users.
This field erroneously contained the tool secret and not the consumer
secret needed for service requests when used with LTI 2.0 consumers,
which resulted in complete grade sync failure for LTI 2.0 consumers.
This patch:
- adds an upgrade step to address existing incorrect secrets for LTI
2.0 launched users. It sets these to the correct consumer secret.
- fixes the way the secret is first set during a launch, ensuring
this->consumer->secret is used, which properly captures either the
tool secret (for 1.1 launches) or the consumer secret (for 2.0
launches).
2022-11-02 16:48:33 +08:00
Jake Dallimore
552f31dc37 MDL-76002 enrol_lti: let http_client handle form_params option
The lib/lti1p3 library now passes $options['form_params'] instead of
$options['body'] when making access token requests. To maintain the
'application/x-www-form-urlencoded' content-type required by OAuth 2.0
(https://www.rfc-editor.org/rfc/rfc6749#section-4.1.3), the client has
been changed to convert these array params into a body query string,
which matches the behaviour prior to the library upgrade and makes
the tool can continue to call tool platform services. Support for
$options['body'] remains, as this is still used during service calls.
2022-10-14 16:35:29 +08:00
Jun Pataleta
da9aec83a6 Merge branch 'MDL-69251-master' of https://github.com/snake/moodle 2022-08-04 11:16:22 +08:00