...
- Add file information to the data record the file is associated to
- Add the files to the export→files[] array
Data format for files
Files added to the data records need to have the following format:
...
Code Block | ||
---|---|---|
| ||
$record = [ ... 'files' => [ 'attachments' => [ [ ... ], [ ... ], ... ], 'posts' => [ [ ... ], [ ... ], ... ] ] ]; |
Helper method
There's a helper method in the export class \totara_userdata\userdata\export::add_file() which adds a file to the export→files[] array and returns the standardised data to be added to the data.
...