2566 Commits

Author SHA1 Message Date
Paul Holden
70a83735f3
MDL-79310 enrol: restrict searched users to those user can view. 2023-10-04 14:31:31 +08:00
Jun Pataleta
04461bed1c
Merge branch 'MDL-79323-401-enfix' of https://github.com/vmdef/moodle into MOODLE_401_STABLE 2023-09-21 15:29:23 +02:00
Paul Holden
cee1103bec
MDL-68712 enrol_self: improve detection/re-use of group enrolment keys. 2023-09-20 13:31:05 +01:00
Helen Foster
7e6930f5b9 MDL-79323 lang: Import fixed English strings (en_fix) 2023-09-20 09:59:21 +01:00
vtos
db8e366ed9
MDL-61811 enrol_manual: fixed updating of 'notifyall' field
When updating a manual enrolment instance, the value of 'notifyall' field must be calculated automatically based on the value of
'expirynotify' field. The relevant plugin's method missed that, thus, the value of 'notifyall' field was never updated when
editing a manual enrolment instance and changing the 'expirynotify' setting.

A functional test has been added to test the entire behaviour of the relevant plugin's method.
2023-08-28 16:09:45 +08:00
Andrew Nicols
b2780aa6f6
MDL-76557 enrol_lti: Fix unit test docs and convert to provider 2023-08-16 23:04:14 +08:00
ishatalkin
0608452503
MDL-76557 enrol_lti: sync_grades accepts status codes 200,201,202,204 2023-08-16 23:04:11 +08:00
Huong Nguyen
73cce7054c
Merge branch 'MDL-77990-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-07-13 09:22:19 +07:00
Huong Nguyen
e8058e6981
Merge branch 'MDL-78578-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-07-04 15:16:15 +07:00
Jake Dallimore
0c0b1ac1d6
MDL-78599 enrol_lti: fix SQL syntax error in course grade sync 2023-06-28 18:13:27 +08:00
Jake Dallimore
07b0f65aac
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 18:13:26 +08:00
Jake Dallimore
8d3fd17313
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:07:25 +08:00
Andrew Nicols
e2f07cf2b4
Merge branch 'MDL-78066-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-15 11:27:02 +08:00
Andrew Nicols
196ed7530b
Merge branch 'MDL-69231-401' of https://github.com/lameze/moodle into MOODLE_401_STABLE 2023-06-15 10:56:53 +08:00
Jake Dallimore
68b6ca2f69
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:44:21 +08:00
Jake Dallimore
32a34f805f
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:44:17 +08:00
Sara Arjona
4c6e5c977d Merge branch 'MDL-64648-401_enrol_manual_expirynotify_default_in_enrol_instance' of https://github.com/vtos/moodle into MOODLE_401_STABLE 2023-06-14 13:08:25 +02:00
Ilya Tregubov
beb0328060
Merge branch 'MDL-70152-401' of https://github.com/andelacruz/moodle into MOODLE_401_STABLE 2023-06-14 13:25:03 +08:00
vtos
e0145522c9 MDL-64648 enrol_manual: fixed default setting of 'expirynotify'
When creating a course, a manual enrolment instance is added by default. The instance settings should inherit the values of those
for the manual enrolment plugin and properly calculate its extra settings. The 'expirynotify' setting wasn't inherited correctly
in case it had 'Enroller + Enrolled' value.
A functional test was added to test the behaviour of settings inheritance.
2023-06-13 18:23:35 +02:00
Andrew Nicols
aa77a76c7a
Merge branch 'MDL-77933-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-08 12:03:37 +08:00
Jake Dallimore
da10ccd8d4
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:56:31 +08:00
Andrew Nicols
5a8881ac37
Merge branch 'MDL-76821-401' of https://github.com/snake/moodle into MOODLE_401_STABLE 2023-06-08 11:30:09 +08:00
Jake Dallimore
cbacf8ee58
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:29:01 +08:00
Jake Dallimore
b1dcb08e3f
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:40:29 +08:00
Simey Lameze
fc10598d63 MDL-69231 behat: remaining work for role capability generator
This commit does few things:
* Unify data generators usage to role short name.
* Replace remaining manual steps to use the new data generator.
* Also replaced other manual steps to set config to use data generators.
* Tidy up of some tests, aligning pipes and splitting one line steps into multiple lines.
* Fixes tests to have one Given/When/Then per scenario.
2023-06-02 12:42:35 +08:00
Andrew Nicols
c49877c8f5 MDL-69231 tests: Improve existing role generator
Support definition of context levels and permissions.
2023-06-02 12:42:35 +08:00
Angelia Dela Cruz
948ac8f62b MDL-70152 behat: Forum behat generators use UI
Behat cleanup and optimisation
2023-05-29 10:28:04 +08:00
Jake Dallimore
b3feea921d 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:11:09 +08:00
Jake Dallimore
22c346831e 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:11:06 +08:00
Jake Dallimore
75ba439f5b MDL-77990 enrol_lti: fix http_client shim by using curl getResponse
Fixes an error in the parsing of response headers containing multiple
HTTP responses in the raw response. Curl already handles this, so let
it do the work.
2023-05-05 10:44:19 +08:00
Jake Dallimore
159a131989 MDL-77990 enrol_lti: test covering the response header parsing
Makes sure the http_client shim properly returns the correct, final
http headers, not intermediate headers such as 302, 100 etc.
2023-05-05 10:44:18 +08:00
David Woloszyn
b3424d620d MDL-77840 enrol_lti: Avoid passing nulls to base64_encode 2023-05-03 09:36:17 +10:00
Jun Pataleta
bb61d8392b Merge branch 'MDL-77559-401-2' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-03-09 15:57:44 +08:00
Andrew Nicols
cd48ae56c7 MDL-77559 js: Rebuild all JS with Node 16 2023-03-09 09:53:19 +08:00
Andrew Nicols
d209e2cc57 MDL-77559 js: Revert "MDL-75012 js: Bump stylelint and components"
This reverts commit 644e9da8bb8418c1223ed394528f48bf2d9dea9c.
2023-03-09 08:21:15 +08:00
Víctor Déniz
98f10149d6 MDL-77416 lang: Use fixed strings in tests 2023-03-03 13:27:01 +00:00
Andrew Nicols
288620b0b4 MDL-75012 js: Full build of all grunt things 2023-03-02 12:15:25 +08:00
Andrew Nicols
644e9da8bb MDL-75012 js: Bump stylelint and components 2023-02-28 10:19:50 +08:00
Luca Bösch
46d8e08a16 MDL-77156 enrol_self: deprecated trim() of null in PHP 8.1 2023-02-10 18:16:58 +01:00
Angelia Dela Cruz
df1d34bea8 MDL-76658 Behat: Coverage for course cohort enrolment groups
Co-authored-by: Simey Lameze <simey@moodle.com>
2023-01-31 21:24:12 +08:00
Eloy Lafuente (stronk7)
03bc275093 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
2dd7290ccb 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:16:06 +08:00
Paul Holden
f5844e80fd Merge branch 'MDL-76803-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2023-01-10 16:24:16 +00:00
Jun Pataleta
8280476728 MDL-76803 lang: Update usages of reworded email display options 2023-01-10 16:01:44 +08:00
Jake Dallimore
18302e1244 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:39:17 +08:00
Jake Dallimore
2080ba7c83 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:39:09 +08:00
Amaia Anabitarte
93bd773ee9 MDL-75441 mod_forum: Show add new post button to guest users 2022-12-13 17:38:30 +01:00
Paul Holden
20ac0d1626 MDL-76490 behat: use defined step for interaction with autocomplete. 2022-12-05 14:22:19 +00:00
Jun Pataleta
d9cd25c2fb MDL-76497 upgrade: add the 4.1.0 separation line to all upgrade scripts 2022-12-01 08:59:07 +03:00
Jun Pataleta
00bae8b8a4 MDL-76403 versions: bump all versions and requires near release 2022-11-23 09:45:23 +08:00