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.
The tests make sure that both existing users as well as signing up users
can accept policies with "on their own page" style of agreement prior
reaching the consent page.
The idea of the patch is to check the list of policies that are shown
before and on the consent page. If that list contains a policy that is
supposed to be accepted on its own page, the existing flow is
interrupted and the user is redirected to a view.php to display that
particular policy.
The view template for such a policy contains a button for getting the
user agreement. When pressed, the policy is marked as accepted and we
can go to start again.
To make this working during the signup, we need to extend the existing
logic and start tracking which particular policies the visitor accepted
prior reaching the signup form. Similarly, we need to start track which
particular policies were displayed and use that list when evaluating
which policies were unchecked on the consent page.
The patch introduces a new property of a policy document called
"Agreement style". It allows the admin to define if the policy should be
accepted together with all others on the consent page (legacy and
default behaviour) or on its page before the consent page is reached
(the new optional behaviour).
* 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