24654 Commits

Author SHA1 Message Date
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
Jun Pataleta
d6f6443993
NOBUG: Fixed file access permissions 2023-08-26 11:04:43 +08:00
Jun Pataleta
33c8754de9
Merge branch 'MDL-78579' of https://github.com/paulholden/moodle 2023-08-25 10:47:11 +08:00
Simey Lameze
50ef8cdd3f MDL-79015 behat: make verification step more specific 2023-08-25 08:38:43 +08:00
Andrew Nicols
b29b6649fc
Merge branch 'MDL-79075-attempt_reviewed' of https://github.com/leonstr/moodle 2023-08-25 00:15:30 +08:00
Jun Pataleta
da40dfa6b6
MDL-61165 mod_workshop: Bump version to remove legacy scheduled tasks
* We need to bump the plugin version in order for
\core\task\manager::reset_scheduled_tasks_for_component() to be run
and clear the removed legacy scheduled task.
2023-08-24 23:57:08 +08:00
Jun Pataleta
bd057ca936
MDL-61165 mod_quiz: Bump version to clear removed legacy scheduled tasks
* We need to bump the plugin version in order for
\core\task\manager::reset_scheduled_tasks_for_component() to be run
and clear the removed legacy scheduled tasks.
2023-08-24 23:57:07 +08:00
Sara Arjona
a2bcc9f354
Merge branch 'MDL-78965-master' of https://github.com/andelacruz/moodle 2023-08-24 16:38:22 +02:00
Huong Nguyen
7370b09777
Merge branch 'MDL-78302' of https://github.com/paulholden/moodle 2023-08-24 15:25:43 +07:00
Jun Pataleta
3f84386a4a
Merge branch 'MDL-79015-master' of https://github.com/andelacruz/moodle 2023-08-24 15:52:58 +08:00
Angelia Dela Cruz
c3e7065862 MDL-79015 mod_lesson: Behat coverage for lesson with access restriction 2023-08-24 15:45:16 +08:00
Andrew Nicols
5a44292a05
Merge branch 'MDL-78291-master' of https://github.com/ferranrecio/moodle 2023-08-24 14:39:37 +08:00
Angelia Dela Cruz
0cd8ddaba3 MDL-78965 mod_quiz: Behat coverage for quiz with certainty-based marking 2023-08-24 14:37:59 +08:00
Ilya Tregubov
3e8a5c4277
Merge branch 'MDL-78062-master' of https://github.com/call-learning/moodle 2023-08-24 14:14:34 +08:00
Laurent David
79d368e453 MDL-78062 mod_bigblubuttonbn: Add backup for subplugin 2023-08-24 07:35:40 +02:00
Jun Pataleta
51df6abdc7
Merge branch 'MDL-78941-master' of https://github.com/andelacruz/moodle 2023-08-24 13:06:29 +08:00
Jun Pataleta
12e62d58b6
Merge branch 'MDL-61165-master' of https://github.com/andrewnicols/moodle 2023-08-24 11:22:15 +08:00
Angelia Dela Cruz
09ed13cdc9 MDL-78941 mod_quiz: Behat coverage for student flagging quiz questions 2023-08-24 10:13:36 +08:00
Huong Nguyen
9015554788
Merge branch 'MDL-78843-master' of https://github.com/lameze/moodle 2023-08-24 08:57:12 +07:00
Ilya Tregubov
4bed4ea8f3
Merge branch 'MDL-71212-collapse-expand-all-sections-in-course-index-drawer' of https://github.com/stopfstedt/moodle 2023-08-24 09:22:23 +08:00
Sara Arjona
9cece94b69
Merge branch 'MDL-76982-master' of https://github.com/rjnl/moodle 2023-08-23 22:15:42 +08:00
Daniel Ziegenberg
7ff4626871
MDL-61165 core: Final deprecation and removal of legacy cron.
Following MDL-52846 this now finally deprecates and removes the
following classes:
- \core\task\legacy_plugin_cron_task.
- \mod_quiz\task\legacy_quiz_reports_cron
- \mod_quiz\task\legacy_quiz_accessrules_cron
- \mod_workshop\task\legacy_workshop_allocation_cron

Please, use the Task API instead:
https://moodledev.io/docs/apis/subsystems/task

This also removes the corresponding and specific to legacy cron strings
from mod_quiz and mod_workshop.

Following MDL-52846 this now finally deprecates and removes the
functions:
  - cron_execute_plugin_type()
  - cron_bc_hack_plugin_functions()

Please, use the Task API instead:
https://moodledev.io/docs/apis/subsystems/task

Signed-off-by: Daniel Ziegenberg <daniel@ziegenberg.at>
2023-08-23 15:52:52 +08:00
Huong Nguyen
4f30570699
Merge branch 'MDL-78884-master' of https://github.com/sarjona/moodle 2023-08-23 13:36:08 +07:00
Sara Arjona
4ab210a823
MDL-78884 theme: Update styles to display new icons properly
- The default box for the icons has been increased from 50px to 52px.
That way, on the course page, the box for the icons has changed from
30px to 32px.
- The icon size has been increased from 16px to 24px on the main course
page and from 24px to 40px on the activity page.
2023-08-23 07:32:49 +02:00
Sara Arjona
07736ae9b7
MDL-78884 pix: Reduce MIME type icons, replacing them
In order to reduce the number of icons for the MIME types, a few
icons have been removed and replaced with their generic from
the existing ones:
- avi -> video
- base -> database
- bmp -> image
- html -> markup
- jpeg -> image
- mov -> video
- mp3 -> audio
- mpeg -> video
- png -> image
- quicktime -> video
- tiff -> image
- wav -> audio
- wmv -> video
2023-08-23 07:32:47 +02:00
Sara Arjona
7430208d56
MDL-78884 files: Deprecate size parameter for icons
The parameter $size of the following functions has been deprecated and is not used any more:
  - file_extension_icon
  - file_file_icon
  - file_folder_icon
  - file_mimetype_icon
  - mimeinfo_from_type
  - url_guess_icon

That way, the sized icons (xxxxxxx-yyy.png) can be removed and replaced by SVG, to make it easier
to keep them updated because once they are replaced, there will only be one single file for each
MIME icon.
2023-08-23 07:30:16 +02:00
Ilya Tregubov
fac3395464
MDL-69489 mod_lti: Fix query condition
Missing parenthesis added
2023-08-23 10:53:31 +08:00
Ilya Tregubov
31f1b4f62c
Merge branch 'MDL-69489-master' of https://github.com/jacdsouza/moodle 2023-08-23 09:35:56 +08:00
Jackson D'souza
480114fc96 MDL-69489 mod_lti: Make LTI only available to specific course categories
* Add new table for LTI types course categories
* Update LTI add / update form to restrict tool availablily in selected course categories
* Bumped version
2023-08-22 12:53:07 +01:00
Ferran Recio
174125dabc MDL-78291 core_courseformat: fix cm visibility behats 2023-08-22 09:39:13 +02:00
Leon Stringer
b3eed7cc95 MDL-79075 quiz: Fix transposed user IDs
In the description of "Quiz attempt reviewed" events the user IDs of
the reviewer (typically the teacher) and the reviewee (typically the
student) were the wrong way round.
2023-08-21 15:53:04 +01:00
Stefan Topfstedt
7b04638c52 MDL-71212 core_course: adds controls to the course index drawer. 2023-08-18 11:00:55 -07:00
Luca Bösch
daffea8964 MDL-65887 workshop: Recalculate + fill the 'Grade for assessment' column 2023-08-18 08:58:35 +02:00
Rajneel Totaram
ff186194c9 MDL-76982 mod_book: Flip chapter navigation icons in RTL languages 2023-08-18 18:53:10 +12:00
Rajneel Totaram
e6316d5285 MDL-76982 mod_book: Remove unused styles 2023-08-18 18:53:10 +12:00
Rajneel Totaram
bfea7da668 MDL-76982 mod_book: Make previous/next buttons sticky 2023-08-18 18:53:10 +12:00
Andrew Nicols
edf29562cc
Merge branch 'MDL-78576-master' of https://github.com/snake/moodle 2023-08-17 09:12:36 +02:00
Andrew Nicols
b71bec8475
Merge branch 'MDL-78684-master' of https://github.com/andelacruz/moodle 2023-08-17 09:12:36 +02:00