MDL-78088 tool_dataprivacy: Enable and return additional info
This commit is contained in:
@@ -32,6 +32,7 @@ $functions = [
|
||||
'capabilities' => '',
|
||||
'ajax' => true,
|
||||
'loginrequired' => true,
|
||||
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
|
||||
],
|
||||
'tool_dataprivacy_contact_dpo' => [
|
||||
'classname' => 'tool_dataprivacy\external',
|
||||
@@ -42,6 +43,7 @@ $functions = [
|
||||
'capabilities' => '',
|
||||
'ajax' => true,
|
||||
'loginrequired' => true,
|
||||
'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
|
||||
],
|
||||
'tool_dataprivacy_mark_complete' => [
|
||||
'classname' => 'tool_dataprivacy\external',
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
$plugin->version = 2023100900;
|
||||
$plugin->version = 2023100901;
|
||||
$plugin->requires = 2023100400;
|
||||
$plugin->component = 'tool_dataprivacy';
|
||||
|
||||
@@ -388,6 +388,11 @@ class api {
|
||||
$CFG->searchbanner, FORMAT_HTML, $context)[0];
|
||||
}
|
||||
|
||||
if (empty($section) || $section === 'privacysettings') {
|
||||
$settings->tool_dataprivacy_contactdataprotectionofficer = get_config('tool_dataprivacy', 'contactdataprotectionofficer');
|
||||
$settings->tool_dataprivacy_showdataretentionsummary = get_config('tool_dataprivacy', 'showdataretentionsummary');
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
|
||||
@@ -267,6 +267,9 @@ class externallib_test extends externallib_advanced_testcase {
|
||||
$expected[] = ['name' => 'searchbannerenable', 'value' => $CFG->searchbannerenable];
|
||||
$expected[] = ['name' => 'searchbanner', 'value' => $CFG->searchbanner];
|
||||
|
||||
$expected[] = ['name' => 'tool_dataprivacy_contactdataprotectionofficer', 'value' => get_config('tool_dataprivacy', 'contactdataprotectionofficer')];
|
||||
$expected[] = ['name' => 'tool_dataprivacy_showdataretentionsummary', 'value' => get_config('tool_dataprivacy', 'showdataretentionsummary')];
|
||||
|
||||
$this->assertCount(0, $result['warnings']);
|
||||
$this->assertEquals($expected, $result['settings']);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user