24695 Commits

Author SHA1 Message Date
Ilya Tregubov
71cb542c60
Merge branch 'MDL-71494' of https://github.com/paulholden/moodle 2023-09-08 22:14:34 +08:00
Shamim Rezaie
4ded6f7fb9
Merge branch 'MDL-77545-master' of https://github.com/call-learning/moodle 2023-09-08 22:14:33 +08:00
Andrew Nicols
a5f4b6929a
Merge branch 'MDL-79286' of https://github.com/paulholden/moodle 2023-09-08 22:14:29 +08:00
Jun Pataleta
fdc726d7e4
Merge branch 'MDL-76034-master' of https://github.com/andrewnicols/moodle 2023-09-08 22:14:27 +08:00
Laurent David
0335adeff4 MDL-77545 mod_bigbluebuttonbn: Add form extension
* Add a new way to extend the BigBlueButtonBN form via subplugins
* Allow subplugins to extends information via new tables and use it in
the edit form.
* Add a new cache helping with potential perfomance issues introduced
by recurring calls to find out about associated tables in subplugins.
2023-09-07 17:20:05 +02:00
Laurent David
3d05bc7da3 MDL-77545 mod_bigbluebuttonbn: Refactor get_instances_implementing
* We need a way to either have the classes implementing an interface/abstract
class or create instances.
2023-09-07 17:17:51 +02:00
Paul Holden
b4a7583d58
MDL-79286 mod_quiz: account for users with multiple enrolments.
The quiz override form should account for this, to ensure duplicate
user records don't trigger DML debugging.
2023-09-07 11:33:58 +01:00
Paul Holden
56cd63a8f9
MDL-71494 mod_feedback: final removal of deprecated constructor param. 2023-09-05 09:09:26 +01:00
Andrew Nicols
ba1093c973
Merge branch 'MDL-78865' of https://github.com/danmarsden/moodle 2023-09-05 11:28:30 +08:00
Andrew Nicols
bbfa50946e
Merge branch 'MDL-79253-master' of https://github.com/junpataleta/moodle 2023-09-05 11:25:26 +08:00
Jun Pataleta
9392905d77
MDL-79253 mod_scorm: Require locallib when deleting SCORM instances 2023-09-04 21:24:11 +08:00
Andrew Nicols
c5227b336f
MDL-79248 mod_quiz: Behat scenario interacts incorrectly with select
This test was using the click operator to select an option value, rather
than selecting the value with form field steps.

In addition I found that sometimes the way in which a WS is used to
make the change before a refresh leads to a random failure if the page
navigation happens too slowly.
2023-09-04 11:57:04 +08:00
Andrew Nicols
1ce54ee87e
Merge branch 'MDL-72321_master-squashed' of https://github.com/marxjohnson/moodle 2023-08-31 23:02:35 +08:00
Nathan Nguyen
d9a75f5315 MDL-72321 core: backup/restore filter condition 2023-08-31 15:00:39 +01:00
Nathan Nguyen
e3bd166b3d MDL-72321 mod_quiz: Use new datafilters for random questions 2023-08-31 15:00:39 +01:00
Mark Johnson
823af3a8f1 MDL-72321 core_question: Replace old conditions with new datafilters 2023-08-31 15:00:39 +01:00
Huong Nguyen
ee45e0cbef
MDL-78907 mod_bigbluebuttonbn: Use the correct parameter type for id 2023-08-31 10:15:47 +07:00
Huong Nguyen
4062dfaafd
Merge branch 'MDL-78907-master' of https://github.com/call-learning/moodle 2023-08-31 10:10:13 +07:00
Ilya Tregubov
d302f0dc01
Merge branch 'MDL-78597-master' of https://github.com/snake/moodle 2023-08-31 08:23:03 +08:00
Jake Dallimore
a23abb0538
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.
2023-08-29 16:14:55 +08:00
Jake Dallimore
c497672778
MDL-78597 mod_lti: add category restriction support to course tools list 2023-08-29 16:14:37 +08:00
Jake Dallimore
7cb2a78626
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.
2023-08-29 16:14:37 +08:00
Jake Dallimore
5c737525d8
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.
2023-08-29 16:14:11 +08:00
Jake Dallimore
9914870b7d
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.
2023-08-29 16:14:11 +08:00
Jake Dallimore
dfd215cad2
MDL-78597 mod_lti: add cartridge support to course tool generator
Allow the generator to create course tools based on cartridge URLs.
2023-08-29 16:14:11 +08:00
Jake Dallimore
93707d8cf5
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.
2023-08-29 16:14:11 +08:00
Jun Pataleta
cc7bc1a553
Merge branch 'MDL-79064-master' of https://github.com/andrewnicols/moodle 2023-08-29 13:32:45 +08:00
Jake Dallimore
d8e2067b66
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.
2023-08-29 13:14:15 +08:00
Jake Dallimore
7ca26f1460
MDL-78597 mod_lti: add \mod_lti\local\types_helper class
This will serve as a location to put new tool-type-centric methods.
2023-08-29 13:11:49 +08:00
Jake Dallimore
85679c47da
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
5b01727107
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
6ed29fc35b
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
ca10084639
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
36900136a8
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
5862fe2607
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.
2023-08-29 13:06:48 +08:00
Jake Dallimore
7d1cd36e89
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.
2023-08-29 13:06:47 +08:00
Jake Dallimore
b3ef113509
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.
2023-08-29 13:06:47 +08:00
Jake Dallimore
8825c0a0fe
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.
2023-08-29 13:06:46 +08:00
Jake Dallimore
8ed8b6e9b9
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.
2023-08-29 13:05:55 +08:00
Jake Dallimore
6f4555d31d
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.
2023-08-29 13:05:55 +08:00
Andrew Nicols
5349b8aecf
Merge branch 'MDL-79059-master-2' of https://github.com/junpataleta/moodle 2023-08-29 11:36:16 +08:00
Andrew Nicols
af7719682d
MDL-79064 core: Update all get_strings as uses 2023-08-29 10:57:54 +08:00
Sara Arjona
d52ea4c037
Merge branch 'MDL-78749-master' of https://github.com/BruceGoodGuy/moodle 2023-08-28 14:26:02 +02:00
Jun Pataleta
be35034f1c
Merge branch 'MDL-76974' of https://github.com/paulholden/moodle 2023-08-28 17:03:27 +08:00
Jun Pataleta
ae42728bb9
Merge branch 'MDL-74679-master' of https://github.com/whuml/moodle 2023-08-28 11:51:37 +08:00
Laurent David
23caba90bd MDL-78907 mod_bigbluebuttonbn: Get cm when necessary
* The constructor of mod_bigbluebuttonbn\instance was provided with a cm_info.
This forced us to retrieve it whenever we created an instance. The issue is that
sometimes we need all the "other" data but not necessarily the cm_info.
So we now lazy load it.
2023-08-28 05:45:17 +02:00
Laurent David
fdaa738bb5 MDL-78907 mod_bigbluebuttonbn: Refactor instance class
* Make the constructor private as it should only be instancied through
static methods
* Do not duplicate the code between get_from_instanceid,
get_from_cmid and get_all_instances_in_course
2023-08-28 05:45:17 +02:00
Jun Pataleta
d6f6443993
NOBUG: Fixed file access permissions 2023-08-26 11:04:43 +08:00
Jun Pataleta
f9c46d0026
MDL-79059 mod_data: Enclose preset options within a fieldset
Enclosing the radio buttons in a fieldset to provide additional context
to the purpose of the fields.
2023-08-26 10:39:05 +08:00
Jun Pataleta
59d5458c7f
MDL-79059 mod_data: Fix presets accessibility issues
* Add sr-only column headers for the select and actions columns.
* Define unique IDs for the preset name links using array indices.
* Label the radio buttons via aria-labelledby attribute pointing to
the ID of the preset's link.
2023-08-26 10:39:04 +08:00