Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

File Size: 141 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

utils:: (1 method):
  data_exportdata()


Class: utils  - X-Ref

Utility class for exporting data from a mod_data instance.

data_exportdata(int $dataid, array $fields, array $selectedfields, entries_exporter $exporter,int $currentgroup = 0, context $context = null, bool $userdetails = false, bool $time = false, bool $approval = false,bool $tags = false, bool $includefiles = true)   X-Ref
Exports the data of the mod_data instance to an entries_exporter object which then can export it to a file format.

param: int $dataid
param: array $fields
param: array $selectedfields
param: entries_exporter $exporter the entries_exporter object used
param: int $currentgroup group ID of the current group. This is used for
param: context|null $context the context in which the operation is performed (for capability checks)
param: bool $userdetails whether to include the details of the record author
param: bool $time whether to include time created/modified
param: bool $approval whether to include approval status
param: bool $tags whether to include tags
param: bool $includefiles whether files should be exported as well
return: void