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: 200 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

csv_entries_importer:: (3 methods):
  get_import_data_file_extension()
  import_csv()
  get_added_records_messages()


Class: csv_entries_importer  - X-Ref

CSV entries_importer class for importing data and - if needed - files as well from a zip archive.

get_import_data_file_extension()   X-Ref
Declares the entries_importer to use a csv file as data file.


import_csv(stdClass $cm, stdClass $data, string $encoding, string $fielddelimiter)   X-Ref
Import records for a data instance from csv data.

param: stdClass $cm Course module of the data instance.
param: stdClass $data The data instance.
param: string $encoding The encoding of csv data.
param: string $fielddelimiter The delimiter of the csv data.

get_added_records_messages()   X-Ref
Getter for the array of messages for added records.

For each successfully added record the array contains a log message.

return: array Array of message strings: For each added record one message string