integration.git
2 years agoMDL-79205 webservice: gracefully handle invalid functions in docs. 6e9e73aba09ee4f749af37a3a1d4743db0fcafaf
Paul Holden [Thu, 31 Aug 2023 13:48:58 +0000 (14:48 +0100)]
MDL-79205 webservice: gracefully handle invalid functions in docs.

2 years agoweekly release 4.3dev+
Andrew Nicols [Sat, 2 Sep 2023 00:18:19 +0000 (08:18 +0800)]
weekly release 4.3dev+

2 years agoNOBUG: Fixed SVG browser compatibility
Andrew Nicols [Sat, 2 Sep 2023 00:18:16 +0000 (08:18 +0800)]
NOBUG: Fixed SVG browser compatibility

2 years agoMDL-72321 question bank: Only update edit switch URL if present
Mark Johnson [Fri, 1 Sep 2023 15:38:09 +0000 (16:38 +0100)]
MDL-72321 question bank: Only update edit switch URL if present

2 years agoMDL-72321 datafilter: Stop disabling jointype field
Mark Johnson [Fri, 1 Sep 2023 15:30:40 +0000 (16:30 +0100)]
MDL-72321 datafilter: Stop disabling jointype field

This was causing behat test failures due to the test trying to
set the disabled jointype field before the filter type was selected.

2 years agoMerge branch 'mdl-79204-master' of https://github.com/james-cnz/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:58:51 +0000 (11:58 +0800)]
Merge branch 'mdl-79204-master' of https://github.com/james-cnz/moodle

2 years agoMerge branch 'MDL-79108-master' of https://github.com/sarjona/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:55:59 +0000 (11:55 +0800)]
Merge branch 'MDL-79108-master' of https://github.com/sarjona/moodle

2 years agoMerge branch 'MDL-74828-master' of https://github.com/andrewnicols/moodle
Huong Nguyen [Fri, 1 Sep 2023 03:53:38 +0000 (10:53 +0700)]
Merge branch 'MDL-74828-master' of https://github.com/andrewnicols/moodle

2 years agoMerge branch 'MDL-78930-master' of https://github.com/sarjona/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:46:15 +0000 (11:46 +0800)]
Merge branch 'MDL-78930-master' of https://github.com/sarjona/moodle

2 years agoMerge branch 'MDL-76092-master' of https://github.com/andrewnicols/moodle
Huong Nguyen [Fri, 1 Sep 2023 03:41:18 +0000 (10:41 +0700)]
Merge branch 'MDL-76092-master' of https://github.com/andrewnicols/moodle

2 years agoMerge branch 'MDL-78966-master' of https://github.com/rjnl/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:31:17 +0000 (11:31 +0800)]
Merge branch 'MDL-78966-master' of https://github.com/rjnl/moodle

2 years agoMerge branch 'MDL-79042-master' of https://github.com/andrewnicols/moodle
Huong Nguyen [Fri, 1 Sep 2023 03:28:54 +0000 (10:28 +0700)]
Merge branch 'MDL-79042-master' of https://github.com/andrewnicols/moodle

2 years agoMerge branch 'MDL-78179-master' of https://github.com/sarjona/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:25:22 +0000 (11:25 +0800)]
Merge branch 'MDL-78179-master' of https://github.com/sarjona/moodle

2 years agoMerge branch 'MDL-74429-master' of https://github.com/roland04/moodle
Ilya Tregubov [Fri, 1 Sep 2023 03:15:09 +0000 (11:15 +0800)]
Merge branch 'MDL-74429-master' of https://github.com/roland04/moodle

2 years agoMerge branch 'MDL-79190-master' of https://github.com/jbs1/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:12:55 +0000 (11:12 +0800)]
Merge branch 'MDL-79190-master' of https://github.com/jbs1/moodle

2 years agoMDL-79051 Authentication: MFA Improve email template
Matt Porritt [Mon, 21 Aug 2023 01:33:56 +0000 (11:33 +1000)]
MDL-79051 Authentication: MFA Improve email template

Improve the layout, display and information architecture of
the email sent that contains the code for the email MFA factor.

2 years agoMerge branch 'MDL-79198-master' of https://github.com/junpataleta/moodle
Ilya Tregubov [Fri, 1 Sep 2023 03:03:22 +0000 (11:03 +0800)]
Merge branch 'MDL-79198-master' of https://github.com/junpataleta/moodle

2 years agoMerge branch 'MDL-77979-master' of https://github.com/meirzamoodle/moodle
Andrew Nicols [Fri, 1 Sep 2023 03:00:59 +0000 (11:00 +0800)]
Merge branch 'MDL-77979-master' of https://github.com/meirzamoodle/moodle

2 years agoMerge branch 'MDL-78745-master' of https://github.com/meirzamoodle/moodle
Ilya Tregubov [Fri, 1 Sep 2023 02:52:26 +0000 (10:52 +0800)]
Merge branch 'MDL-78745-master' of https://github.com/meirzamoodle/moodle

2 years agoMerge branch 'MDL-79045-master' of https://github.com/junpataleta/moodle
Andrew Nicols [Fri, 1 Sep 2023 02:46:34 +0000 (10:46 +0800)]
Merge branch 'MDL-79045-master' of https://github.com/junpataleta/moodle

2 years agoMerge branch 'MDL-77831-master' of https://github.com/mickhawkins/moodle
Andrew Nicols [Fri, 1 Sep 2023 02:37:41 +0000 (10:37 +0800)]
Merge branch 'MDL-77831-master' of https://github.com/mickhawkins/moodle

2 years agoMDL-77979 tiny_noautolink: Add the noautolink plugin to the quickbar
meirzamoodle [Tue, 22 Aug 2023 03:32:35 +0000 (10:32 +0700)]
MDL-77979 tiny_noautolink: Add the noautolink plugin to the quickbar

Modified the addQuickbarsToolbarItem function on the util to make the additional toolbar item work.

2 years agoMDL-77979 tiny_noautolink: Add a TinyMCE noautolink plugin
meirzamoodle [Wed, 16 Aug 2023 10:17:56 +0000 (17:17 +0700)]
MDL-77979 tiny_noautolink: Add a TinyMCE noautolink plugin

2 years agoMerge branch 'MDL-79202' of https://github.com/paulholden/moodle
Ilya Tregubov [Fri, 1 Sep 2023 02:29:41 +0000 (10:29 +0800)]
Merge branch 'MDL-79202' of https://github.com/paulholden/moodle

2 years agoMerge branch 'MDL-79102-master' of https://github.com/sarjona/moodle
Andrew Nicols [Fri, 1 Sep 2023 02:15:19 +0000 (10:15 +0800)]
Merge branch 'MDL-79102-master' of https://github.com/sarjona/moodle

2 years agoMDL-72321 question: Ensure that all instance props are defined
Andrew Nicols [Fri, 1 Sep 2023 01:21:33 +0000 (09:21 +0800)]
MDL-72321 question: Ensure that all instance props are defined

Since PHP 8.2, all properties on a class must be defined as the PHP
Dynamic Property feature has been deprecated.

This commit goes one step further and switches this class to using
constructor property promotion. This language feature has been available
since PHP 8.0 and allows for simplified creation of class properties
which are initially defined in the constructor.

2 years agoMerge branch 'MDL-79144-master' of https://github.com/marinaglancy/moodle
Andrew Nicols [Fri, 1 Sep 2023 01:39:28 +0000 (09:39 +0800)]
Merge branch 'MDL-79144-master' of https://github.com/marinaglancy/moodle

2 years agoMerge branch 'MDL-79107-master-2' of https://github.com/andrewnicols/moodle
Ilya Tregubov [Fri, 1 Sep 2023 01:24:30 +0000 (09:24 +0800)]
Merge branch 'MDL-79107-master-2' of https://github.com/andrewnicols/moodle

2 years agoMDL-79107 editor_tiny: Target correct element on editor removal
Andrew Nicols [Fri, 1 Sep 2023 01:06:01 +0000 (09:06 +0800)]
MDL-79107 editor_tiny: Target correct element on editor removal

2 years agoMerge branch 'MDL-72321_master-squashed' of https://github.com/marxjohnson/moodle
Andrew Nicols [Thu, 31 Aug 2023 15:02:14 +0000 (23:02 +0800)]
Merge branch 'MDL-72321_master-squashed' of https://github.com/marxjohnson/moodle

2 years agoMDL-72321 core: backup/restore filter condition
Nathan Nguyen [Thu, 29 Sep 2022 04:07:26 +0000 (14:07 +1000)]
MDL-72321 core: backup/restore filter condition

2 years agoMDL-72321 mod_quiz: Use new datafilters for random questions
Nathan Nguyen [Wed, 28 Sep 2022 05:57:50 +0000 (15:57 +1000)]
MDL-72321 mod_quiz: Use new datafilters for random questions

2 years agoMDL-72321 core_question: Replace old conditions with new datafilters
Mark Johnson [Thu, 25 May 2023 12:29:46 +0000 (13:29 +0100)]
MDL-72321 core_question: Replace old conditions with new datafilters

2 years agoMDL-72321 qbank_usage: Only load javascript if plugin is enabled
Mark Johnson [Thu, 25 May 2023 12:33:19 +0000 (13:33 +0100)]
MDL-72321 qbank_usage: Only load javascript if plugin is enabled

2 years agoMDL-72321 qbank_comment: Only initialise javascript if plugin is enabled
Nathan Nguyen [Mon, 26 Sep 2022 06:04:01 +0000 (16:04 +1000)]
MDL-72321 qbank_comment: Only initialise javascript if plugin is enabled

2 years agoMDL-72321 qbank_bulkmove: Rewrite unit test
Mark Johnson [Tue, 23 May 2023 14:57:09 +0000 (15:57 +0100)]
MDL-72321 qbank_bulkmove: Rewrite unit test

This reduces code duplication and removes the dependency on
\core_question\local\bank\view from the test.

2 years agoMDL-72321 core: Support disabled options in form-autocomplete
Mark Johnson [Mon, 24 Jul 2023 13:57:30 +0000 (14:57 +0100)]
MDL-72321 core: Support disabled options in form-autocomplete

Autocomplete fields can now include disabled options in the suggestion
list. When calling .enchance() on a select list with disabled options,
those options will be added to the autocomplete suggestions with the
aria-disabled arribute set, and will not be selectable.

Datafilters using the autocomplete element can also hook into this by
including disabled options in their list of values.

2 years agoMDL-72321 core: Allow datafilters to specify a subset of join types
Mark Johnson [Tue, 18 Jul 2023 13:16:38 +0000 (14:16 +0100)]
MDL-72321 core: Allow datafilters to specify a subset of join types

A datafilter can now specify a subset of jointypes that it supports from
the default list of all, any or none. By default all options will be
available, but an individual filter can ovveride this to include just
those options that make sense for the filter. If only one option is
allowed, the select list will be hidden to simplify the UI.

2 years agoMDL-72321 core: Add binary datafilter
Nathan Nguyen [Fri, 16 Sep 2022 02:54:06 +0000 (12:54 +1000)]
MDL-72321 core: Add binary datafilter

This adds a new datafilter type which provides a single binary choice
(for example yes/no).

2 years agoMerge branch 'MDL-79107-master' of https://github.com/junpataleta/moodle
Jun Pataleta [Thu, 31 Aug 2023 13:09:56 +0000 (21:09 +0800)]
Merge branch 'MDL-79107-master' of https://github.com/junpataleta/moodle

2 years agoMDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay
Jun Pataleta [Thu, 31 Aug 2023 12:41:54 +0000 (20:41 +0800)]
MDL-79107 qtype_essay: Move non_form_fields.feature under qtype_essay

2 years agoMDL-79107 editor_tiny: Inform Behat of field type
Andrew Nicols [Tue, 22 Aug 2023 14:10:05 +0000 (22:10 +0800)]
MDL-79107 editor_tiny: Inform Behat of field type

2 years agoMerge branch 'MDL-79017' of https://github.com/paulholden/moodle
Jun Pataleta [Thu, 31 Aug 2023 12:32:17 +0000 (20:32 +0800)]
Merge branch 'MDL-79017' of https://github.com/paulholden/moodle

2 years agoMDL-77831 core: Updated security.txt expiry and added additional info
Michael Hawkins [Thu, 31 Aug 2023 05:13:03 +0000 (13:13 +0800)]
MDL-77831 core: Updated security.txt expiry and added additional info

2 years agoMerge branch 'MDL-77657-master-get_extra_scss_code-wrong-order' of https://github...
Jun Pataleta [Thu, 31 Aug 2023 09:51:17 +0000 (17:51 +0800)]
Merge branch 'MDL-77657-master-get_extra_scss_code-wrong-order' of https://github.com/danowar2k/moodle

2 years agoMerge branch 'MDL-78530-master' of https://github.com/aanabit/moodle
Sara Arjona [Thu, 31 Aug 2023 09:10:17 +0000 (11:10 +0200)]
Merge branch 'MDL-78530-master' of https://github.com/aanabit/moodle

2 years agoMerge branch 'MDL-56020-master' of https://github.com/jleyva/moodle
Huong Nguyen [Thu, 31 Aug 2023 08:38:50 +0000 (15:38 +0700)]
Merge branch 'MDL-56020-master' of https://github.com/jleyva/moodle

2 years agoMDL-78530 core_completion: Remove $CFG->completiondefault setting
Amaia Anabitarte [Wed, 26 Jul 2023 16:24:15 +0000 (18:24 +0200)]
MDL-78530 core_completion: Remove $CFG->completiondefault setting

2 years agoMDL-78530 core_completion: Use site default completion or none
Amaia Anabitarte [Wed, 26 Jul 2023 15:59:02 +0000 (17:59 +0200)]
MDL-78530 core_completion: Use site default completion or none

When creating a new activity we should use course level default completion
and site level completion if there is no course level default completion.

For non defined default completion values use COMPLETION_TRACKING_NONE
instead of COMPLETION_TRACKING_MANUAL.

2 years agoMDL-78530 core_completion: New default completion behat generator
Amaia Anabitarte [Wed, 2 Aug 2023 18:38:48 +0000 (20:38 +0200)]
MDL-78530 core_completion: New default completion behat generator

2 years agoMerge branch 'MDL-79207-master' of https://github.com/andelacruz/moodle
Huong Nguyen [Thu, 31 Aug 2023 05:26:19 +0000 (12:26 +0700)]
Merge branch 'MDL-79207-master' of https://github.com/andelacruz/moodle

2 years agoMerge branch 'MDL-32278-master' of https://github.com/sammarshallou/moodle
Huong Nguyen [Thu, 31 Aug 2023 03:46:41 +0000 (10:46 +0700)]
Merge branch 'MDL-32278-master' of https://github.com/sammarshallou/moodle

2 years agoMDL-78907 mod_bigbluebuttonbn: Use the correct parameter type for id
Huong Nguyen [Thu, 31 Aug 2023 03:15:47 +0000 (10:15 +0700)]
MDL-78907 mod_bigbluebuttonbn: Use the correct parameter type for id

2 years agoMerge branch 'MDL-78907-master' of https://github.com/call-learning/moodle
Huong Nguyen [Thu, 31 Aug 2023 03:10:13 +0000 (10:10 +0700)]
Merge branch 'MDL-78907-master' of https://github.com/call-learning/moodle

2 years agoMDL-79207 core_course: Behat coverage for activity and resource deletion
Angelia Dela Cruz [Wed, 30 Aug 2023 11:22:59 +0000 (19:22 +0800)]
MDL-79207 core_course: Behat coverage for activity and resource deletion

2 years agoMDL-79045 grade: Don't enclose grade user_heading in $OUTPUT->heading()
Jun Pataleta [Wed, 30 Aug 2023 12:21:53 +0000 (20:21 +0800)]
MDL-79045 grade: Don't enclose grade user_heading in $OUTPUT->heading()

Do not enclose \core_grades_renderer::user_heading() in
$OUTPUT->heading() and enclose the user's name in the user heading in
<h2> tags instead.
- Having <div> inside <h2> results in errors in HTML validation.
- Enclosing the whole user heading in <h2> results in the other
elements in the user heading (Message, Add to contacts) to be announced
to screen readers which can result in confusion.

2 years agoMerge branch 'MDL-78597-master' of https://github.com/snake/moodle
Ilya Tregubov [Thu, 31 Aug 2023 00:23:03 +0000 (08:23 +0800)]
Merge branch 'MDL-78597-master' of https://github.com/snake/moodle

2 years agoMerge branch 'MDL-78612-master' of https://github.com/andrewnicols/moodle
Sara Arjona [Wed, 30 Aug 2023 15:55:32 +0000 (17:55 +0200)]
Merge branch 'MDL-78612-master' of https://github.com/andrewnicols/moodle

2 years agoMDL-78530 core_completion: New site default activity completion page
Amaia Anabitarte [Fri, 21 Jul 2023 10:27:26 +0000 (12:27 +0200)]
MDL-78530 core_completion: New site default activity completion page

2 years agoMDL-78612 core: Wrap modal_factory.create in pendingPromise
Andrew Nicols [Wed, 30 Aug 2023 04:41:37 +0000 (12:41 +0800)]
MDL-78612 core: Wrap modal_factory.create in pendingPromise

2 years agoMDL-78745 editor_tiny: Stored text in non-entity form
meirzamoodle [Tue, 29 Aug 2023 09:26:47 +0000 (16:26 +0700)]
MDL-78745 editor_tiny: Stored text in non-entity form

TinyMCE has a default entity_encoding 'named',
which causes text with diacritic symbols to be converted to HTML entities,
e.g. pâté will be convert to p&acirc;t&eacute;
That will be a problem with the Glossary auto-linking filter if a course has a text concept like pâté,
then the filter will likely fail to get the text concept.
Changing the TinyMCE entity_encoding to 'raw' will resolve the problem.

2 years agoMDL-79204 course: Remove HTML tag trailing slashes
james-cnz [Wed, 30 Aug 2023 00:21:14 +0000 (12:21 +1200)]
MDL-79204 course: Remove HTML tag trailing slashes

2 years agoMDL-79202 tool_mobile: correctly interpolate minutes in exception.
Paul Holden [Tue, 29 Aug 2023 23:04:58 +0000 (00:04 +0100)]
MDL-79202 tool_mobile: correctly interpolate minutes in exception.

2 years agoMDL-79190 theme_boost: removed obsolete comment
Jeremy Schulz [Mon, 28 Aug 2023 13:57:50 +0000 (15:57 +0200)]
MDL-79190 theme_boost: removed obsolete comment

2 years agoMerge branch 'MDL-72359-master' of https://github.com/HuongNV13/moodle
Sara Arjona [Tue, 29 Aug 2023 14:15:36 +0000 (16:15 +0200)]
Merge branch 'MDL-72359-master' of https://github.com/HuongNV13/moodle

2 years agoMDL-72359 core_analytics: Better handling of MAX_TIME
Huong Nguyen [Tue, 29 Aug 2023 13:07:38 +0000 (20:07 +0700)]
MDL-72359 core_analytics: Better handling of MAX_TIME

We are limited by both PHP's max int value and DB (cross-db) max int allowed.
We need to use the smallest one

2 years agoMDL-79198 core: Increment static variable properly
Jun Pataleta [Tue, 29 Aug 2023 08:44:16 +0000 (16:44 +0800)]
MDL-79198 core: Increment static variable properly

2 years agoMDL-78597 mod_lti: fix those tests not using lti generators
Jake Dallimore [Tue, 29 Aug 2023 03:45:36 +0000 (11:45 +0800)]
MDL-78597 mod_lti: fix those tests not using lti generators

The following were added in MDL-69489 and had a few issues, which are
fixed in this patch:
Unit tests:
- were not using the existing generator.
- were making assertions inside a foreach, which doesn't test anything
if the result set returned is empty (error prone).
- were calling setAdminUser() unnecessarily.
Behat tests:
- the restricttocategory.feature file used manual steps to setup site
tools.

2 years agoMDL-78597 mod_lti: add category restriction support to course tools list
Jake Dallimore [Tue, 29 Aug 2023 08:10:45 +0000 (16:10 +0800)]
MDL-78597 mod_lti: add category restriction support to course tools list

2 years agoMDL-78597 mod_lti: add category restriction support to lti generator
Jake Dallimore [Tue, 29 Aug 2023 08:08:53 +0000 (16:08 +0800)]
MDL-78597 mod_lti: add category restriction support to lti generator

This is already supported in lti_add_type, via the lti_coursecategories
config value, so all that's needed is to match the categories by
idnumber and pass through the resulting ids.

2 years agoMDL-78597 mod_lti: Add test for manually configured instance editing
Jake Dallimore [Thu, 10 Aug 2023 01:29:57 +0000 (09:29 +0800)]
MDL-78597 mod_lti: Add test for manually configured instance editing

This adds a single scenario covering all the expected behavior for those
existing, manually configured tools. It also removes any tests dealing
with creation of manually configured instances, which is not supported
any more.

2 years agoMDL-78597 mod_lti: cover creation of course tools using cartridge URLs
Jake Dallimore [Wed, 9 Aug 2023 08:23:04 +0000 (16:23 +0800)]
MDL-78597 mod_lti: cover creation of course tools using cartridge URLs

This replaces the legacy scenario, which used the '+' on the activity
instance edit form, with a scenario covering the cartridge use on the
new course tools (LTI External tools) edit form.

2 years agoMDL-78597 mod_lti: add cartridge support to course tool generator
Jake Dallimore [Wed, 9 Aug 2023 08:12:21 +0000 (16:12 +0800)]
MDL-78597 mod_lti: add cartridge support to course tool generator

Allow the generator to create course tools based on cartridge URLs.

2 years agoMDL-78597 mod_lti: deprecate mod/lti:addmanualinstance and lock config
Jake Dallimore [Fri, 4 Aug 2023 04:20:58 +0000 (12:20 +0800)]
MDL-78597 mod_lti: deprecate mod/lti:addmanualinstance and lock config

This change:
- removes all uses of mod/lti:addmanualinstance and deprecates it.
- updates the activity instance edit form, specifically the way it deals
with existing manually-configured instances, removing the ability to
edit tool configuration and adding a notice to the user.

2 years agoMerge branch 'master_MDL-79134' of https://github.com/mattporritt/moodle
Andrew Nicols [Tue, 29 Aug 2023 04:01:26 +0000 (12:01 +0800)]
Merge branch 'master_MDL-79134' of https://github.com/mattporritt/moodle

2 years agoMerge branch 'MDL-78615' of https://github.com/paulholden/moodle
Ilya Tregubov [Tue, 29 Aug 2023 03:59:02 +0000 (11:59 +0800)]
Merge branch 'MDL-78615' of https://github.com/paulholden/moodle

2 years agoMerge branch 'MDL-72359-master' of https://github.com/andrewnicols/moodle
Huong Nguyen [Tue, 29 Aug 2023 03:57:38 +0000 (10:57 +0700)]
Merge branch 'MDL-72359-master' of https://github.com/andrewnicols/moodle

2 years agoMerge branch 'MDL-79064-master' of https://github.com/andrewnicols/moodle
Jun Pataleta [Tue, 29 Aug 2023 03:54:13 +0000 (11:54 +0800)]
Merge branch 'MDL-79064-master' of https://github.com/andrewnicols/moodle

2 years agoMerge branch '78241-master-tiny-recordrtc-fix-availability-conditions' of https:...
Huong Nguyen [Tue, 29 Aug 2023 03:52:46 +0000 (10:52 +0700)]
Merge branch '78241-master-tiny-recordrtc-fix-availability-conditions' of https://github.com/DSI-Universite-Rennes2/moodle

2 years agoMerge branch 'MDL-78106-master' of https://github.com/kevpercy/moodle
Andrew Nicols [Tue, 29 Aug 2023 03:48:42 +0000 (11:48 +0800)]
Merge branch 'MDL-78106-master' of https://github.com/kevpercy/moodle

2 years agoMerge branch 'MDL-78961' of https://github.com/paulholden/moodle
Huong Nguyen [Tue, 29 Aug 2023 03:47:12 +0000 (10:47 +0700)]
Merge branch 'MDL-78961' of https://github.com/paulholden/moodle

2 years agoMDL-78597 mod_lti: deprecate lti_get_lti_types_by_course()
Jake Dallimore [Tue, 1 Aug 2023 05:51:09 +0000 (13:51 +0800)]
MDL-78597 mod_lti: deprecate lti_get_lti_types_by_course()

This method includes broken legacy behaviour in which the inclusion of
course and site tools could be controlled independently, based on the
capabilities 'mod/lti:addmanualinstance' (to include course tools) and
'mod/lti:addpreconfiguredinstance' (to include site tools). This
behaviour is deprecated in 4.3, so this method is also deprecated. See
the replacement method types_helper::get_lti_types_by_course.

2 years agoMDL-78597 mod_lti: add \mod_lti\local\types_helper class
Jake Dallimore [Tue, 1 Aug 2023 05:48:23 +0000 (13:48 +0800)]
MDL-78597 mod_lti: add \mod_lti\local\types_helper class

This will serve as a location to put new tool-type-centric methods.

2 years agoMDL-78597 core_course: fix content item tests covering get_all cases
Jake Dallimore [Tue, 1 Aug 2023 04:15:41 +0000 (12:15 +0800)]
MDL-78597 core_course: fix content item tests covering get_all cases

Fixes two tests which use the lti module as an example of a core mod
implementing the 'get_all_content_items' callback. The setup of the mod
in these tests, including course and site tools, needed to be updated
in light of the removal of the 'external tool' content item.

2 years agoMDL-78597 mod_lti: let content item callbacks obey preconfigured cap
Jake Dallimore [Tue, 1 Aug 2023 04:10:26 +0000 (12:10 +0800)]
MDL-78597 mod_lti: let content item callbacks obey preconfigured cap

Users without the 'mod/lti:addpreconfiguredinstance' capability won't be
able to see any mod_lti content items in the activity chooser.
Note: this patch doesn't address the underlying locallib method,
lti_get_lti_types_by_course(), which will be addressed elsewhere.

2 years agoMDL-78597 mod_lti: retain selected option when arranging into optgroups
Jake Dallimore [Thu, 27 Jul 2023 07:29:19 +0000 (15:29 +0800)]
MDL-78597 mod_lti: retain selected option when arranging into optgroups

Fixes a bug with YUI, resulting in the selected option not being set
properly again after the options have been reorganised into optgroups.

2 years agoMDL-78597 mod_lti: prevent manual instance use in edit form
Jake Dallimore [Wed, 26 Jul 2023 09:19:28 +0000 (17:19 +0800)]
MDL-78597 mod_lti: prevent manual instance use in edit form

This change ensures tool instances which are currently using
preconfigured tools (site or course level) are not able to be switched
back to use the manual 'Automatic, based on tool URL' option. That
option is reserved for legacy tool support of manual instances and
domain-matched site tools, but must not be selectable otherwise.

2 years agoMDL-78597 mod_lti: remove the ability to add manual instances of tools
Jake Dallimore [Wed, 26 Jul 2023 06:14:12 +0000 (14:14 +0800)]
MDL-78597 mod_lti: remove the ability to add manual instances of tools

In summary:
- Remove the 'External tool' item from get_course_content_items()
hook, which results in its removal from the activity chooser.
- Remove the 'External tool' item from get_all_content_items() hook,
which results in its removal from the admin activity chooser
recommendations page.
- Prevent use of the edit_form for creation of new manual instances.
- Retain the ability to edit existing manual instances.
- Fix tests expecting external tool.

2 years agoMDL-78597 mod_lti: add instance creation to behat creatable entities
Jake Dallimore [Sun, 30 Jul 2023 05:50:47 +0000 (13:50 +0800)]
MDL-78597 mod_lti: add instance creation to behat creatable entities

This allows behat tests which have already created either a site or
course tool type, to then link it to an activity instance using a
generator. This depends on the ability to name match a type.

2 years agoMDL-78597 mod_lti: add full field support to course_tool_types generator
Jake Dallimore [Sat, 29 Jul 2023 08:29:09 +0000 (16:29 +0800)]
MDL-78597 mod_lti: add full field support to course_tool_types generator

This method is used by behat only, where only a single arg is received.
The method lti_add_type() expects two params: type and config, but will
only ever receive one. This means not all the fields can be set when
creating an lti type. This change:
- Removes the superfluous param which the method won't receive
- Improves the logic for handling type and type config data, making it
match what happens when creating types via mforms.
- Adds relative URL support to the baseurl field, allowing behat
features to create types using local tool fixtures.
- Sets sensible default for missing config data, allowing the created
tool type to be used in launches in places like behat.

2 years agoMDL-78597 mod_lti: add full field support to tool_types generator
Jake Dallimore [Sat, 29 Jul 2023 07:16:27 +0000 (15:16 +0800)]
MDL-78597 mod_lti: add full field support to tool_types generator

This method is used by behat only, where only a single arg is received.
The method lti_add_type() expects two params: type and config, but will
only ever receive one. This means not all the fields can be set when
creating an lti type. This change:
- Removes the superfluous param which the method won't receive
- Improves the logic for handling type and type config data, making it
match what happens when creating types via mforms.
- Adds relative URL support to the baseurl field, allowing behat
features to create types using local tool fixtures.
- Sets sensible default for missing config data, allowing the created
tool type to be used in launches in places like behat.

2 years agoMDL-78597 mod_lti: set instance vars in mod_edit form
Jake Dallimore [Wed, 26 Jul 2023 09:01:38 +0000 (17:01 +0800)]
MDL-78597 mod_lti: set instance vars in mod_edit form

This introduces a form constructor and sets up instance vars for the
object there, allowing removal of the optional_param() calls in other
methods.

2 years agoMDL-78597 mod_lti: remove tool configuration usage for course tools
Jake Dallimore [Wed, 26 Jul 2023 04:13:57 +0000 (12:13 +0800)]
MDL-78597 mod_lti: remove tool configuration usage for course tools

This change removes the 'Tool configuration usage' control for course
tools being edited via site admin. All course tools are, at a minimum,
considered to be preconfigured tools and are visible in the course.
The visibility of course tools in the activity chooser will be
controlled via the LTI External tools course page in future.

2 years agoMDL-78597 mod_lti: make new course tools show in activity chooser
Jake Dallimore [Tue, 25 Jul 2023 10:12:00 +0000 (18:12 +0800)]
MDL-78597 mod_lti: make new course tools show in activity chooser

This will only impact newly created course tools, not existing tools.
Existing tools will be listed in the LTI External tools page and
teachers will be able to add them to the activity chooser from there.

2 years agoMDL-78597 mod_lti: improve DB reads on coursetooledit page
Jake Dallimore [Tue, 25 Jul 2023 03:00:08 +0000 (11:00 +0800)]
MDL-78597 mod_lti: improve DB reads on coursetooledit page

This was hitting the lti_types table twice, via both lti_get_type and
lti_get_type_type_config. This change adds course to the stdClass
returned by the latter, so we can just make a single call to that.
This also permits the use of that course property in other places
where we'd like to have access to it, such as when editing a pre-
configured tool at site level.

2 years agoMDL-78509 tool_mfa: Improve PHPUnit for factor_cohort and factor_role
Huong Nguyen [Tue, 29 Aug 2023 03:39:58 +0000 (10:39 +0700)]
MDL-78509 tool_mfa: Improve PHPUnit for factor_cohort and factor_role

2 years agoMerge branch 'MDL-78509-master' of https://github.com/stevandoMoodle/moodle
Huong Nguyen [Tue, 29 Aug 2023 03:38:27 +0000 (10:38 +0700)]
Merge branch 'MDL-78509-master' of https://github.com/stevandoMoodle/moodle

2 years agoMerge branch 'MDL-79059-master-2' of https://github.com/junpataleta/moodle
Andrew Nicols [Tue, 29 Aug 2023 03:36:16 +0000 (11:36 +0800)]
Merge branch 'MDL-79059-master-2' of https://github.com/junpataleta/moodle

2 years agoMerge branch 'MDL-79085' of https://github.com/paulholden/moodle
Jun Pataleta [Tue, 29 Aug 2023 03:29:43 +0000 (11:29 +0800)]
Merge branch 'MDL-79085' of https://github.com/paulholden/moodle

2 years agoMerge branch 'MDL-79092-master' of https://github.com/rhell4/moodle
Andrew Nicols [Tue, 29 Aug 2023 03:22:03 +0000 (11:22 +0800)]
Merge branch 'MDL-79092-master' of https://github.com/rhell4/moodle