There was an accessibility issue with the previous icons that we used
the same "checked" shape just in different colours for different
meanings. New icons added for the new statuses:
* partial - a warning icon for the overall status column that the user
has only some policies accepted, not all.
* pending - that we did not hear yet from the user - whcih is different
from a declined policy.
For optional policies, we provide a radio selector to let the user
choose the acceptance status on the consent page. For policies displayed
on their own page, we display a link to decline the policy.
The way how we pass the list of policy version ids to index.php has
changed so that we can now not only pass the list of ids, but also the
actual acceptance status (accepted / declined).
This method allows to quickly check if the given policy version is
marked as optional or compulsory. This will be needed in other places
such as permissions check.
The method now returns three-state logic. A bool value true/false is
returned if the user has accepted/rejected the policy, respectively. A
null value is returned if the user did not express their agreement in
either way yet.
This allows to distinguish between "rejected the policy" and "did not
say anything about it yet" cases.
The patch adds a new column to the database table to hold the
information if giving agreement to the policy is compulsory or optional.
The flag can be defined via the policy editing form and is displayed at
the policies management screen.
The last modified time merged with the version column at the policies
management screen to save a bit of horizontal space - needed as we
display more information now at the first column.
This gets rid of specific repo functions which were unused, and makes
sure the following methods are defined on the interface, implemented
and tested:
- exists_by($criteria)
- find_by($criteria)
- delete_by($crtieria)
Also, added missing tests for find_favourite() repo method.
A template can include itself - e.g. by looping over the context children and rendering a tree.
Ensure this promise still resolves.
Example: admin/tool/lp/templates/competencies_tree.mustache.
Let's worry about reuse of the crud code later, when that requirement
arises, so moved that into the ifavourite_repository interface, and then
renamed it favourite_repository_interface.
This patch adds several things:
- favourite entity class under local/entity
- refactoring of repository and service to use the new class instead
of stdClass.
- update repository unit tests to use the object instead of stdClass.
- update service_test so that the mock repo requires the object for
the add operation.
- remove unnecessary constructor from favourites_repository class.
Add new messaging profile preferences to allow users to choose who
can message them:
- By default, users can select between 'My contacts only' and 'My
contacts and anyone in my courses'
- When $CFG->messagingallusers is enabled, a new option is displayed
also: 'Anyone on the site'. For users who have selected this option,
if $CFG->messagingallusers is disabled, the behaviour will be changed
to 'My contacts and anyone in my courses'