MDL-62616 tool_log: Add a setting to disable exporting logs.
This commit is contained in:
committed by
Jake Dallimore
parent
ed3bf90af1
commit
adbfa2fbfa
@@ -99,8 +99,8 @@ class helper {
|
||||
'name' => $name,
|
||||
'description' => $description,
|
||||
'timecreated' => transform::datetime($record->timecreated),
|
||||
'ip' => $record->ip,
|
||||
'origin' => static::transform_origin($record->origin),
|
||||
'ip' => $isauthor ? $record->ip : '',
|
||||
'other' => $other ? $other : []
|
||||
];
|
||||
|
||||
|
||||
@@ -74,7 +74,9 @@ class provider implements
|
||||
* @param approved_contextlist $contextlist The approved contexts to export information for.
|
||||
*/
|
||||
public static function export_user_data(approved_contextlist $contextlist) {
|
||||
static::call_subplugins_method_with_args('export_user_data', [$contextlist]);
|
||||
if (get_config('tool_log', 'exportlog')) {
|
||||
static::call_subplugins_method_with_args('export_user_data', [$contextlist]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
$string['actlogshdr'] = 'Available log stores';
|
||||
$string['configlogplugins'] = 'Please enable all required plugins and arrange them in appropriate order.';
|
||||
$string['exportlog'] = 'Include logs when exporting.';
|
||||
$string['exportlogdetail'] = 'Include logs that relate to the user when exporting.';
|
||||
$string['logging'] = 'Logging';
|
||||
$string['managelogging'] = 'Manage log stores';
|
||||
$string['pluginname'] = 'Log store manager';
|
||||
|
||||
@@ -25,6 +25,16 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
if ($hassiteconfig) {
|
||||
|
||||
$privacysettings = $ADMIN->locate('privacysettings');
|
||||
|
||||
if ($ADMIN->fulltree) {
|
||||
$privacysettings->add(new admin_setting_configcheckbox('tool_log/exportlog',
|
||||
new lang_string('exportlog', 'tool_log'),
|
||||
new lang_string('exportlogdetail', 'tool_log'), 1)
|
||||
);
|
||||
}
|
||||
|
||||
$ADMIN->add('modules', new admin_category('logging', new lang_string('logging', 'tool_log')));
|
||||
|
||||
$temp = new admin_settingpage('managelogging', new lang_string('managelogging', 'tool_log'));
|
||||
|
||||
@@ -24,6 +24,6 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2017111300; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->version = 2017111301; // The current plugin version (Date: YYYYMMDDXX).
|
||||
$plugin->requires = 2017110800; // Requires this Moodle version.
|
||||
$plugin->component = 'tool_log'; // Full name of the plugin (used for diagnostics).
|
||||
|
||||
Reference in New Issue
Block a user