MDL-40084 mod_data: Add file export support

This commit is contained in:
Philipp Memmel
2023-06-29 19:18:15 +02:00
parent 1296a2b868
commit 4003751163
13 changed files with 306 additions and 18 deletions
+2 -1
View File
@@ -109,8 +109,9 @@ if ($mform->is_cancelled()) {
. 'Only "csv" and "ods" are currently supported.');
}
$includefiles = !empty($formdata['includefiles']);
\mod_data\local\exporter_utils::data_exportdata($data->id, $fields, $selectedfields, $exporter, $currentgroup, $context,
$exportuser, $exporttime, $exportapproval, $tags);
$exportuser, $exporttime, $exportapproval, $tags, $includefiles);
$count = $exporter->get_records_count();
$filename = clean_filename("{$data->name}-{$count}_record");
if ($count > 1) {