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.
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.
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.
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.
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.
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.
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.
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>
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>
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.
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.
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.
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