diff --git a/admin/tool/dataprivacy/classes/metadata_registry.php b/admin/tool/dataprivacy/classes/metadata_registry.php index ca50157a18c..e29174a9a77 100644 --- a/admin/tool/dataprivacy/classes/metadata_registry.php +++ b/admin/tool/dataprivacy/classes/metadata_registry.php @@ -76,6 +76,16 @@ class metadata_registry { if (isset($contributedplugins[$plugintype][$shortname])) { $internaldata['external'] = true; } + + // Check if the interface is deprecated. + if (!$manager->is_empty_subsystem($component)) { + $classname = $manager->get_provider_classname_for_component($component); + $componentclass = new $classname(); + if ($componentclass instanceof \core_privacy\local\deprecated) { + $internaldata['deprecated'] = true; + } + } + return $internaldata; }, $leaves['plugins']); $fullyrichtree[$branch]['plugin_type_raw'] = $plugintype; diff --git a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php index 3c1c31cfa83..7b5906ebadc 100644 --- a/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php +++ b/admin/tool/dataprivacy/lang/en/tool_dataprivacy.php @@ -85,6 +85,8 @@ $string['deletepurposetext'] = 'Are you sure you want to delete "{$a}" purpose?' $string['defaultssaved'] = 'Defaults saved'; $string['deny'] = 'Deny'; $string['denyrequest'] = 'Deny request'; +$string['deprecated'] = 'Deprecated'; +$string['deprecatedexplanation'] = 'This plugin is using an old version of one of the privacy interfaces and should be updated.'; $string['download'] = 'Download'; $string['dporolemapping'] = 'Privacy officer role mapping'; $string['dporolemapping_desc'] = 'The privacy officer can manage data requests. The capability tool/dataprivacy:managedatarequests must be allowed for a role to be listed as a privacy officer role mapping option.'; diff --git a/admin/tool/dataprivacy/templates/component_status.mustache b/admin/tool/dataprivacy/templates/component_status.mustache index c62dc0b65d9..3f7b6918119 100644 --- a/admin/tool/dataprivacy/templates/component_status.mustache +++ b/admin/tool/dataprivacy/templates/component_status.mustache @@ -61,6 +61,9 @@ {{#external}} {{#str}}external, tool_dataprivacy{{/str}} {{/external}} + {{#deprecated}} + {{#str}}deprecated, tool_dataprivacy{{/str}} + {{/deprecated}} {{#compliant}} diff --git a/admin/tool/dataprivacy/templates/data_registry_compliance.mustache b/admin/tool/dataprivacy/templates/data_registry_compliance.mustache index caadac15f81..c4a9c1bc919 100644 --- a/admin/tool/dataprivacy/templates/data_registry_compliance.mustache +++ b/admin/tool/dataprivacy/templates/data_registry_compliance.mustache @@ -45,6 +45,8 @@