7494 Commits

Author SHA1 Message Date
David Mudrák
56390aa246 MDL-62309 tool_policy: New icons for user acceptances report
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.
2018-10-22 08:49:36 +02:00
David Mudrák
5348b1eef5 MDL-62309 tool_policy: Optional policies can be declined by the user
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).
2018-10-22 08:49:36 +02:00
David Mudrák
faf4222edc MDL-62309 tool_policy: Add api::get_agreement_optional() method
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.
2018-10-22 08:49:36 +02:00
David Mudrák
1617fde9a8 MDL-62309 tool_policy: New API method to decline a policy
Policy can be declined. Optional policies do not need to be accepted to
use the site. But we still want to hear explicitly from the user.
2018-10-22 08:49:36 +02:00
David Mudrák
f98cd91a13 MDL-62309 tool_policy: Improve api::is_user_version_accepted() return
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.
2018-10-22 08:49:36 +02:00
David Mudrák
9011d394ab MDL-62309 tool_policy: Add new field to hold the optional policy flag
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.
2018-10-22 08:49:36 +02:00
Matt Porritt
d5adb60fa3 MDL-62777 Administration: CLI upgrade new setting notification
During a CLI upgrade when there are new settings in core or in
a plugin, the settings are set to the defined defaults
automatically. There is no ouput shown on the CLI about which
new settings have been introduced or what default values the
setting are set to.

This patch outputs the name of the new setting and what the
default value being is set is to the CLI during an upgrade.
Objects and arrays are expanded into a human readable format.
This plugin also makes the function that sets the defaults to
be more robust so it isno longer required to be called multiple
times to ensure all settings are set.
2018-10-22 14:28:06 +11:00
Marina Glancy
97372ec17d MDL-63648 tool_xmldb: missing capability check 2018-10-19 11:36:40 +02:00
Eloy Lafuente (stronk7)
1845a5bbaa Merge branch 'MDL-63648-master' of git://github.com/marinaglancy/moodle 2018-10-18 23:54:06 +02:00
Eloy Lafuente (stronk7)
d6d5ea5d04 Merge branch 'MDL-62920-master' of https://github.com/aanabit/moodle 2018-10-18 23:47:37 +02:00
Jun Pataleta
500dc0b134 MDL-62904 tool_dataprivacy: Add data request links in profile page 2018-10-17 16:40:55 +08:00
Andrew Nicols
bf347c4d2b MDL-63496 tool_dataprivacy: Add configuration for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols
b107016c88 MDL-63496 tool_dataprivacy: Respect expiry with protected flag
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols
8c634d6d4f MDL-63496 tool_dataprivacy: Support for per-role retention
This issue is a part of the MDL-62560 Epic.
2018-10-17 13:12:18 +08:00
Andrew Nicols
5266994547 Merge branch 'MDL-63421' of git://github.com/stronk7/moodle 2018-10-16 08:49:34 +08:00
Marina Glancy
ced982cf15 MDL-63648 tool_xmldb: drag and drop sorting 2018-10-13 14:03:46 +02:00
Amaia Anabitarte
5e4aaa886c MDL-62920 user: Uploading deleted user and adding to a cohort 2018-10-11 16:27:07 +02:00
Eloy Lafuente (stronk7)
609c73be26 Merge branch 'MDL-29895' of https://github.com/enovation/moodle 2018-10-10 00:29:16 +02:00
Eloy Lafuente (stronk7)
25fe592cf0 Merge branch 'MDL-62395-master' of git://github.com/junpataleta/moodle 2018-10-09 23:06:28 +02:00
Eloy Lafuente (stronk7)
bf0072e6c3 Merge branch 'MDL-63401-master' of git://github.com/andrewnicols/moodle 2018-10-09 11:35:29 +02:00
David Monllao
bbb2141084 Merge branch 'MDL-60710-master' of git://github.com/abias/moodle 2018-10-09 09:00:42 +02:00
Andrew Nicols
751b5e8b92 MDL-63401 tool_dataprivacy: Change default for require end date
We should preserve the existing behaviour.
2018-10-09 08:31:59 +08:00
Andrew Nicols
9a8944c52d MDL-63401 tool_dataprivacy: Simplify where processing 2018-10-09 08:21:38 +08:00
Andrew Nicols
7200ab20cd MDL-63401 tool_dataprivacy: Move final cap check to endpoint 2018-10-09 08:21:25 +08:00
Andrew Nicols
65f77d319e MDL-63401 tool_dataprivacy: Allow expiriration of users without end date 2018-10-08 20:49:59 +08:00
Andrew Nicols
2136ec3da3 MDL-63401 tool_dataprivacy: Rewrite expired deletion handling
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.
2018-10-08 20:49:55 +08:00
Andrew Nicols
cbae8dcd57 MDL-63401 tool_dataprivacy: Move cap checks to endpoints from API 2018-10-08 20:49:17 +08:00
Eloy Lafuente (stronk7)
8a95de6bcc MDL-63421 env: Moodle 3.4.x and 3.5.x do not support PHP 7.3 2018-10-05 13:36:26 +02:00
Jun Pataleta
7216596760 MDL-62395 tool_dataprivacy: Purpose name and description in one column
* Show the purpose's name and description under one column.
2018-10-05 09:20:02 +08:00
David Monllao
1ef89ad49c Merge branch 'mdl63334-master' of https://github.com/tlock/moodle 2018-10-03 17:19:18 +02:00
Adrian Greeve
edbdeb6315 MDL-62558 tool_dataprivacy: Create a summary page for users. 2018-10-03 10:16:25 +08:00
David Knuplesch
a487a3edf2 MDL-60710 course: setting to show/hide duplicate coursecontact 2018-10-01 13:39:17 +02:00
Jun Pataleta
526d2aa58e MDL-62395 tool_dataprivacy: Use BS4 table classes
* 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.
2018-09-28 10:25:58 +08:00
Andrew Nicols
20f9b981f9 Merge branch 'dashboard-split-overview-block' of https://github.com/ryanwyllie/moodle 2018-09-27 14:08:55 +08:00
Ryan Wyllie
1e44de35b3 MDL-63044 block_timeline: add timeline block 2018-09-27 13:10:45 +08:00
Eloy Lafuente (stronk7)
659d9fe942 Merge branch 'MDL-63013-master-prioritypolicy' of git://github.com/mudrd8mz/moodle 2018-09-26 23:21:09 +02:00
David Monllao
0e79528704 Merge branch 'MDL-61161-master' of https://github.com/mackensen/moodle 2018-09-26 10:23:39 +02:00
Eloy Lafuente (stronk7)
de7c685e52 Merge branch 'MDL-63253-master-adminsearchresults' of git://github.com/mudrd8mz/moodle 2018-09-25 22:56:11 +02:00
Charles Fulton
3b31d8c92c MDL-61161 course: grace period for classifying in progress courses 2018-09-25 14:11:32 -04:00
Daniel Neis Araujo
28af88f364 MDL-62334 admin: add a new course link on admin/search 2018-09-25 14:31:50 -03:00
David Monllao
bac1731614 Merge branch 'MDL-61573-master' of https://github.com/Kathrin84/moodle 2018-09-24 11:24:49 +02:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
David Mudrák
7fb0e8a260 MDL-63013 tool_policy: Add Behat tests for the new style of agreements
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.
2018-09-19 09:55:42 +02:00
David Mudrák
362ae1b443 MDL-63013 tool_policy: Change acceptance flow for policies with own 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.
2018-09-19 09:55:42 +02:00
David Mudrák
23b663ed55 MDL-63013 tool_policy: Policy agreement style can be defined now
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).
2018-09-19 09:55:42 +02:00
Eloy Lafuente (stronk7)
4cde0a5212 Merge branch 'MDL-63116-master-1' of git://github.com/mihailges/moodle 2018-09-18 23:26:51 +02:00
Mihail Geshoski
457047de6c MDL-61908 privacy: Fix heading in data privacy pages 2018-09-18 18:49:04 +02:00
Eloy Lafuente (stronk7)
ddf86f9930 Merge branch 'MDL-63109-master' of git://github.com/mihailges/moodle 2018-09-18 17:50:13 +02:00
David Monllao
0e5144fe24 Merge branch 'MDL-63333_master' of git://github.com/markn86/moodle 2018-09-18 12:17:46 +02:00
Mihail Geshoski
85de6d525d MDL-63109 privacy: Add behat tests 2018-09-18 15:06:23 +08:00