This change rewrites the way in which expiry is calculated and addresses
a number of closely related issues:
Users can customise, and add blocks with data to, their dashboard. When
a user had done so, the user could be flagged for deletion, but the
blocks in their Dashboard were subject to the default block retention
policy. In addition there is no way to override the retention policy for
user blocks.
This change modifies the structure of the expiry mechanism:
- to consider any subcontext of the user context to be a part of the user
context during calculation. User child contexts are not the property
of the system, and should not be treated separately.
- the way in which the context expiry mechanism worked was to select
use a multiple different managers based solely on the context level.
Because of the use of user blocks, this proved to be unreliable as
blocks has been attributed purely to courses.
This has been changed to a single manager which is aware of hierarchy
and deletions as a whole.
- to prepare for upcoming work relating to more detailed expiry
mechanisms, a new expiry_info class is introduced and used to
merge the expiry of child contexts into a working in-memory view.
This changeset includes extensive unit tests.
* Use standard Bootstrap4 table classes for the categories and purposes
tables.
* Set w-25 for the name and description columns of the purposes table.
* Set w-50 for the description column of the categories table.
* Set a minimum width for the actions column of these tables.
* We also need to handle default contexts for activities. If defaults
for an activity is set, fetch that. If not, fetch the defaults for
the context level.
* Allow the setting of data registry defaults for activity modules.
* Rewrite the defaults page so that it uses templates.
* Use a tabbed layout for the defaults page that shows the default
category and purpose per context level.
* New API and web service functions that enables the setting of the
defaults.
Significant string changes:
* completionpass_help, gradetopassnotset in mod_quiz - grade to pass set
in quiz settings not gradebook
* namecolumnmissing,core_cohort - fixing incorrect message about adding
users to a cohort
* Updated the delete confirmation messages so that the category/purpose
names are shown in italics. This makes it easier for the privacy officer
to see the category/purpose that is being deleted.
* No need to add the purpose/category name for the delete button itself
* Fix delete confirmation lang strings.
* Add button titles to Add purpose/category buttons so they can be
clicked on when running Behat tests.
Updated tests with latest statuses.
Added testing for request download expiry functionality and method.
Added assign_site_dpo within a parent class for unit tests.