5405 Commits

Author SHA1 Message Date
Mathew May
e04b4be619 MDL-67586 core_course: Recommended modules frontend 2020-02-25 14:07:40 +08:00
Eloy Lafuente (stronk7)
30206d545e MDL-67262 core_course: fix behat looking for non-existing page 2020-02-24 23:15:28 +01:00
Jun Pataleta
c31085bb66 MDL-67262 core_course: Rebuild recommended activities JS module 2020-02-24 16:04:06 +08:00
Jake Dallimore
b3fe33ac75 MDL-67262 core_course: integration review changes 2020-02-24 13:13:49 +08:00
Adrian Greeve
ebdbe8736e MDL-67262 core_course: Unit and behat tests for recommendations. 2020-02-24 11:00:44 +08:00
Adrian Greeve
cd09777dbd MDL-67262 core_course: Added the ability to recommend activities.
This allows an adminsitrator or a user with
'moodle/course:recommendactivity' to recommend activities in the
activity chooser.
2020-02-24 10:59:55 +08:00
Adrian Greeve
a7b2378d72 MDL-67585 core_course: Added legacyitem to exporter.
Legacy items have no id and so can not be favourited nor
recommended. We needed a way to easily determine whether to show
these features in the templates.
2020-02-20 11:42:24 +08:00
Adrian Greeve
54561c885e MDL-67585 core_course: Removing functions introduced this release.
For the initial rewrite of the activity chooser we had some
temporary functions to make everything work. These have been replaced
with different functions and so these functions are now being removed.
2020-02-20 11:42:23 +08:00
Adrian Greeve
618d310663 MDL-67585 core_course: Update to provider to add favourites info.
This adds information to the privacy report about the user being
able to favourite activities in the activity chooser.
2020-02-20 11:42:23 +08:00
Adrian Greeve
5c78541f80 MDL-67585 core_course: Service factory for course content items. 2020-02-20 11:42:23 +08:00
Jake Dallimore
806e736a7c MDL-67585 core_course: use new content item service to load the chooser 2020-02-20 11:42:23 +08:00
Jake Dallimore
85b4eec5b7 MDL-67585 core_course: new web service to return course content items 2020-02-20 11:42:23 +08:00
Jake Dallimore
a826857844 MDL-67585 core_course: added web services for content item favourites
Two new services:
add_content_item_to_user_favourites
remove_content_item_from_user_favourites
2020-02-20 11:42:23 +08:00
Jake Dallimore
f09e9b887e MDL-67585 core_course: add favouriting to the content item service class 2020-02-20 11:42:22 +08:00
Jake Dallimore
57dfcf951d MDL-67585 core_course: add hook get_all_content_items
Returns all content items which are provided by the plugin, irrespective
of whether or not a user can see an item in a particular course. This is
used to generate a global list of content items, allowing for admin
level features to be added.
2020-02-20 11:42:22 +08:00
Jake Dallimore
520add19d6 MDL-67585 core_course: deprecate the callback get_shortcuts()
This involves a few changes:
- The callback is still called by the repository but only if the
replacement callback get_course_content_items is not implemented.
- Debugging is called when the get_shortcuts callback is called.
- We leave lti's implementation of get_shortcuts alone, in order to
maintain the output of get_module_metadata during its deprecation life
span.
2020-02-20 11:42:21 +08:00
Jake Dallimore
39b9e293e7 MDL-67585 core_course: only accept content items from mods and submods
This matches the prior behaviour in core.
2020-02-20 09:28:57 +08:00
Jake Dallimore
8fc7d83f38 MDL-67585 core_course: add get_course_content_items hook
Plugins use this to report which content items relate to a user in
a course.
2020-02-20 09:28:57 +08:00
Jake Dallimore
38a9d717a9 MDL-67585 format_singleactivity: fix hassubtype to use the service data
TODO: really need to properly work out subtypes lower down in the repo.
2020-02-20 09:28:57 +08:00
Jake Dallimore
12f73788b4 MDL-67585 core_course: deprecate get_module_metadata() from course/lib 2020-02-20 09:28:57 +08:00
Jake Dallimore
2f040002ee MDL-67585 core_course: Use the content_item_service to build the picker
Replace get_module_metadata calls with calls to the new
content_item_service class.
2020-02-20 09:28:57 +08:00
Jake Dallimore
dd494a41a4 MDL-67585 core_course: add content_item_service class
The service object encapsulates access control logic and allows
consumers to query content items in different contexts/scopes.
2020-02-20 09:28:57 +08:00
Jake Dallimore
8210186372 MDL-67585 core_course: add user param to course_allowed_module
We want to be able to call this for a user, not rely on a global.
2020-02-20 09:28:57 +08:00
Jake Dallimore
eec2d09f84 MDL-67585 core_course: add exporter for course content items
An exporter will allow let us add calculated fields like 'favourited'
to the data being transferred.
2020-02-20 09:28:57 +08:00
Jake Dallimore
7c7ae1bd6f MDL-67585 core_course: add caching_content_item_repository class
A repository object which caches results for a user and course. This
allows this repository to be called many time in a single request - a
pattern we expect when objects of this type replace the existing
get_module_metadata() method.
2020-02-20 09:28:57 +08:00
Jake Dallimore
e843336ee6 MDL-67585 core_course: add content_item_readonly_repository class
Add a read-only repository, which returns the list of content items
which can be added to a course. This class does not handle access
control nor user-related data pertaining to to core content_items.
This will be handled in a future commit in any calling code using
the repositories.
2020-02-20 09:28:57 +08:00
Jake Dallimore
94420851a5 MDL-67585 core_course: add support for custom titles to content_item
Plugins have always been able to return either a string or a lang string
when implementing the hook, 'get_shortcuts'. Since content_items will
be the replacement for that stdClass implementation, we need a way
for plugins to continue to have this flexibility. This just provides
a small contract and some classes that plugins can use in future.
2020-02-20 09:28:57 +08:00
Jake Dallimore
dd8048e350 MDL-67585 core_course: add the content_item class
Objects of this class represent items able to be added to a course,
including modules and submodules.
2020-02-20 09:28:57 +08:00
Mathew May
c58c23d6c6 MDL-67321 core_course: Add support for tabbing activities in the chooser 2020-02-19 13:28:54 +08:00
Peter
37cf89b34a MDL-67264 core_course: Activity chooser behat
Update the selectors to use a button
Add new tests to cover new functionality
Add new new step definitions to minimise usage of xpaths

Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
Co-authored-by: Mihail Geshoski <mihail@moodle.com>
Co-authored-by: Peter <peterrolanddias@gmail.com>
2020-02-13 09:15:40 +08:00
Mathew May
05b27f2118 MDL-67264 core_course: Activity chooser new feature
Roll in the base for the new activity chooser
It renders all modules into a modal
Gives the user to add from either the base or help screens
All checked by accessability tools with great coverage
Adds minimal overhead to the course edit setup time

Co-authored-by: Mathew May <mathewm@hotmail.co.nz>
Co-authored-by: Mihail Geshoski <mihail@moodle.com>
2020-02-12 12:35:03 +08:00
Mihail Geshoski
cd2efd12ca MDL-67264 core_course: Begin set up for Activity chooser 2020-02-10 08:14:16 +08:00
Sara Arjona
ceaa04ffea Merge branch 'MDL-67681_master' of https://github.com/marxjohnson/moodle 2020-02-04 12:16:39 +01:00
Mark Johnson
d62ce1d419 MDL-67681 Cache: Store coursecattree array in a single key 2020-01-30 13:21:22 +00:00
Jun Pataleta
961833b477 Merge branch 'MDL-67353_reset' of https://github.com/stronk7/moodle 2020-01-30 12:35:56 +08:00
Adrian Greeve
f494e9e6c0 Merge branch 'MDL-67351-master_required_setting' of https://github.com/catalyst/moodle 2020-01-30 08:11:33 +08:00
Andrew Madden
948a951a4e MDL-67351 admin: Create new 'required' admin flag setting.
Extend the admin flag options, that currently allow the 'advanced' and 'locked' states
of a form setting to be controlled by a plugins admin settings, to also include
the 'required' state. These options appear as a list of checkboxes next to the admin
setting.
2020-01-30 10:49:14 +11:00
Eloy Lafuente (stronk7)
4af44dbc8e MDL-67353 course: move form tearDown() to reset_all_data()
We are already cleaning all sort of caches, statics, singletons
there and it's better to ensure they are always reset to avoid
myterious failures @ distance.
2020-01-29 23:43:57 +01:00
Michelle Melton
b5fc2892df MDL-64169 course: fix padding when display on one section per page
(amended to keep the $o.= consistent with surrounding code)
2020-01-29 22:34:35 +01:00
Eloy Lafuente (stronk7)
cefcb68f63 Merge branch 'MDL-64531-master-questiondeletejson' of git://github.com/mudrd8mz/moodle 2020-01-27 17:07:33 +01:00
Andrew Nicols
1d44ac9ec6 MDL-67353 course: Fix broken unit test 2020-01-24 11:26:56 +01:00
Tim Hunt
1d67458783 MDL-64531 course: course_delete_module shouldn't output during AJAX
Committer's note: This change was originally part of a bigger patchset
submitted by the author. This is a stripped-down version that does not
use phpunit tests for the new behaviour.
2020-01-20 17:15:55 +01:00
Paul Holden
47ff771e80 MDL-66108 course: fix false positives when bulk moving categories. 2020-01-17 16:19:07 +00:00
Sara Arjona
daa7107bfb Merge branch 'MDL-67638_master' of https://github.com/nguyenphuctien/moodle 2020-01-15 12:19:34 +01:00
Mark Johnson
96e440493b MDL-67674 Cache: Lock rebuilding of the course category tree cache 2020-01-15 00:00:54 +01:00
Tien Nguyen Phuc
bc6efcb437 MDL-67638 Course: update course timemodified on bulk category move 2020-01-13 10:38:12 +07:00
Jun Pataleta
88fbee25d9 Merge branch 'MDL-65835-master' of git://github.com/abgreeve/moodle 2020-01-02 11:52:10 +08:00
Adrian Greeve
d0d65b498c MDL-65835 plagiarism: Initial deprecation of old functions.
This is the initial deprecation of:
* plagiarism_save_form_elements
* plagiarism_get_form_elements_module
* plagiarism_plugin::get_form_elements_module
* plagiarism_plugin::save_form_elements
2020-01-02 11:38:49 +08:00
Adrian Greeve
42d7f7f9e4 Merge branch 'MDL-65809-master' of git://github.com/sarjona/moodle 2019-12-24 14:53:03 +08:00
Adrian Greeve
f00542c485 Merge branch 'MDL-66999-master' of git://github.com/bmbrands/moodle 2019-12-23 14:26:39 +08:00